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

Make OpenMetrics output spec compliant #367

Merged
merged 1 commit into from
Jan 24, 2023
Merged

Conversation

linusg
Copy link
Contributor

@linusg linusg commented Jan 14, 2023

The current output is valid for Prometheus, but not the derived OpenMetrics format:

  • Spaces between comma-separated labels are not permitted
  • The exposition must end with a # EOF line
  • UNIT must be a suffix of the metric name, i.e. scc_code cannot have the unit lines

Additionally:

  • Complexity is not measured in 'lines'

For reference, see:
https://github.com/OpenObservability/OpenMetrics/blob/main/specification/OpenMetrics.md

I chose to remove the invalid UNITs instead of renaming them to 1) not break people's monitoring and dashboards and 2) keep things consistent with the internal names, and names used in other output formats.

Ref #307, cc @jan-guenter

@linusg linusg force-pushed the fix-openmetrics branch 3 times, most recently from b7df7c3 to de9bc7a Compare January 14, 2023 19:05
The current output is valid for Prometheus, but not the derived
OpenMetrics format:
- Spaces between comma-separated labels are not permitted
- The exposition must end with a `# EOF` line
- UNIT must be a suffix of the metric name, i.e. `scc_code` cannot have
  the unit `lines`

Additionally:
- Complexity is not measured in 'lines'

For reference, see:
https://github.com/OpenObservability/OpenMetrics/blob/main/specification/OpenMetrics.md
@boyter
Copy link
Owner

boyter commented Jan 24, 2023

Sorry lost track of this.

Merging in, since I am presuming it to be correct :) OpenMetrics is not something I am overly familiar with.

@boyter boyter merged commit a5d95f3 into boyter:master Jan 24, 2023
@linusg linusg deleted the fix-openmetrics branch January 24, 2023 09:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants