Skip to content

Commit

Permalink
add deprecation warnings for opentelemetry-exporter-cloud-monitoring …
Browse files Browse the repository at this point in the history
…and opentelemetry-exporter-cloud-trace (#142)

* add deprecation warnings in code and readmes

* bump versions

* ran addlicense -c "Google" -l apache .
  • Loading branch information
aabmass authored May 14, 2021
1 parent ba8898f commit 6fed3eb
Show file tree
Hide file tree
Showing 10 changed files with 81 additions and 5 deletions.
10 changes: 9 additions & 1 deletion opentelemetry-exporter-cloud-monitoring/README.rst
Original file line number Diff line number Diff line change
@@ -1,6 +1,14 @@
OpenTelemetry Cloud Monitoring Exporters
========================================

DEPRECATED
----------

**This package is deprecated. It will not
receive any more updates.** Please use `opentelemetry-exporter-gcp-monitoring
<https://pypi.org/project/opentelemetry-exporter-gcp-monitoring/>`_ instead. It
will not receive any more updates.

This library provides classes for exporting metrics data to Google Cloud Monitoring.

Installation
Expand All @@ -15,4 +23,4 @@ References

* `OpenTelemetry Cloud Monitoring Exporter <https://opentelemetry-python.readthedocs.io/en/latest/ext/cloud_monitoring/cloud_monitoring.html>`_
* `Cloud Monitoring <https://cloud.google.com/monitoring/>`_
* `OpenTelemetry Project <https://opentelemetry.io/>`_
* `OpenTelemetry Project <https://opentelemetry.io/>`_
2 changes: 1 addition & 1 deletion opentelemetry-exporter-cloud-monitoring/setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
#
[metadata]
name = opentelemetry-exporter-cloud-monitoring
description = Cloud Monitoring integration for OpenTelemetry
description = Deprecated Cloud Monitoring integration for OpenTelemetry
long_description = file: README.rst
long_description_content_type = text/x-rst
author = OpenTelemetry Authors
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,17 @@
# Copyright 2021 Google
#
# 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.

import logging
import random
from typing import Optional, Sequence
Expand All @@ -15,6 +29,14 @@
)
from opentelemetry.sdk.metrics.export.aggregate import SumAggregator

import warnings

warnings.warn(
"Package opentelemetry-exporter-cloud-monitoring is deprecated. Please install "
"opentelemetry-exporter-gcp-monitoring instead",
DeprecationWarning,
)

logger = logging.getLogger(__name__)
MAX_BATCH_WRITE = 200
WRITE_INTERVAL = 10
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,4 @@
# See the License for the specific language governing permissions and
# limitations under the License.

__version__ = "0.10b0"
__version__ = "0.10b1"
14 changes: 14 additions & 0 deletions opentelemetry-exporter-cloud-monitoring/tests/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
# Copyright 2021 Google
#
# 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.

10 changes: 10 additions & 0 deletions opentelemetry-exporter-cloud-trace/README.rst
Original file line number Diff line number Diff line change
@@ -1,6 +1,16 @@
OpenTelemetry Cloud Trace Exporters
===================================

DEPRECATED
----------

**This package is deprecated. It will not
receive any more updates.** Please use `opentelemetry-exporter-gcp-trace
<https://pypi.org/project/opentelemetry-exporter-gcp-trace/>`_ and
`opentelemetry-propagator-gcp
<https://pypi.org/project/opentelemetry-propagator-gcp/>`_ instead. It will not
receive any more updates.

This library provides classes for exporting trace data to Google Cloud Trace.

Installation
Expand Down
2 changes: 1 addition & 1 deletion opentelemetry-exporter-cloud-trace/setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
#
[metadata]
name = opentelemetry-exporter-cloud-trace
description = Cloud Trace integration for OpenTelemetry
description = Deprecated Cloud Trace integration for OpenTelemetry
long_description = file: README.rst
long_description_content_type = text/x-rst
author = OpenTelemetry Authors
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,14 @@
)
from opentelemetry.util import types

import warnings

warnings.warn(
"Package opentelemetry-exporter-cloud-monitoring is deprecated. Please install "
"opentelemetry-exporter-gcp-monitoring instead",
DeprecationWarning,
)

logger = logging.getLogger(__name__)

MAX_NUM_LINKS = 128
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,4 @@
# See the License for the specific language governing permissions and
# limitations under the License.

__version__ = "0.10b0"
__version__ = "0.10b1"
14 changes: 14 additions & 0 deletions opentelemetry-exporter-cloud-trace/tests/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
# Copyright 2021 Google
#
# 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.

0 comments on commit 6fed3eb

Please sign in to comment.