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

Metrics: Move the non-API types into sdkapi #2271

Merged
merged 14 commits into from Oct 14, 2021

Conversation

jmacd
Copy link
Contributor

@jmacd jmacd commented Sep 30, 2021

This is entirely changes of name with a few new tests, no functional changes.

The following interface types simply move:

Descriptor
MeterImpl
InstrumentImpl
SyncImpl
BoundSyncImpl
AsyncImpl
AsyncRunner
AsyncSingleRunner
AsyncBatchRunner

The following structs are moved:

Measurement
Observation

As the type structs are exposed to users, they have been given type aliases in the API.

The No-op implementations of sync and async instruments are no longer exported. New functions sdkapi.NewNoopAsyncInstrument() and sdkapi.NewNoopSyncInstrument() are provided instead.

This is a follow-on to #2197, which did all of the hard work in preparation for this change.

Fixes #2090.

@codecov
Copy link

codecov bot commented Sep 30, 2021

Codecov Report

Merging #2271 (4cbf562) into main (3d4ae8d) will increase coverage by 0.0%.
The diff coverage is 76.3%.

Impacted file tree graph

@@          Coverage Diff          @@
##            main   #2271   +/-   ##
=====================================
  Coverage   72.5%   72.6%           
=====================================
  Files        168     170    +2     
  Lines      11874   11873    -1     
=====================================
+ Hits        8611    8621   +10     
+ Misses      3029    3019   -10     
+ Partials     234     233    -1     
Impacted Files Coverage Δ
.../otlp/otlpmetric/internal/connection/connection.go 3.4% <0.0%> (-0.1%) ⬇️
...ers/otlp/otlpmetric/internal/otlpconfig/options.go 65.8% <ø> (ø)
...xporters/otlp/otlpmetric/otlpmetricgrpc/options.go 75.0% <0.0%> (-8.4%) ⬇️
...s/otlp/otlptrace/internal/connection/connection.go 16.2% <0.0%> (-0.3%) ⬇️
...ters/otlp/otlptrace/internal/otlpconfig/options.go 72.9% <ø> (ø)
exporters/otlp/otlptrace/otlptracegrpc/options.go 75.0% <0.0%> (-8.4%) ⬇️
metric/noop.go 100.0% <ø> (+69.2%) ⬆️
sdk/metric/processor/basic/basic.go 98.5% <ø> (ø)
sdk/metric/processor/reducer/reducer.go 100.0% <ø> (ø)
trace/config.go 63.7% <ø> (ø)
... and 26 more

CHANGELOG.md Outdated Show resolved Hide resolved
metric/metric.go Outdated Show resolved Hide resolved
CHANGELOG.md Outdated Show resolved Hide resolved
@MrAlias MrAlias merged commit 478dc4f into open-telemetry:main Oct 14, 2021
@jmacd
Copy link
Contributor Author

jmacd commented Oct 14, 2021

😀 🚀

@jmacd jmacd deleted the jmacd/all_sdkapi branch July 7, 2022 15:08
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.

Move Metrics SDK implementation types into metric/sdkapi sub-package
3 participants