Skip to content

Implement new SemConv exporter health metrics #7265

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

Draft
wants to merge 14 commits into
base: main
Choose a base branch
from

Conversation

JonasKunz
Copy link
Contributor

@JonasKunz JonasKunz commented Apr 10, 2025

This PR implements the new, experimental exporter health metrics defined in semantic conventions. The other metrics will be added in follow-up PRs.
This PR also already included metric-exporter health metrics which are part of an open semconv PR but I think that PR is close to reaching a consensus.

We already have some experimental health metrics in the SDK, which I intend to eventually replace with the new ones from semantic conventions. I'm envisioning the replacement process as follows:

  • Implement the new health metrics in a series of PRs, but have them opt-in and keep reporting the legacy metrics by default
  • Add autoconfiguration support to configure the health metrics level: e.g. on, off, legacy and maybe in the future extended for opt-in attributes / metrics
  • Switch the default setting from legacy to on, this will be a breaking change
  • After some grace period remove support for the legacy metrics

This PR is designed with the eventual removal of support for the legacy metrics in mind:

  • The new metrics can be reported easily via the ExporterMetrics class
  • An ExporterMetricsAdapter is available which mimics the ExporterMetrics api, but can fallback to reporting the legacy metrics instead

This will allow us to easily remove the legacy metrics later on: Simply replace the usages of ExporterMetricsAdapter with ExporterMetrics and delete the adapter and related code.

@jack-berg
Copy link
Member

Hey @JonasKunz give me a heads up when you think this is ready for review. Happy to start with a high level review while its still in draft!

@JonasKunz
Copy link
Contributor Author

@jack-berg a high level review would be appreciated! I'm happy with the overall structure and would mostly polish from now on, so it would be great to get your feedback before I polish things we'll end up changing anyway.

I've updated the PR comment to give an introduction on how I envision the feature implementation in general.

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.

2 participants