Skip to content

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

Merged
carlosalberto merged 19 commits intoopen-telemetry:mainfrom
streamnative:prometheus-resource-attributes
Nov 27, 2023
Merged

Allow Prometheus exporter to add resource attributes to metric attributes#3761
carlosalberto merged 19 commits intoopen-telemetry:mainfrom
streamnative:prometheus-resource-attributes

Conversation

@asafm
Copy link
Copy Markdown
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
Copy Markdown
Contributor Author

asafm commented Nov 13, 2023

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

Comment thread specification/metrics/sdk.md Outdated
@asafm
Copy link
Copy Markdown
Contributor Author

asafm commented Nov 13, 2023

@dashpole What should I do with changelog and matrix?

@dashpole
Copy link
Copy Markdown
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)"

Comment thread specification/metrics/sdk_exporters/prometheus.md Outdated
@asafm
Copy link
Copy Markdown
Contributor Author

asafm commented Nov 13, 2023

@dashpole Updated changelog

@asafm
Copy link
Copy Markdown
Contributor Author

asafm commented Nov 13, 2023

@MrAlias Can you take another look?

Comment thread specification/metrics/sdk_exporters/prometheus.md
Comment thread specification/metrics/sdk_exporters/prometheus.md
@MrAlias
Copy link
Copy Markdown
Contributor

MrAlias commented Nov 13, 2023

Please be sure to update the PR title.

@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
Copy Markdown
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

Comment thread specification/metrics/sdk_exporters/prometheus.md
Comment thread specification/compatibility/prometheus_and_openmetrics.md Outdated
@asafm
Copy link
Copy Markdown
Contributor Author

asafm commented Nov 21, 2023

@cijothomas Can I resolve the conversation?

@asafm
Copy link
Copy Markdown
Contributor Author

asafm commented Nov 22, 2023

@cijothomas Who else is needed to approve?

@cijothomas
Copy link
Copy Markdown
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
Copy Markdown
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.

Comment thread specification/compatibility/prometheus_and_openmetrics.md Outdated
Comment thread specification/compatibility/prometheus_and_openmetrics.md Outdated
Comment thread specification/metrics/sdk_exporters/prometheus.md Outdated
@asafm
Copy link
Copy Markdown
Contributor Author

asafm commented Nov 22, 2023

@jack-berg Ready to merge 🎉

@asafm
Copy link
Copy Markdown
Contributor Author

asafm commented Nov 26, 2023

@carlosalberto @dashpole Ready to merge

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