Add Google Cloud Run OpenTelemetry worker sample - #353
Draft
seanbollin wants to merge 5 commits into
Draft
seanbollin wants to merge 5 commits into
seanbollin wants to merge 5 commits into
Conversation
Adds gcp_cloud_run/: a long-running Temporal worker for Google Cloud Run worker pools that uses the temporalio.contrib.gcp.cloud_run OpenTelemetryPlugin to export Core metrics and traces over OTLP/gRPC to a local OpenTelemetry Collector sidecar (worker, workflow, starter, collector-config.yaml, worker-pool.yaml, Dockerfile, README). Note: the cloud-run-worker-otel SDK extra is not yet released, so pyproject.toml temporarily uses an editable local path source to resolve temporalio against a sibling sdk-python checkout. Replace it with a released temporalio[cloud-run-worker-otel] and regenerate uv.lock before this is marked ready. Co-authored-by: Edward Amsden <edward.amsden@temporal.io>
Make TEMPORAL_API_KEY optional and enable TLS only when an API key is present, so the sample connects to a plaintext dev server or self-hosted cluster, not just Temporal Cloud (matches the Go and Java samples). Verified by deploying to Cloud Run against a dev server.
Move the sample from gcp_cloud_run/ to gcp/cloud_run/opentelemetry/ (and its test to tests/gcp/cloud_run/opentelemetry/) so the layout mirrors the now-merged SDK package temporalio.contrib.gcp.cloud_run.opentelemetry and leaves room for additional Cloud Run samples (e.g. worker ID) under gcp/cloud_run/. - Fix the plugin import to temporalio.contrib.gcp.cloud_run.opentelemetry. - Update internal imports to gcp.cloud_run.opentelemetry.*. - Add package __init__.py at the new gcp/ and gcp/cloud_run/ levels. - Fix the local uv source path depth, Dockerfile package path/CMD, README paths, and rename the dependency group to gcp-cloud-run-opentelemetry.
seanbollin
force-pushed
the
gcp-cloud-run-otel
branch
from
September 18, 2026 17:33
8fcba46 to
4c71b06
Compare
seanbollin
force-pushed
the
gcp-cloud-run-otel
branch
from
September 18, 2026 23:28
aff3259 to
73aba71
Compare
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.
Runs a Temporal Worker on a Google Cloud Run worker pool using the Cloud Run OpenTelemetry plugin (
temporalio.contrib.gcp.cloud_run.opentelemetry), exporting Temporal Core metrics and traces over OTLP to a Google-Built OpenTelemetry Collector sidecar.Deploy with the
gcloudflow ingcp/cloud_run/opentelemetry/README.md(build the image, thengcloud run worker-pools replace /tmp/worker-pool.yaml), then start a Workflow from the repo root:Uses the released
temporalio[cloud-run-worker-otel]>=1.33.0from PyPI.