Skip to content

Commit

Permalink
add deprecation warnings for opentelemetry-exporter-google-cloud and …
Browse files Browse the repository at this point in the history
…opentelemetry-tools-google-cloud
  • Loading branch information
aabmass committed May 13, 2021
1 parent 4ace4a5 commit b1c097e
Show file tree
Hide file tree
Showing 10 changed files with 56 additions and 4 deletions.
10 changes: 10 additions & 0 deletions opentelemetry-exporter-google-cloud/README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,16 @@ OpenTelemetry Google Cloud Integration
:target: https://google-cloud-opentelemetry.readthedocs.io/en/latest/?badge=latest
:alt: Documentation Status

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/>`_ and
`opentelemetry-exporter-gcp-trace
<https://pypi.org/project/opentelemetry-exporter-gcp-trace/>`_ instead. It will
not receive any more updates.

This library provides support for:

- Exporting traces to Google Cloud Trace
Expand Down
2 changes: 1 addition & 1 deletion opentelemetry-exporter-google-cloud/setup.cfg
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[metadata]
name = opentelemetry-exporter-google-cloud
description = Google Cloud integrations for OpenTelemetry
description = Deprecated Google Cloud integrations for OpenTelemetry
long_description = file: README.rst
long_description_content_type = text/x-rst
author = Google
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,14 @@
from opentelemetry.sdk.resources import Resource
from opentelemetry.util import time_ns

import warnings

warnings.warn(
"Package opentelemetry-exporter-google-cloud is deprecated. Please install "
"opentelemetry-exporter-gcp-monitoring and opentelemetry-exporter-gcp-trace 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 @@ -73,6 +73,14 @@
from opentelemetry.trace.status import StatusCode
from opentelemetry.util import types

import warnings

warnings.warn(
"Package opentelemetry-exporter-google-cloud is deprecated. Please install "
"opentelemetry-exporter-gcp-monitoring and opentelemetry-exporter-gcp-trace 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.18b0"
__version__ = "0.18b1"
10 changes: 10 additions & 0 deletions opentelemetry-tools-google-cloud/README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,16 @@ OpenTelemetry Google Cloud Integration
:target: https://google-cloud-opentelemetry.readthedocs.io/en/latest/?badge=latest
:alt: Documentation Status

DEPRECATED
----------

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

This library provides support for:

- Detecting GCP resources like GCE, GKE, etc.
Expand Down
2 changes: 1 addition & 1 deletion opentelemetry-tools-google-cloud/setup.cfg
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[metadata]
name = opentelemetry-tools-google-cloud
description = Google Cloud propagator and resource detector for OpenTelemetry
description = Deprecated Google Cloud propagator and resource detector for OpenTelemetry
long_description = file: README.rst
long_description_content_type = text/x-rst
author = Google
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,14 @@
get_hexadecimal_trace_id,
)

import warnings

warnings.warn(
"Package opentelemetry-tools-google-cloud is deprecated. Please install "
"opentelemetry-resourcedetector-gcp and opentelemetry-propagator-gcp instead",
DeprecationWarning,
)

_TRACE_CONTEXT_HEADER_NAME = "x-cloud-trace-context"
_TRACE_CONTEXT_HEADER_FORMAT = r"(?P<trace_id>[0-9a-f]{32})\/(?P<span_id>[\d]{1,20});o=(?P<trace_flags>\d+)"
_TRACE_CONTEXT_HEADER_RE = re.compile(_TRACE_CONTEXT_HEADER_FORMAT)
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.18b0"
__version__ = "0.18b1"
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,14 @@
from opentelemetry.context import attach, detach, set_value
from opentelemetry.sdk.resources import Resource, ResourceDetector

import warnings

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

_GCP_METADATA_URL = (
"http://metadata.google.internal/computeMetadata/v1/?recursive=true"
)
Expand Down

0 comments on commit b1c097e

Please sign in to comment.