-
Notifications
You must be signed in to change notification settings - Fork 45
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
separate trace/metrics packages out for staggered 1.0 release (#107)
* separate trace/metrics packages out for staggered 1.0 release * update docs * move ambiguous version.py files
- Loading branch information
Showing
30 changed files
with
492 additions
and
75 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,65 @@ | ||
OpenTelemetry Google Cloud Monitoring Exporter | ||
============================================== | ||
|
||
.. image:: https://badge.fury.io/py/opentelemetry-exporter-cloud-monitoring.svg | ||
:target: https://badge.fury.io/py/opentelemetry-exporter-cloud-monitoring | ||
|
||
.. image:: https://readthedocs.org/projects/google-cloud-opentelemetry/badge/?version=latest | ||
:target: https://google-cloud-opentelemetry.readthedocs.io/en/latest/?badge=latest | ||
:alt: Documentation Status | ||
|
||
This library provides support for exporting metrics to Google Cloud | ||
Monitoring. | ||
|
||
For resource detection and GCP trace context propagation, see | ||
`opentelemetry-tools-google-cloud | ||
<https://pypi.org/project/opentelemetry-tools-google-cloud/>`_. For the | ||
Google Cloud Trace exporter, see `opentelemetry-exporter-cloud-trace | ||
<https://pypi.org/project/opentelemetry-exporter-cloud-trace/>`_. | ||
|
||
Installation | ||
------------ | ||
|
||
.. code:: bash | ||
pip install opentelemetry-exporter-cloud-monitoring | ||
Usage | ||
----- | ||
|
||
.. code:: python | ||
import time | ||
from opentelemetry import metrics | ||
from opentelemetry.exporter.cloud_monitoring import ( | ||
CloudMonitoringMetricsExporter, | ||
) | ||
from opentelemetry.sdk.metrics import Counter, MeterProvider | ||
metrics.set_meter_provider(MeterProvider()) | ||
meter = metrics.get_meter(__name__) | ||
metrics.get_meter_provider().start_pipeline( | ||
meter, CloudMonitoringMetricsExporter(), 5 | ||
) | ||
requests_counter = meter.create_counter( | ||
name="request_counter", | ||
description="number of requests", | ||
unit="1", | ||
value_type=int | ||
) | ||
staging_labels = {"environment": "staging"} | ||
for i in range(20): | ||
requests_counter.add(25, staging_labels) | ||
time.sleep(10) | ||
References | ||
---------- | ||
|
||
* `Cloud Monitoring <https://cloud.google.com/monitoring>`_ | ||
* `OpenTelemetry Project <https://opentelemetry.io/>`_ |
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
[metadata] | ||
name = opentelemetry-exporter-cloud-monitoring | ||
description = Google Cloud Monitoring exporter for OpenTelemetry | ||
long_description = file: README.rst | ||
long_description_content_type = text/x-rst | ||
author = Google | ||
author_email = [email protected] | ||
url = https://github.com/GoogleCloudPlatform/opentelemetry-operations-python/tree/master/opentelemetry-exporter-cloud-monitoring | ||
platforms = any | ||
license = Apache-2.0 | ||
classifiers = | ||
Development Status :: 4 - Beta | ||
Intended Audience :: Developers | ||
License :: OSI Approved :: Apache Software License | ||
Programming Language :: Python | ||
Programming Language :: Python :: 3 | ||
Programming Language :: Python :: 3.5 | ||
Programming Language :: Python :: 3.6 | ||
Programming Language :: Python :: 3.7 | ||
Programming Language :: Python :: 3.8 | ||
|
||
[options] | ||
python_requires = >=3.5 | ||
package_dir= | ||
=src | ||
packages=find_namespace: | ||
install_requires = | ||
google-cloud-monitoring <2.0.0 | ||
opentelemetry-api ~= 0.17b0 | ||
opentelemetry-sdk ~= 0.17b0 | ||
|
||
[options.packages.find] | ||
where = src | ||
|
||
[options.extras_require] | ||
test = |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
# Copyright 2021 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. | ||
import os | ||
|
||
import setuptools | ||
|
||
BASE_DIR = os.path.dirname(__file__) | ||
VERSION_FILENAME = os.path.join( | ||
BASE_DIR, | ||
"src", | ||
"opentelemetry", | ||
"exporter", | ||
"cloud_monitoring", | ||
"version.py", | ||
) | ||
PACKAGE_INFO = {} | ||
with open(VERSION_FILENAME) as f: | ||
exec(f.read(), PACKAGE_INFO) | ||
|
||
setuptools.setup( | ||
version=PACKAGE_INFO["__version__"], | ||
package_data={"opentelemetry": ["py.typed"]}, | ||
) |
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,74 @@ | ||
# Changelog | ||
|
||
## Unreleased | ||
|
||
- Split cloud trace and cloud monitoring exporters into separate packages | ||
([#107](https://github.com/GoogleCloudPlatform/opentelemetry-operations-python/pull/107)) | ||
|
||
## Version 0.18b0 | ||
|
||
Released 2021-03-31 | ||
|
||
## Version 0.17b0 | ||
|
||
Released 2021-02-04 | ||
|
||
## Version 0.16b1 | ||
|
||
Released 2021-01-14 | ||
|
||
- Add mapping between opentelemetry and google traces attributes | ||
([#90](https://github.com/GoogleCloudPlatform/opentelemetry-operations-python/pull/90)) | ||
|
||
## Version 0.15b0 | ||
|
||
Released 2020-11-04 | ||
|
||
## Version 0.14b0 | ||
|
||
Released 2020-10-27 | ||
|
||
- Fix breakages for opentelemetry-python v0.14b0 | ||
([#79](https://github.com/GoogleCloudPlatform/opentelemetry-operations-python/pull/79), | ||
[#83](https://github.com/GoogleCloudPlatform/opentelemetry-operations-python/pull/83)) | ||
|
||
## Version 0.13b0 | ||
|
||
Released 2020-09-17 | ||
|
||
## Version 0.12b0 | ||
|
||
Released 2020-08-17 | ||
|
||
- Add spankind support for trace exporter | ||
([#58](https://github.com/GoogleCloudPlatform/opentelemetry-operations-python/pull/58)) | ||
|
||
## Version 0.11b0 | ||
|
||
Released 2020-08-05 | ||
|
||
- Add support for resources | ||
([#853](https://github.com/open-telemetry/opentelemetry-python/pull/853)) | ||
|
||
## Version 0.10b0 | ||
|
||
Released 2020-06-23 | ||
|
||
- Add g.co/agent label for Google internal metrics tracking | ||
([#833](https://github.com/open-telemetry/opentelemetry-python/pull/833)) | ||
- Adding trouble-shooting tips | ||
([#827](https://github.com/open-telemetry/opentelemetry-python/pull/827)) | ||
- Added Cloud Trace context propagation | ||
([#819](https://github.com/open-telemetry/opentelemetry-python/pull/819)) | ||
- Added tests to tox coverage files | ||
([#804](https://github.com/open-telemetry/opentelemetry-python/pull/804)) | ||
- Add ability for exporter to add unique identifier | ||
([#841](https://github.com/open-telemetry/opentelemetry-python/pull/841)) | ||
- Added tests to tox coverage files | ||
([#804](https://github.com/open-telemetry/opentelemetry-python/pull/804)) | ||
|
||
## 0.9b0 | ||
|
||
Released 2020-06-10 | ||
|
||
- Initial release |
Oops, something went wrong.