diff --git a/CHANGELOG.md b/CHANGELOG.md index ac0bdc06da8..fa6dfc551e2 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -53,6 +53,11 @@ This project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.htm - Do not report empty partial-success responses in the `go.opentelemetry.io/otel/exporters/otlp` exporters. (#3438, #3432) - Handle partial success responses in `go.opentelemetry.io/otel/exporters/otlp/otlpmetric` exporters. (#3162, #3440) +### Deprecated + +- The `go.opentelemetry.io/otel/sdk/metric/view` package is deprecated. + Use `Instrument`, `InstrumentKind`, `View`, and `NewView` in `go.opentelemetry.io/otel/sdk/metric` instead. (#3476) + ## [1.11.1/0.33.0] 2022-10-19 ### Added diff --git a/sdk/metric/view/doc.go b/sdk/metric/view/doc.go index e92e57aed10..c757b75bd35 100644 --- a/sdk/metric/view/doc.go +++ b/sdk/metric/view/doc.go @@ -17,4 +17,7 @@ // registered with a MeterProvider in the go.opentelemetry.io/otel/sdk/metric // package. See the WithReader option in that package for more information on // how this registration takes place. +// +// Deprecated: Use Instrument, InstrumentKind, View, and NewView in +// go.opentelemetry.io/otel/sdk/metric instead. package view // import "go.opentelemetry.io/otel/sdk/metric/view" diff --git a/sdk/metric/view/instrument.go b/sdk/metric/view/instrument.go index b9f0b9de708..77536de2114 100644 --- a/sdk/metric/view/instrument.go +++ b/sdk/metric/view/instrument.go @@ -20,6 +20,8 @@ import ( ) // Instrument uniquely identifies an instrument within a meter. +// +// Deprecated: Use Instrument in go.opentelemetry.io/otel/sdk/metric instead. type Instrument struct { Scope instrumentation.Scope diff --git a/sdk/metric/view/instrumentkind.go b/sdk/metric/view/instrumentkind.go index 0ac2acd56bc..357117e334a 100644 --- a/sdk/metric/view/instrumentkind.go +++ b/sdk/metric/view/instrumentkind.go @@ -15,6 +15,9 @@ package view // import "go.opentelemetry.io/otel/sdk/metric/view" // InstrumentKind describes the kind of instrument a Meter can create. +// +// Deprecated: Use InstrumentKind in go.opentelemetry.io/otel/sdk/metric +// instead. type InstrumentKind uint8 // These are all the instrument kinds supported by the SDK. @@ -24,20 +27,38 @@ const ( undefinedInstrument InstrumentKind = iota // SyncCounter is an instrument kind that records increasing values // synchronously in application code. + // + // Deprecated: Use InstrumentKindSyncCounter in + // go.opentelemetry.io/otel/sdk/metric instead. SyncCounter // SyncUpDownCounter is an instrument kind that records increasing and // decreasing values synchronously in application code. + // + // Deprecated: Use InstrumentKindSyncUpDownCounter in + // go.opentelemetry.io/otel/sdk/metric instead. SyncUpDownCounter // SyncHistogram is an instrument kind that records a distribution of // values synchronously in application code. + // + // Deprecated: Use InstrumentKindSyncHistogram in + // go.opentelemetry.io/otel/sdk/metric instead. SyncHistogram // AsyncCounter is an instrument kind that records increasing values in an // asynchronous callback. + // + // Deprecated: Use InstrumentKindAsyncCounter in + // go.opentelemetry.io/otel/sdk/metric instead. AsyncCounter // AsyncUpDownCounter is an instrument kind that records increasing and // decreasing values in an asynchronous callback. + // + // Deprecated: Use InstrumentKindAsyncUpDownCounter in + // go.opentelemetry.io/otel/sdk/metric instead. AsyncUpDownCounter // AsyncGauge is an instrument kind that records current values in an // asynchronous callback. + // + // Deprecated: Use InstrumentKindAsyncGauge in + // go.opentelemetry.io/otel/sdk/metric instead. AsyncGauge ) diff --git a/sdk/metric/view/view.go b/sdk/metric/view/view.go index c6f2001870e..3e432afb3f8 100644 --- a/sdk/metric/view/view.go +++ b/sdk/metric/view/view.go @@ -31,6 +31,8 @@ import ( // reported by Instruments. // // An empty View will match all instruments, and do no transformations. +// +// Deprecated: Use View in go.opentelemetry.io/otel/sdk/metric instead. type View struct { instrumentName *regexp.Regexp hasWildcard bool @@ -48,6 +50,8 @@ type View struct { // Options are all applied to the View. An instrument needs to match all of // the match Options passed for the View to be applied to it. Similarly, all // transform operation Options are applied to matched Instruments. +// +// Deprecated: Use NewView in go.opentelemetry.io/otel/sdk/metric instead. func New(opts ...Option) (View, error) { v := View{}