You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/guides/utf8.md
+13-20Lines changed: 13 additions & 20 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -17,29 +17,20 @@ This document guides you through the UTF-8 transition details.
17
17
18
18
## Go Instrumentation
19
19
20
-
Currently, metrics created by the official Prometheus [client_golang library](https://github.com/prometheus/client_golang) will reject UTF-8 names
21
-
by default. It is necessary to change the default validation scheme to allow
22
-
UTF-8. The requirement to set this value will be removed in a future version of
23
-
the common library.
20
+
Currently, metrics created by the official Prometheus [client_golang
21
+
library](https://github.com/prometheus/client_golang) accept UTF-8 names by
22
+
default.
24
23
25
-
```golang
26
-
import"github.com/prometheus/common/model"
27
-
28
-
funcinit() {
29
-
model.NameValidationScheme = model.UTF8Validation
30
-
}
31
-
```
32
-
33
-
If users want to enforce the legacy character set, they can set the validation
34
-
scheme to `LegacyValidation`.
35
-
36
-
Setting the validation scheme must be done before the instantiation of metrics
37
-
and can be set on the fly if desired.
24
+
Previously, documentation recommended that users override the value of
25
+
`model.NameValidationScheme` to select legacy validation by default. This
26
+
boolean is now deprecated and should always be set to UTF8Validation. Legacy
27
+
validation enforcement, if desired, should be done by individual implementations
28
+
calling the appropriate validation APIs and is no longer a library feature.
38
29
39
30
### Instrumenting in other languages
40
31
41
-
Other client libraries may have similar requirements to set the validation
42
-
scheme. Check the documentation for the library you are using.
32
+
Other client libraries may not yet support UTF-8 and may require special
33
+
handling or configuration. Check the documentation for the library you are using.
43
34
44
35
## Configuring Name Validation during Scraping
45
36
@@ -98,7 +89,9 @@ is no way to enforce the legacy character set validation with Remote Write 2.0.
98
89
99
90
## OTLP Metrics
100
91
101
-
OTLP receiver in Prometheus 3.0 still normalizes all names to Prometheus format by default. You can change this in `otlp` section of the Prometheus configuration as follows:
92
+
OTLP receiver in Prometheus 3.0 still normalizes all names to Prometheus format
93
+
by default. You can change this in `otlp` section of the Prometheus
0 commit comments