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

Unique instrument checking #580

Merged
merged 16 commits into from
Mar 24, 2020
Merged

Unique instrument checking #580

merged 16 commits into from
Mar 24, 2020

Conversation

jmacd
Copy link
Contributor

@jmacd jmacd commented Mar 23, 2020

This adds a new API package api/metric/registry that exposes a MeterImpl wrapper for use by SDKs. It's used here by the default SDK and the mock SDK. The global implementation uses exported methods of the new package directly, because it doesn't implement MeterImpl.

Renames internal/metric.Meter to MeterImpl. Renames api/global/internal.obsImpl to asyncImpl.

Resolves #514

@jmacd jmacd added the area:metrics Part of OpenTelemetry Metrics label Mar 23, 2020
api/global/internal/meter.go Outdated Show resolved Hide resolved
api/global/internal/meter.go Show resolved Hide resolved
api/global/internal/meter_test.go Show resolved Hide resolved
api/global/internal/registry_test.go Outdated Show resolved Hide resolved
api/global/internal/registry_test.go Outdated Show resolved Hide resolved
api/metric/registry/registry_test.go Outdated Show resolved Hide resolved
api/metric/registry/registry_test.go Outdated Show resolved Hide resolved
api/metric/registry/registry_test.go Outdated Show resolved Hide resolved
api/metric/api.go Outdated Show resolved Hide resolved
api/metric/sdkhelpers.go Show resolved Hide resolved
@jmacd
Copy link
Contributor Author

jmacd commented Mar 23, 2020

PTAL :)

Copy link
Member

@krnowak krnowak left a comment

Choose a reason for hiding this comment

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

Found some small issues. Needs rebase.

api/global/internal/meter.go Outdated Show resolved Hide resolved
api/global/internal/registry_test.go Show resolved Hide resolved
api/metric/api.go Outdated Show resolved Hide resolved
api/metric/registry/registry.go Outdated Show resolved Hide resolved
api/metric/registry/registry_test.go Outdated Show resolved Hide resolved
api/global/internal/meter.go Outdated Show resolved Hide resolved
Copy link
Contributor

@MrAlias MrAlias left a comment

Choose a reason for hiding this comment

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

Overall looks good, nothing blocking.

api/metric/registry/registry.go Outdated Show resolved Hide resolved
api/metric/registry/registry.go Show resolved Hide resolved
@jmacd jmacd merged commit 06f833e into open-telemetry:master Mar 24, 2020
@jmacd jmacd deleted the jmacd/uniq2 branch March 24, 2020 17:54
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.

Ensure metric name and kind uniqueness
3 participants