Commit a904d7d
Fix deprecation warning: use WithTranslationStrategy instead of deprecated options
Replace deprecated prometheus.WithoutUnits() and prometheus.WithoutCounterSuffixes()
with prometheus.WithTranslationStrategy(otlptranslator.UnderscoreEscapingWithoutSuffixes)
as recommended by the linter.
The UnderscoreEscapingWithoutSuffixes strategy:
- Translates metric/label name characters to underscores (standard Prometheus behavior)
- Does NOT append suffixes like "_total" for counters or "_ratio" for gauges
This maintains the same behavior while using the non-deprecated API.
Co-authored-by: MartinForReal <[email protected]>1 parent 6f7c3aa commit a904d7d
1 file changed
+6
-6
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
22 | 22 | | |
23 | 23 | | |
24 | 24 | | |
| 25 | + | |
25 | 26 | | |
26 | 27 | | |
27 | 28 | | |
| |||
39 | 40 | | |
40 | 41 | | |
41 | 42 | | |
42 | | - | |
43 | | - | |
44 | | - | |
45 | | - | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
46 | 47 | | |
47 | 48 | | |
48 | | - | |
49 | | - | |
| 49 | + | |
50 | 50 | | |
51 | 51 | | |
52 | 52 | | |
| |||
0 commit comments