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(otel): add NewMetricsHook, use api interface instead of SDK type #530

Merged
merged 2 commits into from
Jun 17, 2024

Conversation

morigs
Copy link
Contributor

@morigs morigs commented Jun 14, 2024

This PR

  • Changes NewMetricsHookForProvider to accept MeterProvider interface from api instead of sdk type. This allows to pass any compatible implementation
  • Adds NewMetricsHook which uses global default MeterProvider
  • Tidies deps

Related Issues

Fixes #527

Signed-off-by: Igor Morozov <morozov.ig.s@gmail.com>
@morigs morigs requested a review from a team as a code owner June 14, 2024 16:42
@github-actions github-actions bot requested a review from Kavindu-Dodan June 14, 2024 16:42
Copy link
Member

@toddbaert toddbaert left a comment

Choose a reason for hiding this comment

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

Nice catch!

@toddbaert
Copy link
Member

I'll merge this in the next day or 2, but giving a bit of time for others to comment.

"github.com/open-feature/go-sdk/openfeature"
"go.opentelemetry.io/otel"
Copy link
Contributor

Choose a reason for hiding this comment

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

+1 for this change

@toddbaert
Copy link
Member

Good enough for me.

@toddbaert toddbaert merged commit 0472b0d into open-feature:main Jun 17, 2024
5 checks passed
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.

Otel metrics hooks constructor should accept MeterProvider from api, not SDK
3 participants