-
Notifications
You must be signed in to change notification settings - Fork 2.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[receiver/prometheusremotewrite] Parse labels #35656
[receiver/prometheusremotewrite] Parse labels #35656
Conversation
5f5d327
to
b36ce75
Compare
I don't think we should be putting metric labels into the resource attributes. |
I was in doubt about this one. Since there are three layers of attributes, how do we know where labels should go when transformed into OpenTelemetry metrics? |
Job + Info become service.* labels. Other labels on prom metrics become labels on the otel metric. Labels on target_info become attributes on the resource. The tricky part is that target_info might end up in a different request? We can deal with that in a follow-up |
Oof, I honestly haven't thought about that. This makes this receiver a lot more difficult to write 😬 |
b36ce75
to
17df302
Compare
17df302
to
3854a92
Compare
3854a92
to
1d30b01
Compare
1d30b01
to
b59d07e
Compare
Alright, PR updated to only handle |
b59d07e
to
1c9ff80
Compare
f862fe3
to
99e2d15
Compare
…c attributes Signed-off-by: Arthur Silva Sens <[email protected]>
Signed-off-by: Arthur Silva Sens <[email protected]>
Signed-off-by: Arthur Silva Sens <[email protected]>
Signed-off-by: Arthur Silva Sens <[email protected]>
99e2d15
to
0f5a554
Compare
Signed-off-by: Arthur Silva Sens <[email protected]>
Signed-off-by: Arthur Silva Sens <[email protected]>
Signed-off-by: Arthur Silva Sens <[email protected]>
Signed-off-by: Arthur Silva Sens <[email protected]>
Signed-off-by: Arthur Silva Sens <[email protected]>
#### Description This PR builds on top of open-telemetry#35535, open-telemetry#35565 and open-telemetry#35624. Here we're parsing labels into resource/metric attributes. It's still not great because resource attributes (with exception to `service.namespace`, `service.name` and `service.name.id`) are encoded into a special metric called `target_info`. Metrics related to specific target infos may arrive in separate write requests, so it may be impossible to build the full OTLP metric in a stateless way. In this PR I'm ignoring this problem 😛, and transforming `job` and `instance` labels into resource attributes, while all other labels become scope attributes. Please focus on the latest commit when reviewing this PR :) 1c9ff80 --------- Signed-off-by: Arthur Silva Sens <[email protected]>
#### Description This PR builds on top of open-telemetry#35535, open-telemetry#35565 and open-telemetry#35624. Here we're parsing labels into resource/metric attributes. It's still not great because resource attributes (with exception to `service.namespace`, `service.name` and `service.name.id`) are encoded into a special metric called `target_info`. Metrics related to specific target infos may arrive in separate write requests, so it may be impossible to build the full OTLP metric in a stateless way. In this PR I'm ignoring this problem 😛, and transforming `job` and `instance` labels into resource attributes, while all other labels become scope attributes. Please focus on the latest commit when reviewing this PR :) 1c9ff80 --------- Signed-off-by: Arthur Silva Sens <[email protected]>
Description
This PR builds on top of #35535, #35565 and #35624.
Here we're parsing labels into resource/metric attributes. It's still not great because resource attributes (with exception to
service.namespace
,service.name
andservice.name.id
) are encoded into a special metric calledtarget_info
. Metrics related to specific target infos may arrive in separate write requests, so it may be impossible to build the full OTLP metric in a stateless way.In this PR I'm ignoring this problem 😛, and transforming
job
andinstance
labels into resource attributes, while all other labels become scope attributes.Please focus on the latest commit when reviewing this PR :)
1c9ff80