A Python OpenTelemetry exporter for the OCI Monitoring Service.
Project description
opentelemetry-exporter-oci-monitoring
A Python OpenTelemetry exporter for the OCI Monitoring Service.
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.
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.
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file opentelemetry_exporter_oci_monitoring-0.6.0.tar.gz
.
File metadata
- Download URL: opentelemetry_exporter_oci_monitoring-0.6.0.tar.gz
- Upload date:
- Size: 6.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/5.1.0 CPython/3.12.5
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 21c2b73926e596f94680d2a895510c5df0d47b7fb48eaf17aab8f2e09cbd78fc |
|
MD5 | 76340ed9d97220c6566837ff8f18b134 |
|
BLAKE2b-256 | 0dff1a733067c43da7597289621a0ac21cc8ea094b3c17a63b0bc593a1122dba |
File details
Details for the file opentelemetry_exporter_oci_monitoring-0.6.0-py3-none-any.whl
.
File metadata
- Download URL: opentelemetry_exporter_oci_monitoring-0.6.0-py3-none-any.whl
- Upload date:
- Size: 7.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/5.1.0 CPython/3.12.5
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 9c981cac8220e356b7cb855571299234886de0c3dd7a558ee2b541c334c2ec20 |
|
MD5 | 9a5ce95465d4bed8438f0a3ac59e3079 |
|
BLAKE2b-256 | 94a569f28cdeb77ea08b7d66a454a39405dddab7551c6630f8a29ae454836681 |