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

Adds metrics Global #2660

Merged
merged 27 commits into from Mar 22, 2022
Merged

Conversation

MadVikingGod
Copy link
Contributor

Closes: #2650

This creates a global package that can eventually be moved to internal/global when the metrics API is stable. Users should use the metric/global API to set and Obtain the global MeterProvider, which will remain and be deprecated after the API is stable.

@codecov
Copy link

codecov bot commented Mar 7, 2022

Codecov Report

Merging #2660 (16341b8) into main (9a51174) will increase coverage by 0.5%.
The diff coverage is 82.0%.

Impacted file tree graph

@@           Coverage Diff           @@
##            main   #2660     +/-   ##
=======================================
+ Coverage   75.9%   76.5%   +0.5%     
=======================================
  Files        174     178      +4     
  Lines      11748   12072    +324     
=======================================
+ Hits        8926    9244    +318     
+ Misses      2612    2603      -9     
- Partials     210     225     +15     
Impacted Files Coverage Δ
metric/global/global.go 0.0% <0.0%> (ø)
metric/internal/global/instruments.go 66.4% <66.4%> (ø)
metric/internal/global/meter.go 96.2% <96.2%> (ø)
metric/internal/global/state.go 100.0% <100.0%> (ø)
exporters/jaeger/jaeger.go 90.3% <0.0%> (-0.9%) ⬇️
metric/config.go 22.7% <0.0%> (+22.7%) ⬆️
metric/nonrecording/meter.go 100.0% <0.0%> (+100.0%) ⬆️
metric/nonrecording/instruments.go 100.0% <0.0%> (+100.0%) ⬆️

metric/global/global.go Outdated Show resolved Hide resolved
metric/global/global.go Outdated Show resolved Hide resolved
metric/internal/global/instruments_test.go Outdated Show resolved Hide resolved
metric/internal/global/meter_test.go Outdated Show resolved Hide resolved
Copy link
Contributor

@dashpole dashpole left a comment

Choose a reason for hiding this comment

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

Lgtm after comments are addressed

Changed name of global API.
Added stop to all race tests go routine.
Added race tests for other instruments.
metric/global/global.go Outdated Show resolved Hide resolved
metric/internal/global/meter.go Outdated Show resolved Hide resolved
metric/internal/global/meter.go Show resolved Hide resolved
metric/internal/global/meter.go Outdated Show resolved Hide resolved
metric/internal/global/state_test.go Outdated Show resolved Hide resolved
metric/internal/global/meter_test.go Outdated Show resolved Hide resolved
metric/internal/global/meter_test.go Outdated Show resolved Hide resolved
metric/internal/global/meter_test.go Outdated Show resolved Hide resolved
metric/internal/global/meter_test.go Outdated Show resolved Hide resolved
metric/internal/global/meter_test.go Outdated Show resolved Hide resolved
@MrAlias MrAlias added this to the Metrics API for 1.0 milestone Mar 10, 2022
MadVikingGod and others added 2 commits March 11, 2022 19:43
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
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.

🥇

CHANGELOG.md Outdated Show resolved Hide resolved
@MrAlias MrAlias merged commit 8a7dcd9 into open-telemetry:main Mar 22, 2022
@MrAlias MrAlias mentioned this pull request Mar 23, 2022
@MadVikingGod MadVikingGod deleted the mvg/metrics-global branch February 21, 2023 19:57
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.

Reimplement the global package for metrics.
6 participants