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

Make the global Meter useful for registering metric instruments before the SDK is initialized #388

Closed
jmacd opened this issue Dec 18, 2019 · 0 comments · Fixed by #392
Closed
Assignees
Labels
area:metrics Part of OpenTelemetry Metrics
Milestone

Comments

@jmacd
Copy link
Contributor

jmacd commented Dec 18, 2019

There is a stale OTEP here: open-telemetry/oteps#45
It may not describe a real problem in many languages, but it makes a proposal that should at least be followed in Go and probably several other languages.

To make concrete progress in this repository, we should make the global Meter instance a new "forwarding" implementation. It will support allocating metric instruments and label sets before the global instance is registered. It can use a sync.Once object for this purpose. Once the global instance is registered, objects returned by the global instance should begin forwarding to the installed SDK.

Otherwise, metrics allocated on the global Meter implementation are no-op instruments that will remain no-op instruments for the process lifetime.

@jmacd jmacd added the area:metrics Part of OpenTelemetry Metrics label Dec 18, 2019
@jmacd jmacd self-assigned this Dec 18, 2019
@pellared pellared added this to the untracked milestone Nov 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area:metrics Part of OpenTelemetry Metrics
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants