Add Cloud Run worker OpenTelemetry sample - #528
Draft
seanbollin wants to merge 2 commits into
Draft
Conversation
Adds cloud-run-worker/: a long-running Temporal worker for Google Cloud Run worker pools that uses the contrib/gcp/cloudrun OpenTelemetry plugin to export Core metrics and traces over OTLP/gRPC to a local OpenTelemetry Collector sidecar (worker + collector container manifest, Dockerfile, cloudbuild, README). Note: the SDK module contrib/gcp/cloudrun is not yet released, so go.mod temporarily uses local replace directives to resolve it against a sibling sdk-go checkout. Remove those before this is marked ready and pin the released module versions. Co-authored-by: Edward Amsden <edward.amsden@temporal.io> Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Verified by deploying the sample to Cloud Run: - Replace the invalid container dependsOn field with the run.googleapis.com/container-dependencies annotation (the WorkerPool API rejects dependsOn); matches the Java and Python samples. - Bind the collector health_check on 0.0.0.0:13133 so the Cloud Run startup probe can reach it (localhost fails the probe and the instance never starts). - Bump the module go directive to 1.26.0 to match contrib/gcp/cloudrun. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
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.
Summary
Adds
cloud-run-worker/: a long-running Temporal worker for Google Cloud Run worker pools that uses the newcontrib/gcp/cloudrunOpenTelemetry plugin to export Core metrics and traces over OTLP/gRPC to a local OpenTelemetry Collector sidecar. Includes the worker + starter, a greeting workflow/activity, an OTel collector config (metrics →googlemanagedprometheuswith no batch processor; traces →googlecloud), a Cloud Run worker-pool manifest, a Dockerfile, and a README.Depends on the unreleased
go.temporal.io/sdk/contrib/gcp/cloudrun(and itsotlpworkerdependency) from temporalio/sdk-go#2588. To keep it buildable locally,go.modtemporarily uses two localreplacedirectives pointing at a siblingsdk-gocheckout. Before marking ready:contrib/opentelemetry/otlpworker, thencontrib/gcp/cloudrunreplacedirectives fromgo.modand pin the released versionsRelated
SDK PR: temporalio/sdk-go#2588. Cross-SDK Cloud Run OTel preview (Go/Java/Python/.NET).
🤖 Generated with Claude Code