Skip to content

Commit 6fed3eb

Browse files
authored
add deprecation warnings for opentelemetry-exporter-cloud-monitoring and opentelemetry-exporter-cloud-trace (#142)
* add deprecation warnings in code and readmes * bump versions * ran addlicense -c "Google" -l apache .
1 parent ba8898f commit 6fed3eb

File tree

10 files changed

+81
-5
lines changed

10 files changed

+81
-5
lines changed

opentelemetry-exporter-cloud-monitoring/README.rst

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,14 @@
11
OpenTelemetry Cloud Monitoring Exporters
22
========================================
33

4+
DEPRECATED
5+
----------
6+
7+
**This package is deprecated. It will not
8+
receive any more updates.** Please use `opentelemetry-exporter-gcp-monitoring
9+
<https://pypi.org/project/opentelemetry-exporter-gcp-monitoring/>`_ instead. It
10+
will not receive any more updates.
11+
412
This library provides classes for exporting metrics data to Google Cloud Monitoring.
513

614
Installation
@@ -15,4 +23,4 @@ References
1523

1624
* `OpenTelemetry Cloud Monitoring Exporter <https://opentelemetry-python.readthedocs.io/en/latest/ext/cloud_monitoring/cloud_monitoring.html>`_
1725
* `Cloud Monitoring <https://cloud.google.com/monitoring/>`_
18-
* `OpenTelemetry Project <https://opentelemetry.io/>`_
26+
* `OpenTelemetry Project <https://opentelemetry.io/>`_

opentelemetry-exporter-cloud-monitoring/setup.cfg

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
#
1616
[metadata]
1717
name = opentelemetry-exporter-cloud-monitoring
18-
description = Cloud Monitoring integration for OpenTelemetry
18+
description = Deprecated Cloud Monitoring integration for OpenTelemetry
1919
long_description = file: README.rst
2020
long_description_content_type = text/x-rst
2121
author = OpenTelemetry Authors

opentelemetry-exporter-cloud-monitoring/src/opentelemetry/exporter/cloud_monitoring/__init__.py

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,17 @@
1+
# Copyright 2021 Google
2+
#
3+
# Licensed under the Apache License, Version 2.0 (the "License");
4+
# you may not use this file except in compliance with the License.
5+
# You may obtain a copy of the License at
6+
#
7+
# http://www.apache.org/licenses/LICENSE-2.0
8+
#
9+
# Unless required by applicable law or agreed to in writing, software
10+
# distributed under the License is distributed on an "AS IS" BASIS,
11+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+
# See the License for the specific language governing permissions and
13+
# limitations under the License.
14+
115
import logging
216
import random
317
from typing import Optional, Sequence
@@ -15,6 +29,14 @@
1529
)
1630
from opentelemetry.sdk.metrics.export.aggregate import SumAggregator
1731

32+
import warnings
33+
34+
warnings.warn(
35+
"Package opentelemetry-exporter-cloud-monitoring is deprecated. Please install "
36+
"opentelemetry-exporter-gcp-monitoring instead",
37+
DeprecationWarning,
38+
)
39+
1840
logger = logging.getLogger(__name__)
1941
MAX_BATCH_WRITE = 200
2042
WRITE_INTERVAL = 10

opentelemetry-exporter-cloud-monitoring/src/opentelemetry/exporter/cloud_monitoring/version.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,4 +12,4 @@
1212
# See the License for the specific language governing permissions and
1313
# limitations under the License.
1414

15-
__version__ = "0.10b0"
15+
__version__ = "0.10b1"
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
# Copyright 2021 Google
2+
#
3+
# Licensed under the Apache License, Version 2.0 (the "License");
4+
# you may not use this file except in compliance with the License.
5+
# You may obtain a copy of the License at
6+
#
7+
# http://www.apache.org/licenses/LICENSE-2.0
8+
#
9+
# Unless required by applicable law or agreed to in writing, software
10+
# distributed under the License is distributed on an "AS IS" BASIS,
11+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+
# See the License for the specific language governing permissions and
13+
# limitations under the License.
14+

opentelemetry-exporter-cloud-trace/README.rst

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,16 @@
11
OpenTelemetry Cloud Trace Exporters
22
===================================
33

4+
DEPRECATED
5+
----------
6+
7+
**This package is deprecated. It will not
8+
receive any more updates.** Please use `opentelemetry-exporter-gcp-trace
9+
<https://pypi.org/project/opentelemetry-exporter-gcp-trace/>`_ and
10+
`opentelemetry-propagator-gcp
11+
<https://pypi.org/project/opentelemetry-propagator-gcp/>`_ instead. It will not
12+
receive any more updates.
13+
414
This library provides classes for exporting trace data to Google Cloud Trace.
515

616
Installation

opentelemetry-exporter-cloud-trace/setup.cfg

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
#
1515
[metadata]
1616
name = opentelemetry-exporter-cloud-trace
17-
description = Cloud Trace integration for OpenTelemetry
17+
description = Deprecated Cloud Trace integration for OpenTelemetry
1818
long_description = file: README.rst
1919
long_description_content_type = text/x-rst
2020
author = OpenTelemetry Authors

opentelemetry-exporter-cloud-trace/src/opentelemetry/exporter/cloud_trace/__init__.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,14 @@
6464
)
6565
from opentelemetry.util import types
6666

67+
import warnings
68+
69+
warnings.warn(
70+
"Package opentelemetry-exporter-cloud-monitoring is deprecated. Please install "
71+
"opentelemetry-exporter-gcp-monitoring instead",
72+
DeprecationWarning,
73+
)
74+
6775
logger = logging.getLogger(__name__)
6876

6977
MAX_NUM_LINKS = 128

opentelemetry-exporter-cloud-trace/src/opentelemetry/exporter/cloud_trace/version.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,4 +12,4 @@
1212
# See the License for the specific language governing permissions and
1313
# limitations under the License.
1414

15-
__version__ = "0.10b0"
15+
__version__ = "0.10b1"
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
# Copyright 2021 Google
2+
#
3+
# Licensed under the Apache License, Version 2.0 (the "License");
4+
# you may not use this file except in compliance with the License.
5+
# You may obtain a copy of the License at
6+
#
7+
# http://www.apache.org/licenses/LICENSE-2.0
8+
#
9+
# Unless required by applicable law or agreed to in writing, software
10+
# distributed under the License is distributed on an "AS IS" BASIS,
11+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+
# See the License for the specific language governing permissions and
13+
# limitations under the License.
14+

0 commit comments

Comments
 (0)