OpenTelemetry Cloud Monitoring Exporter

class opentelemetry.exporter.cloud_monitoring.CloudMonitoringMetricsExporter(project_id=None, client=None)[source]

Bases: opentelemetry.sdk.metrics.export.MetricsExporter

Implementation of Metrics Exporter to Google Cloud Monitoring

export(metric_records)[source]

Exports a batch of telemetry data.

Parameters

metric_records (Sequence[MetricRecord]) – A sequence of MetricRecord s. A MetricRecord contains the metric to be exported, the labels associated with that metric, as well as the aggregator used to export the current checkpointed value.

Return type

MetricsExportResult

Returns

The result of the export