From a2cb6044b2ec10beb38f4612d4421551c48064dc Mon Sep 17 00:00:00 2001 From: Tyler Yahn Date: Mon, 13 Nov 2023 09:20:05 -0800 Subject: [PATCH] Remove the deprecated otlpmetric module (#4707) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * Remove the deprecated otlpmetric module * Add changelog entry * Update versions.yaml --------- Co-authored-by: Robert PajÄ…k --- CHANGELOG.md | 1 + exporters/otlp/otlpmetric/doc.go | 23 --------------- exporters/otlp/otlpmetric/go.mod | 15 ---------- exporters/otlp/otlpmetric/go.sum | 23 --------------- exporters/otlp/otlpmetric/version.go | 20 ------------- exporters/otlp/otlpmetric/version_test.go | 34 ----------------------- versions.yaml | 1 - 7 files changed, 1 insertion(+), 116 deletions(-) delete mode 100644 exporters/otlp/otlpmetric/doc.go delete mode 100644 exporters/otlp/otlpmetric/go.mod delete mode 100644 exporters/otlp/otlpmetric/go.sum delete mode 100644 exporters/otlp/otlpmetric/version.go delete mode 100644 exporters/otlp/otlpmetric/version_test.go diff --git a/CHANGELOG.md b/CHANGELOG.md index af98ee9cf0a..b11a1e30860 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -11,6 +11,7 @@ This project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.htm ### Removed - Remove the deprecated `go.opentelemetry.io/otel/bridge/opencensus.NewTracer`. (#4706) +- Remove the deprecated `go.opentelemetry.io/otel/exporters/otlp/otlpmetric` module. (#4707) - Remove the deprecated `go.opentelemetry.io/otel/example/view` module. (#4708) ## [1.20.0/0.43.0] 2023-11-10 diff --git a/exporters/otlp/otlpmetric/doc.go b/exporters/otlp/otlpmetric/doc.go deleted file mode 100644 index c641071a1cd..00000000000 --- a/exporters/otlp/otlpmetric/doc.go +++ /dev/null @@ -1,23 +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 otlpmetric provides an OpenTelemetry metric Exporter that can be -// used with PeriodicReader. It transforms metricdata into OTLP and transmits -// the transformed data to OTLP receivers. The Exporter is configurable to use -// different Clients, each using a distinct transport protocol to communicate -// to an OTLP receiving endpoint. -// -// Deprecated: Use [go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetricgrpc] -// or [go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetrichttp] instead. -package otlpmetric // import "go.opentelemetry.io/otel/exporters/otlp/otlpmetric" diff --git a/exporters/otlp/otlpmetric/go.mod b/exporters/otlp/otlpmetric/go.mod deleted file mode 100644 index bd76e6bcc41..00000000000 --- a/exporters/otlp/otlpmetric/go.mod +++ /dev/null @@ -1,15 +0,0 @@ -// Deprecated: use go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetricgrpc or go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetrichttp instead. -module go.opentelemetry.io/otel/exporters/otlp/otlpmetric - -go 1.20 - -require github.com/stretchr/testify v1.8.4 - -require ( - github.com/davecgh/go-spew v1.1.1 // indirect - github.com/kr/pretty v0.3.1 // indirect - github.com/pmezard/go-difflib v1.0.0 // indirect - github.com/rogpeppe/go-internal v1.10.0 // indirect - gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c // indirect - gopkg.in/yaml.v3 v3.0.1 // indirect -) diff --git a/exporters/otlp/otlpmetric/go.sum b/exporters/otlp/otlpmetric/go.sum deleted file mode 100644 index 3ee4af40e76..00000000000 --- a/exporters/otlp/otlpmetric/go.sum +++ /dev/null @@ -1,23 +0,0 @@ -github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E= -github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= -github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= -github.com/kr/pretty v0.2.1/go.mod h1:ipq/a2n7PKx3OHsz4KJII5eveXtPO4qwEXGdVfWzfnI= -github.com/kr/pretty v0.3.1 h1:flRD4NNwYAUpkphVc1HcthR4KEIFJ65n8Mw5qdRn3LE= -github.com/kr/pretty v0.3.1/go.mod h1:hoEshYVHaxMs3cyo3Yncou5ZscifuDolrwPKZanG3xk= -github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= -github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI= -github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY= -github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE= -github.com/pkg/diff v0.0.0-20210226163009-20ebb0f2a09e/go.mod h1:pJLUxLENpZxwdsKMEsNbx1VGcRFpLqf3715MtcvvzbA= -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/rogpeppe/go-internal v1.9.0/go.mod h1:WtVeX8xhTBvf0smdhujwtBcq4Qrzq/fJaraNFVN+nFs= -github.com/rogpeppe/go-internal v1.10.0 h1:TMyTOH3F/DB16zRVcYyreMH6GnZZrwQVAoYjRBZyWFQ= -github.com/rogpeppe/go-internal v1.10.0/go.mod h1:UQnix2H7Ngw/k4C5ijL5+65zddjncjaFoBhdsK/akog= -github.com/stretchr/testify v1.8.4 h1:CcVxjf3Q8PM0mHUKJCdn+eZZtm5yQwehR5yeSVQQcUk= -github.com/stretchr/testify v1.8.4/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXlSw2iwfAo= -gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= -gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c h1:Hei/4ADfdWqJk1ZMxUNpqntNwaWcugrBjAiHlqqRiVk= -gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c/go.mod h1:JHkPIbrfpd72SG/EVd6muEfDQjcINNoR0C8j2r3qZ4Q= -gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= -gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= diff --git a/exporters/otlp/otlpmetric/version.go b/exporters/otlp/otlpmetric/version.go deleted file mode 100644 index e4e15ca8f34..00000000000 --- a/exporters/otlp/otlpmetric/version.go +++ /dev/null @@ -1,20 +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 otlpmetric // import "go.opentelemetry.io/otel/exporters/otlp/otlpmetric" - -// Version is the current release version of the OpenTelemetry OTLP metrics exporter in use. -func Version() string { - return "0.43.0" -} diff --git a/exporters/otlp/otlpmetric/version_test.go b/exporters/otlp/otlpmetric/version_test.go deleted file mode 100644 index e0f3a3ef3b5..00000000000 --- a/exporters/otlp/otlpmetric/version_test.go +++ /dev/null @@ -1,34 +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 otlpmetric_test - -import ( - "regexp" - "testing" - - "github.com/stretchr/testify/assert" - - "go.opentelemetry.io/otel/exporters/otlp/otlpmetric" -) - -// regex taken from https://github.com/Masterminds/semver/tree/v3.1.1 -var versionRegex = regexp.MustCompile(`^v?([0-9]+)(\.[0-9]+)?(\.[0-9]+)?` + - `(-([0-9A-Za-z\-]+(\.[0-9A-Za-z\-]+)*))?` + - `(\+([0-9A-Za-z\-]+(\.[0-9A-Za-z\-]+)*))?$`) - -func TestVersionSemver(t *testing.T) { - v := otlpmetric.Version() - assert.NotNil(t, versionRegex.FindStringSubmatch(v), "version is not semver: %s", v) -} diff --git a/versions.yaml b/versions.yaml index c8c4ad6e20a..894593fa2d5 100644 --- a/versions.yaml +++ b/versions.yaml @@ -41,7 +41,6 @@ module-sets: - go.opentelemetry.io/otel/bridge/opencensus/test - go.opentelemetry.io/otel/example/opencensus - go.opentelemetry.io/otel/example/prometheus - - go.opentelemetry.io/otel/exporters/otlp/otlpmetric - go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetricgrpc - go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetrichttp - go.opentelemetry.io/otel/exporters/prometheus