AWS.Messaging.Telemetry.OpenTelemetry 0.23.0

Prefix Reserved
dotnet add package AWS.Messaging.Telemetry.OpenTelemetry --version 0.23.0
                    
NuGet\Install-Package AWS.Messaging.Telemetry.OpenTelemetry -Version 0.23.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="AWS.Messaging.Telemetry.OpenTelemetry" Version="0.23.0" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="AWS.Messaging.Telemetry.OpenTelemetry" Version="0.23.0" />
                    
Directory.Packages.props
<PackageReference Include="AWS.Messaging.Telemetry.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 AWS.Messaging.Telemetry.OpenTelemetry --version 0.23.0
                    
#r "nuget: AWS.Messaging.Telemetry.OpenTelemetry, 0.23.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.
#addin nuget:?package=AWS.Messaging.Telemetry.OpenTelemetry&version=0.23.0
                    
Install as a Cake Addin
#tool nuget:?package=AWS.Messaging.Telemetry.OpenTelemetry&version=0.23.0
                    
Install as a Cake Tool

OpenTelemetry plugin for AWS Message Processing Framework for .NET

nuget downloads

Notice: This library is in developer preview. It provides early access to upcoming features in the AWS Message Processing Framework for .NET. Any releases prior to 1.0.0 might include breaking changes.

This package is an Instrumentation Library, which instruments the AWS Message Processing Framework for .NET to collect traces about messages that are sent and received.

Configuration

1. Install Packages

Add a reference to AWS.Messaging.Telemetry.OpenTelemetry. In this example, we're going to configure OpenTelemetry on our IServiceCollection, so also add a reference to OpenTelemetry.Extensions.Hosting. This is not required if starting and stopping tracing via CreateTracerProviderBuilder.

You may also add a reference to one or more exporters to visualize your telemetry data.

dotnet add package AWS.Messaging.Telemetry.OpenTelemetry
dotnet add package OpenTelemetry.Extensions.Hosting

2. Enable Instrumentation

In the Startup class add a call to AddOpenTelemetry to configure OpenTelemetry. On the TracerProviderBuilder, call AddAWSMessagingInstrumentation to begin capturing traces for the AWS Message Processing Framework for .NET.

public class Startup
{
    public void ConfigureServices(IServiceCollection services)
    {
        services.AddAWSMessageBus(builder =>
        {
            builder.AddSQSPoller("https://sqs.us-west-2.amazonaws.com/012345678910/MPF");
            builder.AddMessageHandler<ChatMessageHandler, ChatMessage>("chatMessage");
        });

        services.AddOpenTelemetry()
            .ConfigureResource(resource => resource.AddService("myApplication"))
            .WithTracing(tracing => tracing
                .AddAWSMessagingInstrumentation()
                .AddConsoleExporter());
    }
}

AWS X-Ray Linked Spans Configuration

  1. If you are using OTEL with X-Ray, make sure you configure your OTEL setup to use OTLP for Cloudwatch. This is needed in order to view linked spans in the AWS X-Ray console. https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/CloudWatch-OTLPSimplesetup.html

Security

See CONTRIBUTING for more information.

License

This project is licensed under the Apache-2.0 License.

Product Compatible and additional computed target framework versions.
.NET net8.0 is compatible.  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. 
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
0.23.0 877 6/3/2025
0.22.0 1,862 5/5/2025
0.21.0 418 4/28/2025
0.20.0-preview 145 4/1/2025
0.9.2 11,155 2/20/2025
0.9.1 21,198 4/22/2024
0.9.0 149 3/26/2024
0.1.1-beta 95 3/20/2024
0.1.0-beta 324 12/8/2023