Skip to content

[RW2] Fix type and unit labels propagation in Remote Write v2 receiver to prioritize type-and-unit-labels feature#17387

Merged
bwplotka merged 3 commits intoprometheus:mainfrom
pipiland2612:type_unit_agent
Oct 31, 2025
Merged

[RW2] Fix type and unit labels propagation in Remote Write v2 receiver to prioritize type-and-unit-labels feature#17387
bwplotka merged 3 commits intoprometheus:mainfrom
pipiland2612:type_unit_agent

Conversation

@pipiland2612
Copy link
Contributor

@pipiland2612 pipiland2612 commented Oct 22, 2025

Which issue(s) does the PR fix:

Does this PR introduce a user-facing change?

[BUGFIX] Remote-write: Type and unit labels are now correctly propagated when receiving metrics via Remote Write v2 with the `type-and-unit-labels` feature flag enabled.

Signed-off-by: pipiland2612 <nguyen.t.dang.minh@gmail.com>
@pipiland2612
Copy link
Contributor Author

cc @bwplotka

Copy link
Member

@bwplotka bwplotka left a comment

Choose a reason for hiding this comment

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

Looks good! Just a readability nits, especially on the scope of this change. It's not ONLY fixing agent mode, but for all modes if the metadata is passed via metadata-wal-records feature or any other mechanism WHILE type and unit labels are also preserved.

NOTE: This means also that type-and-unit feature overrides metadata records. This should not matter, because we often take them from the same place on scrape, but due to bugs in scraping etc this could matter, so maybe we could mention this in our feature flags docs?

Signed-off-by: pipiland2612 <nguyen.t.dang.minh@gmail.com>
@pipiland2612
Copy link
Contributor Author

Hi @bwplotka, thanks for reviewing. PTAL debeff3. I have updated the docs and fix the test name and comments.

Copy link
Member

@bwplotka bwplotka left a comment

Choose a reason for hiding this comment

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

Thanks!

Some suggestion to docs; also please change PR title, and description (e.g. changelog) to mention it's not only agent mode please.

@pipiland2612 pipiland2612 changed the title [RW2] Fix Type and Units labels to correctly work on agent mode [RW2] Fix type and unit labels propagation in Remote Write v2 receiver to prioritize type-and-unit-labels Oct 28, 2025
@pipiland2612 pipiland2612 changed the title [RW2] Fix type and unit labels propagation in Remote Write v2 receiver to prioritize type-and-unit-labels [RW2] Fix type and unit labels propagation in Remote Write v2 receiver to prioritize type-and-unit-labels feature Oct 28, 2025
Signed-off-by: pipiland2612 <nguyen.t.dang.minh@gmail.com>
@pipiland2612
Copy link
Contributor Author

Hi @bwplotka, thanks for noticing me. I have updated the PR description, title and change the docs at 248ddd8. PTAL. Thanks!

Copy link
Member

@bwplotka bwplotka left a comment

Choose a reason for hiding this comment

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

Thanks!

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.

[RW2] Type and unit labels not applied when using Prometheus Agent

2 participants