Add Google Cloud OpenTelemetry plugin#2955
Draft
eamsden wants to merge 3 commits into
Draft
Conversation
This was referenced Jul 16, 2026
Use the coordinated 60-second metrics interval for the GCP plugin while preserving explicit overrides. Document an unbatched Managed Prometheus metrics pipeline so periodic exports and forced shutdown flushes cannot be combined into a duplicate-series request.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What was changed
temporal-gcpmodule andGcpOpenTelemetryPluginas a thin Google Cloud Run configuration layer overtemporal-opentelemetry.googlemanagedprometheuswithout a batch processor, while traces retain a dedicated five-second batch processor, so periodic exports and forced shutdown flushes cannot be combined into a duplicate-series request.Why?
Temporal Java workers running on Google Cloud Run need an SDK-supported path for exporting Temporal metrics and traces through the standard local OTLP collector sidecar. Keeping Google resource detection and exporters in the collector avoids Google Cloud client dependencies and direct-export configuration in the worker process. Worker pools are the preferred Cloud Run deployment for continuously polling Temporal workers.
A one-second metric interval can interact poorly with a collector batch processor because the batch may combine multiple cumulative snapshots of each Temporal metric into one Google Monitoring request. The coordinated GCP-specific sixty-second default prevents ordinary periodic exports from colliding while remaining configurable. Passing cumulative metrics directly to Managed Prometheus without a collector batch makes a forced shutdown flush safe regardless of its timing relative to the last periodic export.
Checklist
Closes: N/A.
How was this tested:
./gradlew --offline spotlessApply :temporal-gcp:test :temporal-gcp:javadoc :temporal-gcp:generatePomFileForMavenJavaPublication./gradlew --offline spotlessApply :temporal-opentelemetry:test :temporal-gcp:build :temporal-bom:generatePomFileForMavenJavaPublicationtemporal-gcpPOM only publishestemporal-opentelemetryas a dependency.Any docs updates needed?
contrib/temporal-gcp/README.mdwith setup, deployment requirements, lifecycle, collector-sidecar requirements, metrics interval and batching guidance, and resource-detection caveats.Breaking changes?
No.
Server PR
None.