Skip to content

Commit

Permalink
fix: hack: do not set unit for counter to avoid the _ratio suffix
Browse files Browse the repository at this point in the history
  • Loading branch information
ttys3 committed May 24, 2023
1 parent b7e3994 commit 701a48e
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion opentelemetry-meter.go
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,8 @@ func NewPrometheus(subsystem string, serviceVersion string, skipper middleware.S
// "ms": "_milliseconds",
// }
// disable this behaviour by using `prometheus.WithoutUnits()` option
metric.WithUnit(UnitDimensionless),
// or hack: do not set unit for counter to avoid the `_ratio` suffix
// metric.WithUnit(UnitDimensionless),
metric.WithDescription("How many HTTP requests processed, partitioned by status code and HTTP method."),
)

Expand Down

0 comments on commit 701a48e

Please sign in to comment.