Table of Contents

Class GoogleCloudRunOpenTelemetryShutdown

Namespace
Temporalio.Extensions.Gcp.CloudRun.OpenTelemetry
Assembly
Temporalio.Extensions.Gcp.CloudRun.OpenTelemetry.dll

Owns the tracer provider created by ApplyGoogleCloudRunOpenTelemetryDefaults(TemporalClientConnectOptions, GoogleCloudRunOpenTelemetryOptions?) and flushes and releases it on shutdown.

public sealed class GoogleCloudRunOpenTelemetryShutdown : IDisposable
Inheritance
GoogleCloudRunOpenTelemetryShutdown
Implements
Inherited Members

Remarks

The same handle may back multiple clients and workers. Call FlushAsync(TimeSpan, CancellationToken) and/or Dispose() only after every worker and client using the options has stopped. WARNING: Google Cloud Run support is experimental.

Methods

Dispose()

Dispose the owned tracer provider, flushing any remaining traces.

public void Dispose()

FlushAsync(TimeSpan, CancellationToken)

Force-flush buffered traces without shutting down the provider.

public Task FlushAsync(TimeSpan flushTimeout, CancellationToken cancellationToken = default)

Parameters

flushTimeout TimeSpan

Maximum time to wait for the flush.

cancellationToken CancellationToken

Cancellation token.

Returns

Task

A task for the flush.

Remarks

Core SDK metrics are exported periodically by the runtime and have no explicit flush API, so this flushes traces only. Call it during the graceful-shutdown window after stopping the worker.