AWS.Messaging.Telemetry.OpenTelemetry 0.9.1

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

// Install AWS.Messaging.Telemetry.OpenTelemetry as a Cake Tool
#tool nuget:?package=AWS.Messaging.Telemetry.OpenTelemetry&version=0.9.1                

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());
    }
}

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 net6.0 is compatible.  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. 
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.9.1 8,881 4/22/2024
0.9.0 117 3/26/2024
0.1.1-beta 85 3/20/2024
0.1.0-beta 316 12/8/2023