-
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
prometheusreceiver: Don't ignore instance labels for internal metrics #14555
prometheusreceiver: Don't ignore instance labels for internal metrics #14555
Conversation
When we are scraping federated metrics, wouldn't we always want to take job + instance labels into account, not just for internal metrics? |
I believe the prometheus server target info is already preserved and made available in the resource of the scraped federated metrics. For example when I have a federated server scrape a collector's metric endpoint and* another collector scrape that federated endpoint I see:
|
If I scrape a federated endpoint, and it has two metrics which are identical except for job + instance (non-internal metrics), they would collide and experience this issue, right? It seems fairly safe to ~always take job + instance into account. |
IIUC, the issue isn't that we aren't preserving job + instance (it is in the resource, as you show), but that these two metrics end up "colliding":
Right? |
I think that's correct and am not sure why job and instance were deemed not useful. My proposed change was a minimal way to address clear collisions w/ federated scraping* but can see the value in not filtering them in any case. |
This PR was marked stale due to lack of activity. It will be closed in 14 days. |
9633a80
to
4a6154a
Compare
4a6154a
to
26536bb
Compare
0ac375d
to
c4e52cd
Compare
c4e52cd
to
6f7f501
Compare
I would prefer not filtering them in any cases here. |
This PR was marked stale due to lack of activity. It will be closed in 14 days. |
any update? @rmfitzpatrick |
@fatsheep9146 I've had to table this for a bit (using a global label as a workaround) but not filtering job and instance labels overall has several knock-on effects and seems to break expected resource attributes so requires a deeper awareness of the receiver than I have atm to do correctly. Will take another look with fresher eyes soon. |
Can you help me understand what the global label workaround is? |
This PR was marked stale due to lack of activity. It will be closed in 14 days. |
This PR was marked stale due to lack of activity. It will be closed in 14 days. |
Closed as inactive. Feel free to reopen if this PR is still being worked on. |
Hi, Any progress in this PR? |
Description:
Fixing a bug - In federated endpoint scraping cases internal labels are required to differentiate scraped metrics and receiver-internal ones. These changes take the metric name into consideration when establishing "not useful" labels for metric group identity.
Link to tracking Issue:
#14453
Testing:
ongoing - I'm having issues w/ my dev environment and running these tests reliably.Added basic unit tests for internal metric attributes.