Skip to content

Modify metrics example to export via OTLP to telemetry.googleapis.com#447

Draft
psx95 wants to merge 1 commit into
GoogleCloudPlatform:mainfrom
psx95:modify-metrics-example-otlp
Draft

Modify metrics example to export via OTLP to telemetry.googleapis.com#447
psx95 wants to merge 1 commit into
GoogleCloudPlatform:mainfrom
psx95:modify-metrics-example-otlp

Conversation

@psx95

@psx95 psx95 commented Jun 17, 2026

Copy link
Copy Markdown
Contributor

Added OtlpGrpcMetricExporter to MetricsExporterExample to export metrics to https://telemetry.googleapis.com.
Added dependencies to build.gradle.
Merged GOOGLE_CLOUD_PROJECT into Resource attributes for OTLP.

TAG=agy
CONV=f9409d85-cca6-4364-9198-2552404e15d8

@psx95 psx95 force-pushed the modify-metrics-example-otlp branch from 5879b0c to 85d0195 Compare June 17, 2026 18:03
Modified the metrics example to export metrics via both the custom GoogleCloudMetricExporter (configured manually) and the OTLP exporter (configured via autoconfigure).
Leveraged AutoConfiguredOpenTelemetrySdk to automatically configure the OTLP exporter and automatically inject GCP credentials using the opentelemetry-gcp-auth-extension.
The existing code that configures GoogleCloudMetricExporter remains intact and is registered to the SDK via a MeterProvider customizer.

TAG=agy
CONV=f9409d85-cca6-4364-9198-2552404e15d8
@psx95 psx95 force-pushed the modify-metrics-example-otlp branch from 85d0195 to f17f6d6 Compare June 17, 2026 18:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant