GoogleCloudPlatform / opentelemetry-operations-java

Apache License 2.0
71 stars 38 forks source link

Add support for CreateServiceTimeSeries in metrics exporter #307

Closed dashpole closed 5 months ago

dashpole commented 6 months ago

Similar to https://github.com/GoogleCloudPlatform/opentelemetry-operations-go/issues/820.

Add configuration to the metrics exporter to use CreateServiceTimeSeries instead of createtimeseries: https://github.com/GoogleCloudPlatform/opentelemetry-operations-java/blob/398e552233be9261351706dbb0eaa0eca65fb5bd/exporters/metrics/src/main/java/com/google/cloud/opentelemetry/metric/CloudMetricClientImpl.java#L40

Do not create metric descriptors when using createserivcetimeseries

dashpole commented 6 months ago

Support already exists in the cloud monitoring client library: https://github.com/googleapis/google-cloud-java/blob/e153330a6fca042fc175aeddb10af77524a1a401/java-monitoring/google-cloud-monitoring/src/main/java/com/google/cloud/monitoring/v3/MetricServiceClient.java#L1973