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

feat(otelcol/exp/prom): add support for resource_to_telemetry_conversion #5807

Merged

Conversation

hainenber
Copy link
Contributor

PR Description

Support conversion of OTEL's resource attributes to Prometheus-compatible datapoint attributes. Strongly inspired by OTEL's contributor implementation

Which issue(s) this PR fixes

Closes #5631

Notes to the Reviewer

PR Checklist

  • CHANGELOG.md updated
  • Documentation added
  • Tests updated
  • Config converters updated

@clayton-cornell clayton-cornell added the type/docs Docs Squad label across all Grafana Labs repos label Nov 21, 2023
@rfratto
Copy link
Member

rfratto commented Nov 23, 2023

Thanks @hainenber!

@ptodev Can you review this one?

Copy link
Contributor

@ptodev ptodev left a comment

Choose a reason for hiding this comment

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

Thank you! LGTM - I just added a few minor suggestions.

test_metric_gauge{bar_one="bar",foo_one="foo",instance="instance",service_instance_id="instance",job="myservice",service_name="myservice",raw="test"} 1234.56
`,
enableOpenMetrics: true,
resourceToTelemetryConversion: true,
Copy link
Contributor

Choose a reason for hiding this comment

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

It'd be nice to have a test or two where we have resource attributes but resourceToTelemetryConversion: false

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Added in latest commit. PTAL. Thanks!

@hainenber hainenber force-pushed the support-resource-to-telemetry-conversion branch from 65df9d7 to 4077196 Compare November 25, 2023 08:36
@ptodev ptodev merged commit 9fdb57c into grafana:main Nov 27, 2023
@github-actions github-actions bot added the frozen-due-to-age Locked due to a period of inactivity. Please open new issues or PRs if more discussion is needed. label Feb 21, 2024
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Feb 21, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
frozen-due-to-age Locked due to a period of inactivity. Please open new issues or PRs if more discussion is needed. type/docs Docs Squad label across all Grafana Labs repos
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Support resource_to_telemetry_conversion in otelcol.exporter.prometheus
4 participants