From aa5122490eb4f182320de76a8d2ef1f3208af788 Mon Sep 17 00:00:00 2001 From: Tyler Yahn Date: Tue, 31 Jan 2023 08:12:39 -0800 Subject: [PATCH] Remove the deprecated instrument packages (#3631) * Remove the deprecated instrument packages * Update changelog * Add PR number --- CHANGELOG.md | 7 ++ .../instrument/asyncfloat64/asyncfloat64.go | 55 ---------------- metric/instrument/asyncint64/asyncint64.go | 55 ---------------- metric/instrument/syncfloat64/syncfloat64.go | 66 ------------------- metric/instrument/syncint64/syncint64.go | 66 ------------------- 5 files changed, 7 insertions(+), 242 deletions(-) delete mode 100644 metric/instrument/asyncfloat64/asyncfloat64.go delete mode 100644 metric/instrument/asyncint64/asyncint64.go delete mode 100644 metric/instrument/syncfloat64/syncfloat64.go delete mode 100644 metric/instrument/syncint64/syncint64.go diff --git a/CHANGELOG.md b/CHANGELOG.md index 2bfe0a9411b..4421f129059 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -8,6 +8,13 @@ This project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.htm ## [Unreleased] +### Removed + +- The deprecated `go.opentelemetry.io/otel/metric/instrument/asyncfloat64` package is removed. (#3631) +- The deprecated `go.opentelemetry.io/otel/metric/instrument/asyncint64` package is removed. (#3631) +- The deprecated `go.opentelemetry.io/otel/metric/instrument/syncfloat64` package is removed. (#3631) +- The deprecated `go.opentelemetry.io/otel/metric/instrument/syncint64` package is removed. (#3631) + ## [1.12.0/0.35.0] 2023-01-28 ### Added diff --git a/metric/instrument/asyncfloat64/asyncfloat64.go b/metric/instrument/asyncfloat64/asyncfloat64.go deleted file mode 100644 index 7fb43ca363e..00000000000 --- a/metric/instrument/asyncfloat64/asyncfloat64.go +++ /dev/null @@ -1,55 +0,0 @@ -// Copyright The OpenTelemetry Authors -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Package asyncfloat64 provides asynchronous instruments that accept float64 -// measurments. -// -// Deprecated: Use the instruments provided by -// go.opentelemetry.io/otel/metric/instrument instead. -package asyncfloat64 // import "go.opentelemetry.io/otel/metric/instrument/asyncfloat64" - -import "go.opentelemetry.io/otel/metric/instrument" - -// Counter is an instrument used to asynchronously record increasing float64 -// measurements once per a measurement collection cycle. The Observe method is -// used to record the measured state of the instrument when it is called. -// Implementations will assume the observed value to be the cumulative sum of -// the count. -// -// Warning: methods may be added to this interface in minor releases. -// -// Deprecated: Use the Float64ObservableCounter in -// go.opentelemetry.io/otel/metric/instrument instead. -type Counter interface{ instrument.Float64Observer } - -// UpDownCounter is an instrument used to asynchronously record float64 -// measurements once per a measurement collection cycle. The Observe method is -// used to record the measured state of the instrument when it is called. -// Implementations will assume the observed value to be the cumulative sum of -// the count. -// -// Warning: methods may be added to this interface in minor releases. -// -// Deprecated: Use the Float64ObservableUpDownCounter in -// go.opentelemetry.io/otel/metric/instrument instead. -type UpDownCounter interface{ instrument.Float64Observer } - -// Gauge is an instrument used to asynchronously record instantaneous float64 -// measurements once per a measurement collection cycle. -// -// Warning: methods may be added to this interface in minor releases. -// -// Deprecated: Use the Float64ObservableGauge in -// go.opentelemetry.io/otel/metric/instrument instead. -type Gauge interface{ instrument.Float64Observer } diff --git a/metric/instrument/asyncint64/asyncint64.go b/metric/instrument/asyncint64/asyncint64.go deleted file mode 100644 index 1e3be250da8..00000000000 --- a/metric/instrument/asyncint64/asyncint64.go +++ /dev/null @@ -1,55 +0,0 @@ -// Copyright The OpenTelemetry Authors -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Package asyncint64 provides asynchronous instruments that accept int64 -// measurments. -// -// Deprecated: Use the instruments provided by -// go.opentelemetry.io/otel/metric/instrument instead. -package asyncint64 // import "go.opentelemetry.io/otel/metric/instrument/asyncint64" - -import "go.opentelemetry.io/otel/metric/instrument" - -// Counter is an instrument used to asynchronously record increasing int64 -// measurements once per a measurement collection cycle. The Observe method is -// used to record the measured state of the instrument when it is called. -// Implementations will assume the observed value to be the cumulative sum of -// the count. -// -// Warning: methods may be added to this interface in minor releases. -// -// Deprecated: Use the Int64ObservableCounter in -// go.opentelemetry.io/otel/metric/instrument instead. -type Counter interface{ instrument.Int64Observer } - -// UpDownCounter is an instrument used to asynchronously record int64 -// measurements once per a measurement collection cycle. The Observe method is -// used to record the measured state of the instrument when it is called. -// Implementations will assume the observed value to be the cumulative sum of -// the count. -// -// Warning: methods may be added to this interface in minor releases. -// -// Deprecated: Use the Int64ObservableUpDownCounter in -// go.opentelemetry.io/otel/metric/instrument instead. -type UpDownCounter interface{ instrument.Int64Observer } - -// Gauge is an instrument used to asynchronously record instantaneous int64 -// measurements once per a measurement collection cycle. -// -// Warning: methods may be added to this interface in minor releases. -// -// Deprecated: Use the Int64ObservableGauge in -// go.opentelemetry.io/otel/metric/instrument instead. -type Gauge interface{ instrument.Int64Observer } diff --git a/metric/instrument/syncfloat64/syncfloat64.go b/metric/instrument/syncfloat64/syncfloat64.go deleted file mode 100644 index bd835ec842d..00000000000 --- a/metric/instrument/syncfloat64/syncfloat64.go +++ /dev/null @@ -1,66 +0,0 @@ -// Copyright The OpenTelemetry Authors -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Package syncfloat64 provides synchronous instruments that accept float64 -// measurments. -// -// Deprecated: Use the instruments provided by -// go.opentelemetry.io/otel/metric/instrument instead. -package syncfloat64 // import "go.opentelemetry.io/otel/metric/instrument/syncfloat64" - -import ( - "context" - - "go.opentelemetry.io/otel/attribute" - "go.opentelemetry.io/otel/metric/instrument" -) - -// Counter is an instrument that records increasing values. -// -// Warning: methods may be added to this interface in minor releases. -// -// Deprecated: Use the Float64Counter in -// go.opentelemetry.io/otel/metric/instrument instead. -type Counter interface { - // Add records a change to the counter. - Add(ctx context.Context, incr float64, attrs ...attribute.KeyValue) - - instrument.Synchronous -} - -// UpDownCounter is an instrument that records increasing or decreasing values. -// -// Warning: methods may be added to this interface in minor releases. -// -// Deprecated: Use the Float64UpDownCounter in -// go.opentelemetry.io/otel/metric/instrument instead. -type UpDownCounter interface { - // Add records a change to the counter. - Add(ctx context.Context, incr float64, attrs ...attribute.KeyValue) - - instrument.Synchronous -} - -// Histogram is an instrument that records a distribution of values. -// -// Warning: methods may be added to this interface in minor releases. -// -// Deprecated: Use the Float64Histogram in -// go.opentelemetry.io/otel/metric/instrument instead. -type Histogram interface { - // Record adds an additional value to the distribution. - Record(ctx context.Context, incr float64, attrs ...attribute.KeyValue) - - instrument.Synchronous -} diff --git a/metric/instrument/syncint64/syncint64.go b/metric/instrument/syncint64/syncint64.go deleted file mode 100644 index 88408113f71..00000000000 --- a/metric/instrument/syncint64/syncint64.go +++ /dev/null @@ -1,66 +0,0 @@ -// Copyright The OpenTelemetry Authors -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Package syncint64 provides synchronous instruments that accept int64 -// measurments. -// -// Deprecated: Use the instruments provided by -// go.opentelemetry.io/otel/metric/instrument instead. -package syncint64 // import "go.opentelemetry.io/otel/metric/instrument/syncint64" - -import ( - "context" - - "go.opentelemetry.io/otel/attribute" - "go.opentelemetry.io/otel/metric/instrument" -) - -// Counter is an instrument that records increasing values. -// -// Warning: methods may be added to this interface in minor releases. -// -// Deprecated: Use the Int64Counter in -// go.opentelemetry.io/otel/metric/instrument instead. -type Counter interface { - // Add records a change to the counter. - Add(ctx context.Context, incr int64, attrs ...attribute.KeyValue) - - instrument.Synchronous -} - -// UpDownCounter is an instrument that records increasing or decreasing values. -// -// Warning: methods may be added to this interface in minor releases. -// -// Deprecated: Use the Int64UpDownCounter in -// go.opentelemetry.io/otel/metric/instrument instead. -type UpDownCounter interface { - // Add records a change to the counter. - Add(ctx context.Context, incr int64, attrs ...attribute.KeyValue) - - instrument.Synchronous -} - -// Histogram is an instrument that records a distribution of values. -// -// Warning: methods may be added to this interface in minor releases. -// -// Deprecated: Use the Int64Histogram in -// go.opentelemetry.io/otel/metric/instrument instead. -type Histogram interface { - // Record adds an additional value to the distribution. - Record(ctx context.Context, incr int64, attrs ...attribute.KeyValue) - - instrument.Synchronous -}