fix: duplicated instance label from autoconversion#1141
Merged
Conversation
Signed-off-by: ferhat elmas <elmas.ferhat@gmail.com>
Contributor
There was a problem hiding this comment.
Pull request overview
This PR adjusts the OpenTelemetry Collector configuration used by this repo’s monitoring setup to prevent service.instance.id from being auto-converted into Prometheus’s reserved instance label (and thereby duplicating/conflicting with the host instance label), while preserving the instance identity as an explicit metric label.
Changes:
- Add a Collector
transformprocessor to delete theservice.instance.idresource attribute before Prometheus conversion/export. - Update metrics pipelines to include the new processor in the processing chain.
- Add a unit test asserting the Collector config removes
service.instance.id.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
src/internal/monitoring/otel-metrics.test.ts |
Adds a test to ensure the Collector config deletes service.instance.id at the resource level. |
monitoring/otel/config/otel-collector-config.yml |
Introduces a transform processor to drop service.instance.id from resource attributes and wires it into metrics pipelines. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
fenos
approved these changes
Jun 8, 2026
Coverage Report for CI Build 27142854893Coverage decreased (-0.006%) to 76.432%Details
Uncovered ChangesNo uncovered changes found. Coverage RegressionsNo coverage regressions found. Coverage Stats💛 - Coveralls |
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
What kind of change does this PR introduce?
Bug fix
What is the current behavior?
service.instance.idis automatically converted to reservedinstanceand duplicates.What is the new behavior?
Drop
service.instance.idand keep convertedservice_instance_id.Additional context
Related to #1134