Skip to content

Commit

Permalink
comment on two aliases
Browse files Browse the repository at this point in the history
  • Loading branch information
jmacd committed Oct 14, 2021
2 parents b63366e + d3d193a commit 4cbf562
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
1 change: 0 additions & 1 deletion CHANGELOG.md
Expand Up @@ -11,7 +11,6 @@ This project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.htm
## Changed

- Skip links with invalid span context. (#2275)

- Metrics API cleanup. The `metric/sdkapi` package has been created to relocate the API-to-SDK interface:
- The following interface types simply moved from `metric` to `metric/sdkapi`: `Descriptor`, `MeterImpl`, `InstrumentImpl`, `SyncImpl`, `BoundSyncImpl`, `AsyncImpl`, `AsyncRunner`, `AsyncSingleRunner`, and `AsyncBatchRunner`
- The following struct types moved and are replaced with type aliases, since they are exposed to the user: `Observation`, `Measurement`.
Expand Down
6 changes: 6 additions & 0 deletions metric/metric.go
Expand Up @@ -51,11 +51,17 @@ func WrapMeterImpl(impl sdkapi.MeterImpl) Meter {
// Measurement is used for reporting a synchronous batch of metric
// values. Instances of this type should be created by synchronous
// instruments (e.g., Int64Counter.Measurement()).
//
// Note: This is an alias because it is a first-class member of the
// API but is also part of the lower-level sdkapi interface.
type Measurement = sdkapi.Measurement

// Observation is used for reporting an asynchronous batch of metric
// values. Instances of this type should be created by asynchronous
// instruments (e.g., Int64GaugeObserver.Observation()).
//
// Note: This is an alias because it is a first-class member of the
// API but is also part of the lower-level sdkapi interface.
type Observation = sdkapi.Observation

// RecordBatch atomically records a batch of measurements.
Expand Down

0 comments on commit 4cbf562

Please sign in to comment.