From bbcdc75ede428d61212caee9222d68300b7e70a7 Mon Sep 17 00:00:00 2001 From: Tyler Yahn Date: Tue, 29 Mar 2022 07:31:09 -0700 Subject: [PATCH] Remove sdk/export/metric module (#2720) * Remove the sdk/export/metric module * Add change to changelog * Update PR number Co-authored-by: Chester Cheung --- CHANGELOG.md | 5 ++ sdk/export/metric/aggregation/aggregation.go | 77 -------------------- sdk/export/metric/aggregation/temporality.go | 53 -------------- sdk/export/metric/go.mod | 73 ------------------- sdk/export/metric/go.sum | 21 ------ sdk/export/metric/metric.go | 68 ----------------- 6 files changed, 5 insertions(+), 292 deletions(-) delete mode 100644 sdk/export/metric/aggregation/aggregation.go delete mode 100644 sdk/export/metric/aggregation/temporality.go delete mode 100644 sdk/export/metric/go.mod delete mode 100644 sdk/export/metric/go.sum delete mode 100644 sdk/export/metric/metric.go diff --git a/CHANGELOG.md b/CHANGELOG.md index 0b3f8e9d74a..c38fd62ad69 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -8,6 +8,11 @@ This project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.htm ## [Unreleased] +### Removed + +- Removed module the `go.opentelemetry.io/otel/sdk/export/metric`. + Use the `go.opentelemetry.io/otel/sdk/metric` module instead. (#2720) + ## [1.6.1] - 2022-03-28 ### Fixed diff --git a/sdk/export/metric/aggregation/aggregation.go b/sdk/export/metric/aggregation/aggregation.go deleted file mode 100644 index 702c5b2bc82..00000000000 --- a/sdk/export/metric/aggregation/aggregation.go +++ /dev/null @@ -1,77 +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 aggregation // import "go.opentelemetry.io/otel/sdk/export/metric/aggregation" - -import ( - "go.opentelemetry.io/otel/sdk/metric/export/aggregation" - "go.opentelemetry.io/otel/sdk/metric/number" -) - -// Deprecated: use module "go.opentelemetry.io/otel/sdk/metric/export/aggregation" -type Aggregation = aggregation.Aggregation - -// Deprecated: use module "go.opentelemetry.io/otel/sdk/metric/export/aggregation" -type Sum = aggregation.Sum - -// Deprecated: use module "go.opentelemetry.io/otel/sdk/metric/export/aggregation" -type Count = aggregation.Count - -// Deprecated: Will be removed soon. -type Min interface { - Aggregation - Min() (number.Number, error) -} - -// Deprecated: Will be removed soon. -type Max interface { - Aggregation - Max() (number.Number, error) -} - -// Deprecated: use module "go.opentelemetry.io/otel/sdk/metric/export/aggregation" -type LastValue = aggregation.LastValue - -// Deprecated: use module "go.opentelemetry.io/otel/sdk/metric/export/aggregation" -type Buckets = aggregation.Buckets - -// Deprecated: use module "go.opentelemetry.io/otel/sdk/metric/export/aggregation" -type Histogram = aggregation.Histogram - -// Deprecated: use module "go.opentelemetry.io/otel/sdk/metric/export/aggregation" -type Kind = aggregation.Kind - -const ( - // Deprecated: use module "go.opentelemetry.io/otel/sdk/metric/export/aggregation" - SumKind = aggregation.SumKind - // Deprecated: use module "go.opentelemetry.io/otel/sdk/metric/export/aggregation" - HistogramKind = aggregation.HistogramKind - // Deprecated: use module "go.opentelemetry.io/otel/sdk/metric/export/aggregation" - LastValueKind = aggregation.LastValueKind -) - -var ( - // Deprecated: use module "go.opentelemetry.io/otel/sdk/metric/export/aggregation" - ErrNegativeInput = aggregation.ErrNegativeInput - // Deprecated: use module "go.opentelemetry.io/otel/sdk/metric/export/aggregation" - ErrNaNInput = aggregation.ErrNaNInput - // Deprecated: use module "go.opentelemetry.io/otel/sdk/metric/export/aggregation" - ErrInconsistentType = aggregation.ErrInconsistentType - - // Deprecated: use module "go.opentelemetry.io/otel/sdk/metric/export/aggregation" - ErrNoCumulativeToDelta = aggregation.ErrNoCumulativeToDelta - - // Deprecated: use module "go.opentelemetry.io/otel/sdk/metric/export/aggregation" - ErrNoData = aggregation.ErrNoData -) diff --git a/sdk/export/metric/aggregation/temporality.go b/sdk/export/metric/aggregation/temporality.go deleted file mode 100644 index 2e3e705662b..00000000000 --- a/sdk/export/metric/aggregation/temporality.go +++ /dev/null @@ -1,53 +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 aggregation // import "go.opentelemetry.io/otel/sdk/export/metric/aggregation" - -import ( - "go.opentelemetry.io/otel/sdk/metric/export/aggregation" -) - -// Deprecated: use module "go.opentelemetry.io/otel/sdk/metric/export/aggregation" -type Temporality = aggregation.Temporality - -const ( - // Deprecated: use module "go.opentelemetry.io/otel/sdk/metric/export/aggregation" - CumulativeTemporality = aggregation.CumulativeTemporality - - // Deprecated: use module "go.opentelemetry.io/otel/sdk/metric/export/aggregation" - DeltaTemporality = aggregation.DeltaTemporality -) - -// Deprecated: use module "go.opentelemetry.io/otel/sdk/metric/export/aggregation" -func ConstantTemporalitySelector(t Temporality) TemporalitySelector { - return aggregation.ConstantTemporalitySelector(t) -} - -// Deprecated: use module "go.opentelemetry.io/otel/sdk/metric/export/aggregation" -func CumulativeTemporalitySelector() TemporalitySelector { - return aggregation.CumulativeTemporalitySelector() -} - -// Deprecated: use module "go.opentelemetry.io/otel/sdk/metric/export/aggregation" -func DeltaTemporalitySelector() TemporalitySelector { - return aggregation.DeltaTemporalitySelector() -} - -// Deprecated: use module "go.opentelemetry.io/otel/sdk/metric/export/aggregation" -func StatelessTemporalitySelector() TemporalitySelector { - return aggregation.StatelessTemporalitySelector() -} - -// Deprecated: use module "go.opentelemetry.io/otel/sdk/metric/export/aggregation" -type TemporalitySelector = aggregation.TemporalitySelector diff --git a/sdk/export/metric/go.mod b/sdk/export/metric/go.mod deleted file mode 100644 index 7dff9c294e4..00000000000 --- a/sdk/export/metric/go.mod +++ /dev/null @@ -1,73 +0,0 @@ -// Deprecated: use go.opentelemetry.io/otel/sdk/metric instead. -module go.opentelemetry.io/otel/sdk/export/metric - -go 1.16 - -replace go.opentelemetry.io/otel => ../../.. - -replace go.opentelemetry.io/otel/bridge/opencensus => ../../../bridge/opencensus - -replace go.opentelemetry.io/otel/bridge/opentracing => ../../../bridge/opentracing - -replace go.opentelemetry.io/otel/example/jaeger => ../../../example/jaeger - -replace go.opentelemetry.io/otel/example/namedtracer => ../../../example/namedtracer - -replace go.opentelemetry.io/otel/example/opencensus => ../../../example/opencensus - -replace go.opentelemetry.io/otel/example/otel-collector => ../../../example/otel-collector - -replace go.opentelemetry.io/otel/example/prometheus => ../../../example/prometheus - -replace go.opentelemetry.io/otel/example/zipkin => ../../../example/zipkin - -replace go.opentelemetry.io/otel/exporters/prometheus => ../../../exporters/prometheus - -replace go.opentelemetry.io/otel/exporters/jaeger => ../../../exporters/jaeger - -replace go.opentelemetry.io/otel/exporters/zipkin => ../../../exporters/zipkin - -replace go.opentelemetry.io/otel/internal/tools => ../../../internal/tools - -replace go.opentelemetry.io/otel/metric => ../../../metric - -replace go.opentelemetry.io/otel/sdk => ../.. - -replace go.opentelemetry.io/otel/sdk/export/metric => ./ - -replace go.opentelemetry.io/otel/sdk/metric => ../../metric - -replace go.opentelemetry.io/otel/trace => ../../../trace - -require ( - go.opentelemetry.io/otel v1.6.1 - go.opentelemetry.io/otel/sdk/metric v0.28.0 -) - -replace go.opentelemetry.io/otel/example/passthrough => ../../../example/passthrough - -replace go.opentelemetry.io/otel/exporters/otlp/otlptrace => ../../../exporters/otlp/otlptrace - -replace go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc => ../../../exporters/otlp/otlptrace/otlptracegrpc - -replace go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp => ../../../exporters/otlp/otlptrace/otlptracehttp - -replace go.opentelemetry.io/otel/internal/metric => ../../../internal/metric - -replace go.opentelemetry.io/otel/exporters/otlp/otlpmetric => ../../../exporters/otlp/otlpmetric - -replace go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetricgrpc => ../../../exporters/otlp/otlpmetric/otlpmetricgrpc - -replace go.opentelemetry.io/otel/exporters/stdout/stdoutmetric => ../../../exporters/stdout/stdoutmetric - -replace go.opentelemetry.io/otel/exporters/stdout/stdouttrace => ../../../exporters/stdout/stdouttrace - -replace go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetrichttp => ../../../exporters/otlp/otlpmetric/otlpmetrichttp - -replace go.opentelemetry.io/otel/bridge/opencensus/test => ../../../bridge/opencensus/test - -replace go.opentelemetry.io/otel/example/fib => ../../../example/fib - -replace go.opentelemetry.io/otel/schema => ../../../schema - -replace go.opentelemetry.io/otel/exporters/otlp/internal/retry => ../../../exporters/otlp/internal/retry diff --git a/sdk/export/metric/go.sum b/sdk/export/metric/go.sum deleted file mode 100644 index 5f902e9646f..00000000000 --- a/sdk/export/metric/go.sum +++ /dev/null @@ -1,21 +0,0 @@ -github.com/benbjohnson/clock v1.3.0/go.mod h1:J11/hYXuz8f4ySSvYwY0FKfm+ezbsZBKZxNJlLklBHA= -github.com/davecgh/go-spew v1.1.0 h1:ZDRjVQ15GmhC3fiQ8ni8+OwkZQO4DARzQgrnXU1Liz8= -github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= -github.com/go-logr/logr v1.2.2/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A= -github.com/go-logr/logr v1.2.3 h1:2DntVwHkVopvECVRSlL5PSo9eG+cAkDCuckLubN+rq0= -github.com/go-logr/logr v1.2.3/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A= -github.com/go-logr/stdr v1.2.2 h1:hSWxHoqTgW2S2qGc0LTAI563KZ5YKYRhT3MFKZMbjag= -github.com/go-logr/stdr v1.2.2/go.mod h1:mMo/vtBO5dYbehREoey6XUKy/eSumjCCveDpRre4VKE= -github.com/google/go-cmp v0.5.7 h1:81/ik6ipDQS2aGcBfIN5dHDB36BwrStyeAQquSYCV4o= -github.com/google/go-cmp v0.5.7/go.mod h1:n+brtR0CgQNWTVd5ZUFpTBC8YFBDLK/h/bpaJ8/DtOE= -github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= -github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= -github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= -github.com/stretchr/testify v1.7.1 h1:5TQK59W5E3v0r2duFAb7P95B6hEeOyEnHRa8MjYSMTY= -github.com/stretchr/testify v1.7.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= -golang.org/x/sys v0.0.0-20210423185535-09eb48e85fd7 h1:iGu644GcxtEcrInvDsQRCwJjtCIOlT2V7IRt6ah2Whw= -golang.org/x/sys v0.0.0-20210423185535-09eb48e85fd7/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= -gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= -gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c h1:dUUwHk2QECo/6vqA44rthZ8ie2QXMNeKRTHCNY2nXvo= -gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= diff --git a/sdk/export/metric/metric.go b/sdk/export/metric/metric.go deleted file mode 100644 index b3dccccd9dc..00000000000 --- a/sdk/export/metric/metric.go +++ /dev/null @@ -1,68 +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 metric // import "go.opentelemetry.io/otel/sdk/export/metric" - -import ( - "time" - - "go.opentelemetry.io/otel/attribute" - "go.opentelemetry.io/otel/sdk/metric/aggregator" - "go.opentelemetry.io/otel/sdk/metric/export" - "go.opentelemetry.io/otel/sdk/metric/export/aggregation" - "go.opentelemetry.io/otel/sdk/metric/sdkapi" -) - -// Deprecated: use module "go.opentelemetry.io/otel/sdk/metric/export" -type Accumulation = export.Accumulation - -// Deprecated: use module "go.opentelemetry.io/otel/sdk/metric/aggregator" -type Aggregator = aggregator.Aggregator - -// Deprecated: use module "go.opentelemetry.io/otel/sdk/metric/export" -type AggregatorSelector = export.AggregatorSelector - -// Deprecated: use module "go.opentelemetry.io/otel/sdk/metric/export" -type Checkpointer = export.Checkpointer - -// Deprecated: use module "go.opentelemetry.io/otel/sdk/metric/export" -type CheckpointerFactory = export.CheckpointerFactory - -// Deprecated: use module "go.opentelemetry.io/otel/sdk/metric/export" -type Exporter = export.Exporter - -// Deprecated: use module "go.opentelemetry.io/otel/sdk/metric/export" -type InstrumentationLibraryReader = export.Exporter - -// Deprecated: use module "go.opentelemetry.io/otel/sdk/metric/export" -type Metadata = export.Metadata - -// Deprecated: use module "go.opentelemetry.io/otel/sdk/metric/export" -type Processor = export.Processor - -// Deprecated: use module "go.opentelemetry.io/otel/sdk/metric/export" -type Reader = export.Reader - -// Deprecated: use module "go.opentelemetry.io/otel/sdk/metric/export" -type Record = export.Record - -// Deprecated: use module "go.opentelemetry.io/otel/sdk/metric/export" -func NewAccumulation(descriptor *sdkapi.Descriptor, labels *attribute.Set, aggregator Aggregator) Accumulation { - return export.NewAccumulation(descriptor, labels, aggregator) -} - -// Deprecated: use module "go.opentelemetry.io/otel/sdk/metric/export" -func NewRecord(descriptor *sdkapi.Descriptor, labels *attribute.Set, aggregation aggregation.Aggregation, start, end time.Time) Record { - return export.NewRecord(descriptor, labels, aggregation, start, end) -}