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 Meter a struct, simplify the global Meter #709

Merged
merged 11 commits into from
May 12, 2020

Conversation

jmacd
Copy link
Contributor

@jmacd jmacd commented May 9, 2020

This PR makes the API more sustainable, making Meter a strucrt and requiring that SDKs use the MeterImpl interface. The global package simplified, and this will make it easier to add batch observer callbacks and new instruments.

A couple of related simplifications:

  • Meter{} is a no-op, no more NoopMeter
  • Observer result types become structs, no need for an interface.

@jmacd jmacd added the area:metrics Part of OpenTelemetry Metrics label May 9, 2020
api/metric/api.go Outdated Show resolved Hide resolved
api/metric/api.go Outdated Show resolved Hide resolved
api/metric/sdkhelpers.go Show resolved Hide resolved
api/global/internal/meter.go Outdated Show resolved Hide resolved
api/global/internal/meter.go Show resolved Hide resolved
api/global/internal/meter.go Outdated Show resolved Hide resolved
@jmacd jmacd merged commit 32ddc16 into open-telemetry:master May 12, 2020
@jmacd jmacd deleted the jmacd/fixglobal branch May 12, 2020 03:29
@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 this pull request may close these issues.

3 participants