Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature Request: "scale" field in mapping config to convert units #498

Closed
ebracho opened this issue May 28, 2023 · 0 comments · Fixed by #499
Closed

Feature Request: "scale" field in mapping config to convert units #498

ebracho opened this issue May 28, 2023 · 0 comments · Fixed by #499

Comments

@ebracho
Copy link
Contributor

ebracho commented May 28, 2023

For my use case it would be great if there was a scale field in the mapping config to allow converting metric values from non-base units (e.g. milliseconds, microseconds) to base units. As per prometheus best practices:

A metric name ...should use base units (e.g. seconds, bytes, meters - not milliseconds, megabytes, kilometers).

Ex:

mappings:
  - match: statsd.grpc_server.*.*.latency_us
    name: grpc_server_handling_seconds
    scale: 1e-6 # converts microseconds -> seconds
    labels:
      grpc_service: "${1}"
      grpc_method: "${2}"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants