# opentelemetry-exporter-oci-monitoring
[![pipeline status](https://github.com/bjoern-reetz/opentelemetry-python-exporter-oci-monitoring/actions/workflows/publish.yml/badge.svg?main)](https://github.com/bjoern-reetz/opentelemetry-exporter-oci-monitoring/actions/workflows/publish.yml)
[![latest package version](https://img.shields.io/pypi/v/opentelemetry-exporter-oci-monitoring)](https://pypi.org/project/opentelemetry-exporter-oci-monitoring/)
[![supported python versions](https://img.shields.io/pypi/pyversions/opentelemetry-exporter-oci-monitoring)](https://www.python.org/)
[![PyPI - Downloads](https://img.shields.io/pypi/dm/opentelemetry-exporter-oci-monitoring)](https://pypistats.org/packages/opentelemetry-exporter-oci-monitoring)
[![license](./images/license.svg)](./LICENSE)
[![source files coverage](./images/coverage.svg)](https://coverage.readthedocs.io/)
[![pyright](./images/pyright.svg)](https://microsoft.github.io/pyright)
[![ruff](./images/ruff.svg)](https://docs.astral.sh/ruff)
[![pre-commit](./images/pre-commit.svg)](https://pre-commit.com/)
A Python OpenTelemetry exporter for the OCI Monitoring Service.
```bash
pip install opentelemetry-exporter-oci-monitoring
```
This software is in an early development phase. Feel free to use it at your own risk.
**Histograms are not yet implemented and will be skipped during export.**
```python
from oci.monitoring import MonitoringClient
from opentelemetry_exporter_oci_monitoring import MetricsSerializer
from opentelemetry_exporter_oci_monitoring.utils import make_default_exporter
from opentelemetry.sdk.metrics.export import ConsoleMetricExporter
client = MonitoringClient(service_endpoint="https://telemetry-ingestion.eu-frankfurt-1.oraclecloud.com", ...)
exporter = make_default_exporter(client, namespace="my-met-ns", resource_group="my-res-grp", compartment_id="ocid1.compartment.abc123")
# for local development, you can export the converted metrics to stdout
metrics_serializer = MetricsSerializer(exporter.converter)
console_exporter = ConsoleMetricExporter(formatter=metrics_serializer)
```
Remember to set the service endpoint to a `telemetry-ingestion` URL (e.g. `https://telemetry-ingestion.eu-frankfurt-1.oraclecloud.com`) when creating the metrics client. For more details refer to the [OCI Documentation of PostMetricData API](https://docs.oracle.com/en-us/iaas/api/#/en/monitoring/20180401/MetricData/PostMetricData).
Raw data
{
"_id": null,
"home_page": "https://github.com/bjoern-reetz/opentelemetry-python-exporter-oci-monitoring",
"name": "opentelemetry-exporter-oci-monitoring",
"maintainer": null,
"docs_url": null,
"requires_python": "<4.0,>=3.8",
"maintainer_email": null,
"keywords": "opentelemetry, exporter, oci, monitoring",
"author": "Bj\u00f6rn Reetz",
"author_email": "git@bjoern-reetz.de",
"download_url": "https://files.pythonhosted.org/packages/0d/ff/1a733067c43da7597289621a0ac21cc8ea094b3c17a63b0bc593a1122dba/opentelemetry_exporter_oci_monitoring-0.6.0.tar.gz",
"platform": null,
"description": "# opentelemetry-exporter-oci-monitoring\n\n[![pipeline status](https://github.com/bjoern-reetz/opentelemetry-python-exporter-oci-monitoring/actions/workflows/publish.yml/badge.svg?main)](https://github.com/bjoern-reetz/opentelemetry-exporter-oci-monitoring/actions/workflows/publish.yml)\n[![latest package version](https://img.shields.io/pypi/v/opentelemetry-exporter-oci-monitoring)](https://pypi.org/project/opentelemetry-exporter-oci-monitoring/)\n[![supported python versions](https://img.shields.io/pypi/pyversions/opentelemetry-exporter-oci-monitoring)](https://www.python.org/)\n[![PyPI - Downloads](https://img.shields.io/pypi/dm/opentelemetry-exporter-oci-monitoring)](https://pypistats.org/packages/opentelemetry-exporter-oci-monitoring)\n[![license](./images/license.svg)](./LICENSE)\n[![source files coverage](./images/coverage.svg)](https://coverage.readthedocs.io/)\n[![pyright](./images/pyright.svg)](https://microsoft.github.io/pyright)\n[![ruff](./images/ruff.svg)](https://docs.astral.sh/ruff)\n[![pre-commit](./images/pre-commit.svg)](https://pre-commit.com/)\n\nA Python OpenTelemetry exporter for the OCI Monitoring Service.\n\n```bash\npip install opentelemetry-exporter-oci-monitoring\n```\n\nThis software is in an early development phase. Feel free to use it at your own risk.\n\n**Histograms are not yet implemented and will be skipped during export.**\n\n\n```python\nfrom oci.monitoring import MonitoringClient\nfrom opentelemetry_exporter_oci_monitoring import MetricsSerializer\nfrom opentelemetry_exporter_oci_monitoring.utils import make_default_exporter\nfrom opentelemetry.sdk.metrics.export import ConsoleMetricExporter\n\nclient = MonitoringClient(service_endpoint=\"https://telemetry-ingestion.eu-frankfurt-1.oraclecloud.com\", ...)\nexporter = make_default_exporter(client, namespace=\"my-met-ns\", resource_group=\"my-res-grp\", compartment_id=\"ocid1.compartment.abc123\")\n\n# for local development, you can export the converted metrics to stdout\n\nmetrics_serializer = MetricsSerializer(exporter.converter)\nconsole_exporter = ConsoleMetricExporter(formatter=metrics_serializer)\n```\n\nRemember to set the service endpoint to a `telemetry-ingestion` URL (e.g. `https://telemetry-ingestion.eu-frankfurt-1.oraclecloud.com`) when creating the metrics client. For more details refer to the [OCI Documentation of PostMetricData API](https://docs.oracle.com/en-us/iaas/api/#/en/monitoring/20180401/MetricData/PostMetricData).\n\n",
"bugtrack_url": null,
"license": "MIT",
"summary": "A Python OpenTelemetry exporter for the OCI Monitoring Service.",
"version": "0.6.0",
"project_urls": {
"Documentation": "https://github.com/bjoern-reetz/opentelemetry-python-exporter-oci-monitoring",
"Homepage": "https://github.com/bjoern-reetz/opentelemetry-python-exporter-oci-monitoring",
"Repository": "https://github.com/bjoern-reetz/opentelemetry-python-exporter-oci-monitoring"
},
"split_keywords": [
"opentelemetry",
" exporter",
" oci",
" monitoring"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "94a569f28cdeb77ea08b7d66a454a39405dddab7551c6630f8a29ae454836681",
"md5": "9a5ce95465d4bed8438f0a3ac59e3079",
"sha256": "9c981cac8220e356b7cb855571299234886de0c3dd7a558ee2b541c334c2ec20"
},
"downloads": -1,
"filename": "opentelemetry_exporter_oci_monitoring-0.6.0-py3-none-any.whl",
"has_sig": false,
"md5_digest": "9a5ce95465d4bed8438f0a3ac59e3079",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": "<4.0,>=3.8",
"size": 6978,
"upload_time": "2024-08-26T10:29:28",
"upload_time_iso_8601": "2024-08-26T10:29:28.312016Z",
"url": "https://files.pythonhosted.org/packages/94/a5/69f28cdeb77ea08b7d66a454a39405dddab7551c6630f8a29ae454836681/opentelemetry_exporter_oci_monitoring-0.6.0-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "0dff1a733067c43da7597289621a0ac21cc8ea094b3c17a63b0bc593a1122dba",
"md5": "76340ed9d97220c6566837ff8f18b134",
"sha256": "21c2b73926e596f94680d2a895510c5df0d47b7fb48eaf17aab8f2e09cbd78fc"
},
"downloads": -1,
"filename": "opentelemetry_exporter_oci_monitoring-0.6.0.tar.gz",
"has_sig": false,
"md5_digest": "76340ed9d97220c6566837ff8f18b134",
"packagetype": "sdist",
"python_version": "source",
"requires_python": "<4.0,>=3.8",
"size": 6260,
"upload_time": "2024-08-26T10:29:29",
"upload_time_iso_8601": "2024-08-26T10:29:29.275635Z",
"url": "https://files.pythonhosted.org/packages/0d/ff/1a733067c43da7597289621a0ac21cc8ea094b3c17a63b0bc593a1122dba/opentelemetry_exporter_oci_monitoring-0.6.0.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2024-08-26 10:29:29",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "bjoern-reetz",
"github_project": "opentelemetry-python-exporter-oci-monitoring",
"travis_ci": false,
"coveralls": false,
"github_actions": true,
"lcname": "opentelemetry-exporter-oci-monitoring"
}