Skip to content

[exporter/prometheus_remote_write] Add exporter ID to WAL telemetry attributes - #49944

Merged
songy23 merged 1 commit into
open-telemetry:mainfrom
charanck9:prw-wal-exporter-attribute
Aug 5, 2026
Merged

[exporter/prometheus_remote_write] Add exporter ID to WAL telemetry attributes#49944
songy23 merged 1 commit into
open-telemetry:mainfrom
charanck9:prw-wal-exporter-attribute

Conversation

@charanck9

Copy link
Copy Markdown
Contributor

Description

When running multiple prometheusremotewrite exporter instances (e.g.,
prometheusremotewrite/ext and prometheusremotewrite/internal), the WAL telemetry
metrics (like wal_lag) have no exporter label, making it impossible to tell which
instance they belong to. The exporter-level metrics correctly include this label,
but the WAL metrics initialize otelAttrs as an empty slice.

For example, otelcol_exporter_prometheusremotewrite_wal_lag currently has no
component identifier:
otelcol_exporter_prometheusremotewrite_wal_lag{instance="ip:port", job="https",
namespace="test", pod_name="collector-6b97f867d4-dhds4", service_name="collector"}

This change sets the "exporter" attribute (the component ID) on the WAL telemetry
so the metrics can be distinguished per exporter instance.

Link to tracking issue

#49130
Fixes

Testing

Documentation

Authorship

  • [✓ ] I, a human, wrote this pull request description myself.

@charanck9
charanck9 requested review from a team, ArthurSens and dashpole as code owners July 29, 2026 10:03
@github-actions github-actions Bot added the first-time contributor PRs made by new contributors label Jul 29, 2026
@github-actions

Copy link
Copy Markdown
Contributor

Welcome, contributor! Thank you for your contribution to opentelemetry-collector-contrib.

Important reminders:

  • Read our Contributing Guidelines.
  • Sign the CLA if you haven't already.
  • Follow the OpenTelemetry Generative AI policy: disclose any AI use in your contribution, and communicate (PR descriptions, review replies) in your own words rather than AI-generated text.
  • Give reviewers at least a few days before pinging them for feedback.
  • If you need help with general setup, development process, or contributor etiquette, ask in #opentelemetry-new-contributors.
  • First-time contributors should have at most one PR not marked as draft until their first PR is merged.
  • If your change isn't one of our priority components, reviews may take more time.
  • Raise technical or Collector-specific questions in #otel-collector-dev or a Collector SIG meeting.

@opentelemetry-pr-dashboard

opentelemetry-pr-dashboard Bot commented Jul 29, 2026

Copy link
Copy Markdown

Pull request dashboard status

Merged · refreshed 2026-08-05 23:12 UTC

Status above doesn't look right?
  • Anything look wrong? Report it with what you expected; it helps us improve the dashboard.

Comment thread exporter/prometheusremotewriteexporter/wal_test.go Outdated

@dashpole dashpole 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.

We would ideally use otelcol.component.id, but the rest of the prw exporter self-obs metrics already use exporter. We can make that switch at a future point for the whole exporter.

@charanck9
charanck9 force-pushed the prw-wal-exporter-attribute branch 2 times, most recently from 6ec403f to c8cf3d8 Compare August 5, 2026 07:59
…ttributes

Signed-off-by: charanck9 <charan.ulasala.ext@ericsson.com>
@charanck9
charanck9 force-pushed the prw-wal-exporter-attribute branch from c8cf3d8 to e1e7f6c Compare August 5, 2026 08:03

@charanck9 charanck9 left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

comments are addressed

@ArthurSens ArthurSens left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thanks!

@ArthurSens ArthurSens added the ready to merge Code review completed; ready to merge by maintainers label Aug 5, 2026
@songy23
songy23 merged commit 6dfefe3 into open-telemetry:main Aug 5, 2026
197 checks passed
@otelbot

otelbot Bot commented Aug 5, 2026

Copy link
Copy Markdown
Contributor

Thank you for your contribution @charanck9! 🎉 We would like to hear from you about your experience contributing to OpenTelemetry by taking a few minutes to fill out this survey.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

exporter/prometheusremotewrite first-time contributor PRs made by new contributors ready to merge Code review completed; ready to merge by maintainers

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants