-
Notifications
You must be signed in to change notification settings - Fork 9.8k
OTLP receiver: Rename otlp.convert_scope_metadata
to otlp.promote_scope_metadata
#16760
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
Conversation
16ef573
to
0ed3da0
Compare
0ed3da0
to
56e37c8
Compare
Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>
56e37c8
to
7e1e6c1
Compare
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.
Pull Request Overview
This PR renames the configuration parameter from otlp.convert_scope_metadata to otlp.promote_scope_metadata for improved terminology consistency in the OTLP receiver. The changes update the field names in configuration, code, tests, and documentation to reflect the new naming convention.
- Updated the configuration struct and related documentation.
- Modified tests and helper functions to use PromoteScopeMetadata.
- Updated changelog and accompanying configuration test files.
Reviewed Changes
Copilot reviewed 12 out of 12 changed files in this pull request and generated no comments.
Show a summary per file
File | Description |
---|---|
storage/remote/write_handler.go | Updated field name from ConvertScopeMetadata to PromoteScopeMetadata in metric consumption. |
storage/remote/otlptranslator/prometheusremotewrite/number_data_points_test.go | Renamed test variable from convertScope to promoteScope. |
storage/remote/otlptranslator/prometheusremotewrite/metrics_to_prw.go | Updated configuration field and comment to use PromoteScopeMetadata. |
storage/remote/otlptranslator/prometheusremotewrite/histograms_test.go | Updated test cases to use promoteScope instead of convertScope. |
storage/remote/otlptranslator/prometheusremotewrite/helper_test.go | Updated assertions to reflect the new naming. |
storage/remote/otlptranslator/prometheusremotewrite/helper.go | Updated settings usage to reference PromoteScopeMetadata. |
docs/configuration/configuration.md | Updated configuration parameter name and description. |
config/testdata/*.yml | Updated test config files to reflect PromoteScopeMetadata. |
config/config_test.go | Updated test function and assertions for PromoteScopeMetadata. |
config/config.go | Updated struct field and comment to use promote_scope_metadata. |
CHANGELOG.md | Updated changelog entry for the renamed configuration parameter. |
Comments suppressed due to low confidence (1)
storage/remote/otlptranslator/prometheusremotewrite/helper.go:127
- [nitpick] Consider renaming the local variable 'convertScope' to 'promoteScope' for improved clarity and consistency with the new configuration field name.
convertScope := settings.PromoteScopeMetadata && scope.name != ""
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.
LGTM
storage/remote/otlptranslator/prometheusremotewrite/helper_test.go
Outdated
Show resolved
Hide resolved
Co-authored-by: Julius Hinze <juliusmh@proton.me> Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>
Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>
Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>
* fix: prevent invalid array access in aggregate expression This commit fixes the evaluation of invalid expressions like `sum(rate(`. Before that, it would trigger a panic in the PromQL engine because it tried to access an index which is out of range. The bug was probably introduced by 06d0b06. Signed-off-by: Simon Pasquier <spasquie@redhat.com> * OTLP receiver: Rename `otlp.convert_scope_metadata` to `otlp.promote_scope_metadata` (prometheus#16760) * Rename otlp.convert_scope_metadata to otlp.promote_scope_metadata --------- Signed-off-by: Simon Pasquier <spasquie@redhat.com> Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com> Co-authored-by: Simon Pasquier <spasquie@redhat.com> Co-authored-by: Julien <291750+roidelapluie@users.noreply.github.com> Co-authored-by: Arve Knudsen <arve.knudsen@gmail.com> Co-authored-by: Julius Hinze <juliusmh@proton.me>
Reverts #16730 and #16760 This is being done because we've noticed a problem in the spec that could lead to name collisions if attributes name, version or schema_url are added to the scope. They would collide with the already reserved labels otel_scope_name, otel_scope_version and otel_scope_schema_url. Since this new configuration option never made it into a release, we can safely remove it from the 3.5 release. We'll sort this out for the 3.6 release Signed-off-by: Arthur Silva Sens <arthursens2005@gmail.com>
For consistent terminology, as it's a similar operation to promoting OTel resource attributes to metric labels, rename the
otlp.convert_scope_metadata
configuration parameter tootlp.promote_scope_metadata
. Thanks to @colega for pointing out them being similar.Follow-up to #16730.