Temporalio.Extensions.Aws.Lambda.OpenTelemetry 1.17.0

Prefix Reserved
dotnet add package Temporalio.Extensions.Aws.Lambda.OpenTelemetry --version 1.17.0
                    
NuGet\Install-Package Temporalio.Extensions.Aws.Lambda.OpenTelemetry -Version 1.17.0
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="Temporalio.Extensions.Aws.Lambda.OpenTelemetry" Version="1.17.0" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Temporalio.Extensions.Aws.Lambda.OpenTelemetry" Version="1.17.0" />
                    
Directory.Packages.props
<PackageReference Include="Temporalio.Extensions.Aws.Lambda.OpenTelemetry" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add Temporalio.Extensions.Aws.Lambda.OpenTelemetry --version 1.17.0
                    
#r "nuget: Temporalio.Extensions.Aws.Lambda.OpenTelemetry, 1.17.0"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package Temporalio.Extensions.Aws.Lambda.OpenTelemetry@1.17.0
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=Temporalio.Extensions.Aws.Lambda.OpenTelemetry&version=1.17.0
                    
Install as a Cake Addin
#tool nuget:?package=Temporalio.Extensions.Aws.Lambda.OpenTelemetry&version=1.17.0
                    
Install as a Cake Tool

AWS Lambda Worker OpenTelemetry Support

This extension adds OpenTelemetry helpers for Temporal workers running inside AWS Lambda.

Add the Temporalio.Extensions.Aws.Lambda.OpenTelemetry package from NuGet. For example, using the dotnet CLI:

dotnet add package Temporalio.Extensions.Aws.Lambda.OpenTelemetry

Quick Start

Call ApplyOpenTelemetryDefaults from the Lambda worker configure callback:

using Amazon.Lambda.Core;
using Temporalio.Common;
using Temporalio.Extensions.Aws.Lambda;
using Temporalio.Extensions.Aws.Lambda.OpenTelemetry;

private static readonly Func<object?, ILambdaContext, Task> WorkerHandler =
    TemporalLambdaWorker.CreateHandler(
        new WorkerDeploymentVersion("payments-worker", "2026-05-27"),
        options =>
        {
            options.ApplyOpenTelemetryDefaults();

            options.WorkerOptions.TaskQueue = "payments";
            options.WorkerOptions.AddWorkflow<PaymentWorkflow>();
            options.WorkerOptions.AddActivity(PaymentActivities.ChargeAsync);
        });

ApplyOpenTelemetryDefaults configures Temporal tracing with TracingInterceptor, creates an OTLP trace exporter and tracer provider, configures Core SDK metrics through a TemporalRuntime, and registers a per-invocation shutdown hook that force-flushes traces before the Lambda invocation ends. It replaces any runtime already set on options.ClientOptions.

Defaults

The OTLP collector endpoint is resolved from LambdaWorkerOpenTelemetryOptions.CollectorEndpoint, then OTEL_EXPORTER_OTLP_ENDPOINT, then http://localhost:4317, which is the endpoint expected by the AWS Distro for OpenTelemetry collector Lambda layer.

The OpenTelemetry service name is resolved from LambdaWorkerOpenTelemetryOptions.ServiceName, then OTEL_SERVICE_NAME, then AWS_LAMBDA_FUNCTION_NAME, then temporal-lambda-worker.

Core SDK metrics export every 10 seconds by default. Set MetricsExportInterval shorter than your Lambda timeout to increase the chance that at least one metrics export happens during each invocation. Core metrics are exported periodically and do not have an explicit per-invocation flush API.

options.ApplyOpenTelemetryDefaults(
    new LambdaWorkerOpenTelemetryOptions
    {
        CollectorEndpoint = "http://localhost:4317",
        ServiceName = "payments-worker",
        MetricsExportInterval = TimeSpan.FromSeconds(5),
    });

AWS Lambda Setup

Attach the ADOT collector Lambda layer and set:

OPENTELEMETRY_COLLECTOR_CONFIG_URI=/var/task/otel-collector-config.yaml

The helper uses AWS X-Ray-compatible trace IDs. It force-flushes traces on every Lambda invocation and disposes the tracer provider during the Lambda shutdown hook.

Product Compatible and additional computed target framework versions.
.NET net5.0 was computed.  net5.0-windows was computed.  net6.0 was computed.  net6.0-android was computed.  net6.0-ios was computed.  net6.0-maccatalyst was computed.  net6.0-macos was computed.  net6.0-tvos was computed.  net6.0-windows was computed.  net7.0 was computed.  net7.0-android was computed.  net7.0-ios was computed.  net7.0-maccatalyst was computed.  net7.0-macos was computed.  net7.0-tvos was computed.  net7.0-windows was computed.  net8.0 was computed.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed.  net9.0 was computed.  net9.0-android was computed.  net9.0-browser was computed.  net9.0-ios was computed.  net9.0-maccatalyst was computed.  net9.0-macos was computed.  net9.0-tvos was computed.  net9.0-windows was computed.  net10.0 was computed.  net10.0-android was computed.  net10.0-browser was computed.  net10.0-ios was computed.  net10.0-maccatalyst was computed.  net10.0-macos was computed.  net10.0-tvos was computed.  net10.0-windows was computed. 
.NET Core netcoreapp2.0 was computed.  netcoreapp2.1 was computed.  netcoreapp2.2 was computed.  netcoreapp3.0 was computed.  netcoreapp3.1 was computed. 
.NET Standard netstandard2.0 is compatible.  netstandard2.1 was computed. 
.NET Framework net461 was computed.  net462 was computed.  net463 was computed.  net47 was computed.  net471 was computed.  net472 was computed.  net48 was computed.  net481 was computed. 
MonoAndroid monoandroid was computed. 
MonoMac monomac was computed. 
MonoTouch monotouch was computed. 
Tizen tizen40 was computed.  tizen60 was computed. 
Xamarin.iOS xamarinios was computed. 
Xamarin.Mac xamarinmac was computed. 
Xamarin.TVOS xamarintvos was computed. 
Xamarin.WatchOS xamarinwatchos was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
1.17.0 678 7/13/2026