Skip to content

Conversation

perebaj
Copy link
Contributor

@perebaj perebaj commented Aug 10, 2025

According to this thread we would like to send type and unit data to be accessed on the PRW2. This will unlock some issues that we are facing on the OTEL side. This because some metrics can be sent without type even if the feature flag is set, causing errors in the parsing process.

Related issue on otel-collector-contrib -> open-telemetry/opentelemetry-collector-contrib#41840 (comment)

Which issue(s) does the PR fix:

Partially fixes: #16610.

Does this PR introduce a user-facing change?

NONE

@ChetanFTW
Copy link

Hey @perebaj, I think you forget to sign off your commit DCO Failed !! In checks

@perebaj
Copy link
Contributor Author

perebaj commented Aug 12, 2025

Hey @perebaj, I think you forget to sign off your commit DCO Failed !! In checks

Thanks. I will take a look.

Copy link
Member

@ArthurSens ArthurSens left a comment

Choose a reason for hiding this comment

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

Looks like you're in a good direction, besides the test 😛

Also, probably a good idea to build prometheus (make build), start it and test sending data to the prometheusremotewrite receiver to see if things work as you expect

@perebaj perebaj force-pushed the chore/send-unit-type-when-feature-flag-enabled branch from 5ee4585 to 87af644 Compare August 18, 2025 00:40
@perebaj perebaj changed the title chore: send Unit and Type when feature flag is enabled storage-prw: send Unit and Type when feature flag is enabled Aug 21, 2025
@perebaj perebaj marked this pull request as ready for review August 21, 2025 02:10
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.

Amazing work, I kind of need this now, so would love to have it merged 🤗

Generally looks ok, just some questions around config field and some flows.

Relates to #16610

@perebaj perebaj force-pushed the chore/send-unit-type-when-feature-flag-enabled branch from 8deaa9a to 4273b78 Compare August 22, 2025 13:09
perebaj added 11 commits August 22, 2025 11:04
Signed-off-by: perebaj <perebaj@gmail.com>
Signed-off-by: perebaj <perebaj@gmail.com>
Signed-off-by: perebaj <perebaj@gmail.com>
Signed-off-by: perebaj <perebaj@gmail.com>
Signed-off-by: perebaj <perebaj@gmail.com>
Signed-off-by: perebaj <perebaj@gmail.com>
Signed-off-by: perebaj <perebaj@gmail.com>
Signed-off-by: perebaj <perebaj@gmail.com>
Signed-off-by: perebaj <perebaj@gmail.com>
Signed-off-by: perebaj <perebaj@gmail.com>
@bwplotka
Copy link
Member

Can you rebase/squash commits to only relevant ones?

@perebaj perebaj force-pushed the chore/send-unit-type-when-feature-flag-enabled branch from 417ad72 to 27b045c Compare August 22, 2025 14:06
Signed-off-by: perebaj <perebaj@gmail.com>
Signed-off-by: perebaj <perebaj@gmail.com>
Signed-off-by: perebaj <perebaj@gmail.com>
Signed-off-by: perebaj <perebaj@gmail.com>
Signed-off-by: perebaj <perebaj@gmail.com>
@perebaj perebaj requested review from ArthurSens and bwplotka August 28, 2025 02:44
Signed-off-by: perebaj <perebaj@gmail.com>
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 for iterating this!

There are bunch of nits to make it perfect, but otherwise LGTM!

Signed-off-by: perebaj <perebaj@gmail.com>
…nitLabels

Signed-off-by: perebaj <perebaj@gmail.com>
Signed-off-by: perebaj <perebaj@gmail.com>
Signed-off-by: perebaj <perebaj@gmail.com>
Signed-off-by: perebaj <perebaj@gmail.com>
Signed-off-by: perebaj <perebaj@gmail.com>
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.

Amazing! Thanks for prompt work on this 💪🏽

Signed-off-by: Bartlomiej Plotka <bwplotka@gmail.com>
@bwplotka bwplotka enabled auto-merge (squash) August 29, 2025 03:52
@bwplotka bwplotka merged commit c808a71 into prometheus:main Aug 29, 2025
28 checks passed
bwplotka added a commit that referenced this pull request Aug 29, 2025
bwplotka added a commit that referenced this pull request Aug 29, 2025
siavashs pushed a commit to siavashs/prometheus that referenced this pull request Aug 29, 2025
…ed (prometheus#17033)

* chore: send Unit and Type when feature flag is enabled

Signed-off-by: perebaj <perebaj@gmail.com>

* remove unused code and comments

Signed-off-by: perebaj <perebaj@gmail.com>

* remove unreal scenario

Signed-off-by: perebaj <perebaj@gmail.com>

* remove unused if

Signed-off-by: perebaj <perebaj@gmail.com>

* remove unused labels

Signed-off-by: perebaj <perebaj@gmail.com>

* linter

Signed-off-by: perebaj <perebaj@gmail.com>

* enable type and unit through remotewrite config

Signed-off-by: perebaj <perebaj@gmail.com>

* remove test comment and capture type and unit when flag is enabled

Signed-off-by: perebaj <perebaj@gmail.com>

* gofumpt

Signed-off-by: perebaj <perebaj@gmail.com>

* modelTypeToWriteV2Type

Signed-off-by: perebaj <perebaj@gmail.com>

* use NewMetadataFromLabels

Signed-off-by: perebaj <perebaj@gmail.com>

* capture feature flag from main

Signed-off-by: perebaj <perebaj@gmail.com>

* simplifying logic

Signed-off-by: perebaj <perebaj@gmail.com>

* remove unused function

Signed-off-by: perebaj <perebaj@gmail.com>

* formatting code

Signed-off-by: perebaj <perebaj@gmail.com>

* gofumpt

Signed-off-by: perebaj <perebaj@gmail.com>

* remove public var: EnableTypeAndUnitLabels

Signed-off-by: perebaj <perebaj@gmail.com>

* remove enableTypeAndUnitLabels from TestPopulateV2TimeSeries_typeAndUnitLabels

Signed-off-by: perebaj <perebaj@gmail.com>

* remove enableTypeAndUnitLabels from main

Signed-off-by: perebaj <perebaj@gmail.com>

* use schema helper to populate metadata

Signed-off-by: perebaj <perebaj@gmail.com>

* remove metadata since nil is the default value

Signed-off-by: perebaj <perebaj@gmail.com>

* add TestPopulateV2TimeSeries_UnexpectedMetadata

Signed-off-by: perebaj <perebaj@gmail.com>

* Update storage/remote/queue_manager_test.go

Signed-off-by: Bartlomiej Plotka <bwplotka@gmail.com>

---------

Signed-off-by: perebaj <perebaj@gmail.com>
Signed-off-by: Bartlomiej Plotka <bwplotka@gmail.com>
Co-authored-by: Bartlomiej Plotka <bwplotka@gmail.com>
siavashs pushed a commit to siavashs/prometheus that referenced this pull request Aug 29, 2025
siavashs pushed a commit to siavashs/prometheus that referenced this pull request Aug 29, 2025
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.

[meta] PROM-39 type-and-unit-labels stability
4 participants