-
Notifications
You must be signed in to change notification settings - Fork 87
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
feat(metrics): Allow ingestion of custom metric units [INGEST-1131] #1256
Merged
Merged
Changes from 5 commits
Commits
Show all changes
7 commits
Select commit
Hold shift + click to select a range
1c7fa5c
feat(protocol): Move MetricUnit to common protocol module
jan-auer 87586bb
feat(metrics): Use ingested unit from event payload
jan-auer 6b3b3e5
test: Add measurement unit overrides to tests
jan-auer f8bc9cf
meta: Changelog
jan-auer 6332110
fix: Propagate units for breakdowns and update integration tests
jan-auer 713183f
ref(metrics): Remove "unit" in FromStr
jan-auer ca84ecd
fix: Log an error for known unit mismatches
jan-auer File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Had a discussion offline about if
"unit"
should pattern matched toSelf::None
. The reasoning that this was put in place was to track the unit type()
that exists in different languages. Does this still make sense? I would rather remove it.Also worthwhile syncing to see if we can better match OpenTelemetry in general here, particularly around defining dimensionless units, and opting into custom units (like recording X number of Y - for ex with a counter for network packets, 100 (measure) packets (unit)).
https://opentelemetry.io/docs/reference/specification/metrics/semantic_conventions/#instrument-units
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks, agreed to remove
"unit"
from here. This has not been used actively, so we can safely remove it.Other than that, this PR merely moves the existing unit definition and derives new traits. We can ideally discuss units in a new DACI or GitHub issue. Units are definitely not ideal yet, and we're also not able to support X per Y units (e.g. frames per second). Note that this is different from fractions.