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: set global meter provider when configureMeterProvider is not defined #1504

Conversation

pragmaticivan
Copy link
Contributor

If you want to create a custom metric, there's no way to access the wrapper metric provider in the lambda code.

Usage:

const meter = metrics.getMeterProvider().getMeter('default');

getMeterProvider will return the globally configured meter provider

@pragmaticivan pragmaticivan requested a review from a team August 30, 2024 21:44
@pragmaticivan pragmaticivan force-pushed the fix-set-global-meter-provider-js branch from 593bc92 to ff65cfa Compare August 30, 2024 21:52
Copy link
Member

@tylerbenson tylerbenson left a comment

Choose a reason for hiding this comment

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

Seems reasonable to me.

@serkan-ozal
Copy link
Contributor

good catch!

@pragmaticivan
Copy link
Contributor Author

Since we have a ticket targeting this as a bug, wondering if this should be released as a hotfix

@tylerbenson tylerbenson added bug Something isn't working javascript Pull requests that update Javascript code labels Sep 4, 2024
@tylerbenson tylerbenson merged commit aeb3e92 into open-telemetry:main Sep 4, 2024
10 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working javascript Pull requests that update Javascript code
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants