OpenTelemetry common-core refactor - #844
Merged
Merged
Conversation
eamsden
force-pushed
the
ea/pr831-otel-refactor
branch
from
August 17, 2026 22:40
d6c9223 to
901e5a6
Compare
eamsden
marked this pull request as ready for review
August 17, 2026 23:38
jmaeagle99
reviewed
Aug 17, 2026
jmaeagle99
approved these changes
Aug 18, 2026
This was referenced Aug 19, 2026
seanbollin
added a commit
to temporalio/sdk-java
that referenced
this pull request
Aug 27, 2026
Adds a Cloud Run serverless-worker OpenTelemetry integration, mirroring the approved .NET SDK common-core refactor (temporalio/sdk-dotnet#844) and building on #2955. - New module temporal-gcp-cloud-run (io.temporal.gcp.cloudrun): a CloudRunOpenTelemetryPlugin that exports Core metrics and tracing spans over OTLP/gRPC to a local OpenTelemetry Collector sidecar. Cloud Run specifics only (service name from CLOUD_RUN_WORKER_POOL/K_SERVICE, 60s report interval, deferred shutdown flush); depends only on temporal-opentelemetry, no Google client libraries. - Extract a shared OpenTelemetryWorker.resolveServiceName(env, default, fallbackEnvVars...) into the provider-neutral core and add OpenTelemetryPlugin.Builder.getMetricsReportInterval() (both additive). - Refactor the AWS Lambda OtelLambdaWorkerConfigurationHelper onto the shared resolver with no public API or behavior change (existing tests unmodified). Co-authored-by: Edward Amsden <edward.amsden@temporal.io> 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.
What was changed
Temporalio.Extensions.Gcp.CloudRun.OpenTelemetrypackage for Temporal workers running on Google Cloud Run (by @seanbollin).Temporalio.Extensions.OpenTelemetry, including resolved options, Temporal runtime metrics, interceptor insertion, and bounded force-flush/task orchestration.Why?
The AWS Lambda and GCP Cloud Run extensions had near-identical OpenTelemetry setup and shutdown implementations. Sharing the provider-neutral behavior reduces maintenance and drift without making the full OpenTelemetry SDK/exporter dependency graph transitive for users of the lightweight
Temporalio.Extensions.OpenTelemetrypackage.Checklist
netstandard2.0andnet462; both provider packages and the test assembly built with 0 warnings and 0 errors.Temporalio,OpenTelemetry.Api, andSystem.Diagnostics.DiagnosticSource; the full SDK and OTLP exporter are dependencies only of the provider packages.