Skip to content
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

Allow Prometheus exporter to add resource attributes to metric attributes #3761

Merged

Conversation

asafm
Copy link
Contributor

@asafm asafm commented Nov 13, 2023

Fixes #3705

Changes

Allowing exporters (e.g. Prometheus exporter) to add the resource attributes to each exported metric attributes

@asafm asafm requested review from a team November 13, 2023 14:58
@asafm
Copy link
Contributor Author

asafm commented Nov 13, 2023

@dashpole I wasn't sure what to do with changelog and matrix

@asafm
Copy link
Contributor Author

asafm commented Nov 13, 2023

@dashpole What should I do with changelog and matrix?

@dashpole
Copy link
Contributor

I don't think this needs to be in the matrix. You can add to the changelog under Unreleased > Metrics something like "- add optional configuration for prometheus exporters to promote resource labels to metric labels (#3761)"

@asafm
Copy link
Contributor Author

asafm commented Nov 13, 2023

@dashpole Updated changelog

@asafm
Copy link
Contributor Author

asafm commented Nov 13, 2023

@MrAlias Can you take another look?

@MrAlias
Copy link
Contributor

MrAlias commented Nov 13, 2023

Please be sure to update the PR title.

Co-authored-by: jack-berg <34418638+jack-berg@users.noreply.github.com>
@asafm asafm changed the title Allow exporters to add resource attributes to metric attributes Allow Prometheus exporter to add resource attributes to metric attributes Nov 14, 2023
Copy link
Member

@arminru arminru left a comment

Choose a reason for hiding this comment

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

You might want to look at @pirgeo's proposal about how conflicts encountered while flattening are to be handled: #2736

Co-authored-by: David Ashpole <dashpole@google.com>
@asafm
Copy link
Contributor Author

asafm commented Nov 21, 2023

@cijothomas Can I resolve the conversation?

@asafm
Copy link
Contributor Author

asafm commented Nov 22, 2023

@cijothomas Who else is needed to approve?

@cijothomas
Copy link
Member

@cijothomas Who else is needed to approve?

I am not an owner to merge this, but I think its best to get another round of review from @jack-berg and @arminru who reviewed this PR earlier!

Copy link
Member

@jack-berg jack-berg left a comment

Choose a reason for hiding this comment

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

Small recommendations I think would improve the readability but content looks good.

specification/compatibility/prometheus_and_openmetrics.md Outdated Show resolved Hide resolved
specification/compatibility/prometheus_and_openmetrics.md Outdated Show resolved Hide resolved
specification/metrics/sdk_exporters/prometheus.md Outdated Show resolved Hide resolved
asafm and others added 3 commits November 22, 2023 21:55
Co-authored-by: jack-berg <34418638+jack-berg@users.noreply.github.com>
Co-authored-by: jack-berg <34418638+jack-berg@users.noreply.github.com>
Co-authored-by: jack-berg <34418638+jack-berg@users.noreply.github.com>
@asafm
Copy link
Contributor Author

asafm commented Nov 22, 2023

@jack-berg Ready to merge 🎉

@asafm
Copy link
Contributor Author

asafm commented Nov 26, 2023

@carlosalberto @dashpole Ready to merge

@carlosalberto carlosalberto merged commit 83b32c3 into open-telemetry:main Nov 27, 2023
7 checks passed
@asafm asafm deleted the prometheus-resource-attributes branch November 27, 2023 18:02
carlosalberto pushed a commit to carlosalberto/opentelemetry-specification that referenced this pull request Oct 31, 2024
…utes (open-telemetry#3761)

Fixes open-telemetry#3705 

## Changes

Allowing exporters (e.g. Prometheus exporter) to add the resource
attributes to each exported metric attributes
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.

Prometheus Exporter: Copy Resource attributes into each time-series attributes
10 participants