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

Remove the unneeded Observe method from the async instruments #3586

Merged
merged 22 commits into from
Jan 25, 2023

Conversation

MrAlias
Copy link
Contributor

@MrAlias MrAlias commented Jan 11, 2023

Resolve #3590

Following #3584, the Observe method of the asynchronous instruments is no longer needed. It is not expected to ever be called by a user. Persisting this method only provides the opportunity to log an error and cause confusion.

Additionally, the specification does not specify this method. Therefore, there is no reason to keep it.

@MrAlias MrAlias added the area:metrics Part of OpenTelemetry Metrics label Jan 11, 2023
@codecov
Copy link

codecov bot commented Jan 11, 2023

Codecov Report

Merging #3586 (c16ee58) into main (c7e2679) will increase coverage by 0.2%.
The diff coverage is 93.9%.

Additional details and impacted files

Impacted file tree graph

@@           Coverage Diff           @@
##            main   #3586     +/-   ##
=======================================
+ Coverage   79.1%   79.4%   +0.2%     
=======================================
  Files        170     170             
  Lines      12654   12628     -26     
=======================================
+ Hits       10020   10028      +8     
+ Misses      2422    2390     -32     
+ Partials     212     210      -2     
Impacted Files Coverage Δ
metric/instrument/asyncfloat64.go 100.0% <ø> (ø)
metric/instrument/asyncint64.go 100.0% <ø> (ø)
metric/internal/global/instruments.go 60.8% <ø> (+9.0%) ⬆️
metric/noop.go 60.3% <ø> (-1.9%) ⬇️
sdk/metric/meter.go 89.7% <92.0%> (+3.2%) ⬆️
sdk/metric/instrument.go 95.7% <100.0%> (-0.1%) ⬇️
sdk/trace/batch_span_processor.go 81.1% <0.0%> (+0.8%) ⬆️

@MrAlias MrAlias changed the title [PoC] Remove the unneeded Observe method from the async instruments Remove the unneeded Observe method from the async instruments Jan 19, 2023
@MrAlias MrAlias added this to the Metric v0.35.0 milestone Jan 19, 2023
@MrAlias MrAlias marked this pull request as ready for review January 19, 2023 17:52
sdk/metric/meter.go Show resolved Hide resolved
sdk/metric/meter.go Show resolved Hide resolved
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
No open projects
Status: Done
Status: Done
Development

Successfully merging this pull request may close these issues.

Remove Observable Instrument Observe Method
4 participants