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
<PackageReference Include="AWS.Messaging.Telemetry.OpenTelemetry" Version="0.9.1" />
paket add AWS.Messaging.Telemetry.OpenTelemetry --version 0.9.1
#r "nuget: AWS.Messaging.Telemetry.OpenTelemetry, 0.9.1"
// 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
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());
}
}
Useful Links
- AWS Message Processing Framework for .NET Design Document
- Sample Applications - contains sample applications of a publisher service, long-running subscriber service, Lambda function handlers, and using Polly to override the framework's built-in backoff logic.
- Developer Guide
- API Reference
- Introducing the AWS Message Processing Framework for .NET (Preview) Blog Post - walks through creating simple applications to send and receive SQS messages.
Security
See CONTRIBUTING for more information.
License
This project is licensed under the Apache-2.0 License.
Product | Versions 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. |
-
net6.0
- AWS.Messaging (>= 0.9.1)
- OpenTelemetry (>= 1.6.0)
- OpenTelemetry.Api (>= 1.6.0)
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 | 6,867 | 4/22/2024 |
0.9.0 | 109 | 3/26/2024 |
0.1.1-beta | 81 | 3/20/2024 |
0.1.0-beta | 312 | 12/8/2023 |