mirror of
https://github.com/hl-archive-node/nanoreth.git
synced 2025-12-06 10:59:55 +00:00
* feat(metrics): `Metrics` derive macro * rename metrics to metrics-derive * use fully qualified fmt path * metric vec with capacity * favor metrics over simple scope attr, simplify code * pull metric description from doc comment * rm debug log * add more docs and sample usage * link to metrics macros * add tests for metrics derive macro * clippy * simplify path comparison * cleanup * remove unused dep * rename stage metrics
49 lines
1.3 KiB
Plaintext
49 lines
1.3 KiB
Plaintext
error: Either doc comment or `describe` must be provided.
|
|
--> tests/compile-fail/metric_attr.rs:12:5
|
|
|
|
|
12 | gauge: Gauge,
|
|
| ^^^^^^^^^^^^
|
|
|
|
error: Either doc comment or `describe` must be provided.
|
|
--> tests/compile-fail/metric_attr.rs:18:5
|
|
|
|
|
18 | / #[metric()]
|
|
19 | | gauge: Gauge,
|
|
| |________________^
|
|
|
|
error: Unsupported attribute entry.
|
|
--> tests/compile-fail/metric_attr.rs:25:14
|
|
|
|
|
25 | #[metric(random = "value")]
|
|
| ^^^^^^^^^^^^^^^^
|
|
|
|
error: Value **must** be a string literal.
|
|
--> tests/compile-fail/metric_attr.rs:32:25
|
|
|
|
|
32 | #[metric(describe = 123)]
|
|
| ^^^
|
|
|
|
error: Value **must** be a string literal.
|
|
--> tests/compile-fail/metric_attr.rs:39:23
|
|
|
|
|
39 | #[metric(rename = 123)]
|
|
| ^^^
|
|
|
|
error: Duplicate `describe` value provided.
|
|
--> tests/compile-fail/metric_attr.rs:46:29
|
|
|
|
|
46 | #[metric(describe = "", describe = "")]
|
|
| ^^^^^^^^^^^^^
|
|
|
|
error: Duplicate `rename` value provided.
|
|
--> tests/compile-fail/metric_attr.rs:53:33
|
|
|
|
|
53 | #[metric(rename = "_gauge", rename = "_gauge")]
|
|
| ^^^^^^^^^^^^^^^^^
|
|
|
|
error: Unsupported metric type
|
|
--> tests/compile-fail/metric_attr.rs:61:12
|
|
|
|
|
61 | gauge: String,
|
|
| ^^^^^^
|