File tree Expand file tree Collapse file tree 3 files changed +9
-6
lines changed Expand file tree Collapse file tree 3 files changed +9
-6
lines changed Original file line number Diff line number Diff line change @@ -47,12 +47,15 @@ import (
47
47
// Prometheus to OpenMetrics or vice versa:
48
48
//
49
49
// - Counters are expected to have the `_total` suffix in their metric name. In
50
- // the output, the suffix will be truncated from the `# TYPE` and `# HELP `
51
- // line . A counter with a missing `_total` suffix is not an error. However,
50
+ // the output, the suffix will be truncated from the `# TYPE`, `# HELP` and `# UNIT `
51
+ // lines . A counter with a missing `_total` suffix is not an error. However,
52
52
// its type will be set to `unknown` in that case to avoid invalid OpenMetrics
53
53
// output.
54
54
//
55
- // - No support for the following (optional) features: `# UNIT` line, `_created`
55
+ // - The `# UNIT` line is optional, but if populated, the unit has to be present in the metric
56
+ // name as its suffix (see https://github.com/OpenObservability/OpenMetrics/blob/main/specification/OpenMetrics.md#unit)
57
+ //
58
+ // - No support for the following (optional) features: `_created`
56
59
// line, info type, stateset type, gaugehistogram type.
57
60
//
58
61
// - The size of exemplar labels is not checked (i.e. it's possible to create
Original file line number Diff line number Diff line change @@ -32,4 +32,4 @@ require (
32
32
gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c // indirect
33
33
)
34
34
35
- replace github.com/prometheus/client_model => github.com/vesari/client_model v0.0.0-20231118150741-19723af61627
35
+ replace github.com/prometheus/client_model => github.com/vesari/client_model v0.0.0-20231202151802-003f160da988
Original file line number Diff line number Diff line change @@ -42,8 +42,8 @@ github.com/rogpeppe/go-internal v1.10.0/go.mod h1:UQnix2H7Ngw/k4C5ijL5+65zddjncj
42
42
github.com/stretchr/objx v0.1.0 /go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME =
43
43
github.com/stretchr/testify v1.4.0 /go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4 =
44
44
github.com/stretchr/testify v1.8.2 h1:+h33VjcLVPDHtOdpUCuF+7gSuG3yGIftsP1YvFihtJ8 =
45
- github.com/vesari/client_model v0.0.0-20231118150741-19723af61627 h1:pJsecGZFkJIN3ipp7fS8hLDK0Dcnk2JVxXds3Dev3dQ =
46
- github.com/vesari/client_model v0.0.0-20231118150741-19723af61627 /go.mod h1:dTiFglRmd66nLR9Pv9f0mZi7B7fk5Pm3gvsjB5tr+kI =
45
+ github.com/vesari/client_model v0.0.0-20231202151802-003f160da988 h1:uGmTMMEergUEb2pEH90ZLVSBGvDqN16P12UsBjEQp0Y =
46
+ github.com/vesari/client_model v0.0.0-20231202151802-003f160da988 /go.mod h1:dTiFglRmd66nLR9Pv9f0mZi7B7fk5Pm3gvsjB5tr+kI =
47
47
github.com/xhit/go-str2duration/v2 v2.1.0 h1:lxklc02Drh6ynqX+DdPyp5pCKLUQpRT8bp8Ydu2Bstc =
48
48
github.com/xhit/go-str2duration/v2 v2.1.0 /go.mod h1:ohY8p+0f07DiV6Em5LKB0s2YpLtXVyJfNt1+BlmyAsU =
49
49
golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2 /go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w =
You can’t perform that action at this time.
0 commit comments