Closed damjad closed 6 months ago
Is it because the implementation is empty because of an extra collect call when the thread is ended?
Is it because the implementation is empty because of an extra collect call when the thread is ended?
Yes, SDK will flush any remaining metrics at shutdown, assuming it is correctly called. The exporter's shutdown function would be for cleaning up or shutting down the exporter itself.
Did you encounter any specific issue?
Nothing, in particular, I needed to make sure that it worked without explicitly calling shutdown
.
CloudMonitoringMetricsExporter
does not export metrics on shutdown events because the implementation is empty.https://github.com/GoogleCloudPlatform/opentelemetry-operations-python/blob/6b7211df1ebbb37d9a16141346ffec3a7a5c90d9/opentelemetry-exporter-gcp-monitoring/src/opentelemetry/exporter/cloud_monitoring/__init__.py#L373-L374