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

Revert "Move global metric back to otel/metric/global for minor release (#3986)" #4039

Merged
merged 7 commits into from
May 2, 2023

Conversation

MrAlias
Copy link
Contributor

@MrAlias MrAlias commented Apr 28, 2023

This reverts commit 8dba38e.

Resolves #4036

@MrAlias MrAlias added pkg:API Related to an API package area:metrics Part of OpenTelemetry Metrics labels Apr 28, 2023
@MrAlias MrAlias added this to the v1.16.0-rc.1 milestone Apr 28, 2023
@MrAlias MrAlias changed the title Revert "(#3986)" Revert #3986 Apr 28, 2023
@MrAlias MrAlias changed the title Revert #3986 Revert move of global Meter back to otel/metric (#3986) Apr 28, 2023
@MrAlias MrAlias changed the title Revert move of global Meter back to otel/metric (#3986) Revert "Move global metric back to otel/metric/global for minor release (#3986)" Apr 28, 2023
@codecov
Copy link

codecov bot commented Apr 28, 2023

Codecov Report

Merging #4039 (188cb2c) into main (5814858) will increase coverage by 0.0%.
The diff coverage is 61.5%.

Additional details and impacted files

Impacted file tree graph

@@          Coverage Diff          @@
##            main   #4039   +/-   ##
=====================================
  Coverage   82.2%   82.2%           
=====================================
  Files        176     175    -1     
  Lines      13058   13058           
=====================================
+ Hits       10736   10740    +4     
+ Misses      2101    2097    -4     
  Partials     221     221           
Impacted Files Coverage Δ
internal/global/instruments.go 60.8% <0.0%> (ø)
internal/global/meter.go 93.8% <0.0%> (ø)
metric.go 66.6% <33.3%> (ø)
internal/global/state.go 100.0% <100.0%> (ø)

... and 1 file with indirect coverage changes

@MrAlias MrAlias merged commit 17903bc into open-telemetry:main May 2, 2023
@MrAlias MrAlias deleted the revert-3986 branch May 2, 2023 18:15
felipe-lee added a commit to transcom/mymove that referenced this pull request Jun 1, 2023
The only breaking change I saw was the removal of the `otel/metric/global` package. We instead need to use the base `otel` package, and the method names changed a bit:

1.16.0-rc.1 Relevant Notes:

* The `go.opentelemetry.io/otel/metric/global` package is removed. Use `go.opentelemetry.io/otel` instead. [otel #4039](open-telemetry/opentelemetry-go#4039)
* Support global `MeterProvider` in `go.opentelemetry.io/otel`. [otel #4039](open-telemetry/opentelemetry-go#4039)
    * Use `Meter` for a `metric.Meter` from the global `metric.MeterProvider`.
    * Use `GetMeterProivder` for a global `metric.MeterProvider`.
    * Use `SetMeterProivder` to set the global `metric.MeterProvider`.

JIRA Ticket: MB-15974
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 pkg:API Related to an API package
Projects
No open projects
Status: Done
Development

Successfully merging this pull request may close these issues.

Revert "Move global metric back to otel/metric/global for minor release"
3 participants