Skip to content

fix: duplicated instance label from autoconversion#1141

Merged
ferhatelmas merged 1 commit into
masterfrom
ferhat/dup-instance
Jun 8, 2026
Merged

fix: duplicated instance label from autoconversion#1141
ferhatelmas merged 1 commit into
masterfrom
ferhat/dup-instance

Conversation

@ferhatelmas

Copy link
Copy Markdown
Member

What kind of change does this PR introduce?

Bug fix

What is the current behavior?

service.instance.id is automatically converted to reserved instance and duplicates.

What is the new behavior?

Drop service.instance.id and keep converted service_instance_id.

Additional context

Related to #1134

Signed-off-by: ferhat elmas <elmas.ferhat@gmail.com>
@ferhatelmas ferhatelmas requested a review from a team as a code owner June 8, 2026 13:59
Copilot AI review requested due to automatic review settings June 8, 2026 13:59

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

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 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 transform processor to delete the service.instance.id resource 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.

Comment thread monitoring/otel/config/otel-collector-config.yml
Comment thread monitoring/otel/config/otel-collector-config.yml
@coveralls

Copy link
Copy Markdown

Coverage Report for CI Build 27142854893

Coverage decreased (-0.006%) to 76.432%

Details

  • Coverage decreased (-0.006%) from the base build.
  • Patch coverage: No coverable lines changed in this PR.
  • No coverage regressions found.

Uncovered Changes

No uncovered changes found.

Coverage Regressions

No coverage regressions found.


Coverage Stats

Coverage Status
Relevant Lines: 11030
Covered Lines: 8861
Line Coverage: 80.34%
Relevant Branches: 6460
Covered Branches: 4507
Branch Coverage: 69.77%
Branches in Coverage %: Yes
Coverage Strength: 369.09 hits per line

💛 - Coveralls

@ferhatelmas ferhatelmas merged commit 79f7c44 into master Jun 8, 2026
27 checks passed
@ferhatelmas ferhatelmas deleted the ferhat/dup-instance branch June 8, 2026 14:08
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.

4 participants