AWS.Distro.OpenTelemetry.AutoInstrumentation
1.3.1
Prefix Reserved
See the version list below for details.
dotnet add package AWS.Distro.OpenTelemetry.AutoInstrumentation --version 1.3.1
NuGet\Install-Package AWS.Distro.OpenTelemetry.AutoInstrumentation -Version 1.3.1
<PackageReference Include="AWS.Distro.OpenTelemetry.AutoInstrumentation" Version="1.3.1" />
paket add AWS.Distro.OpenTelemetry.AutoInstrumentation --version 1.3.1
#r "nuget: AWS.Distro.OpenTelemetry.AutoInstrumentation, 1.3.1"
// Install AWS.Distro.OpenTelemetry.AutoInstrumentation as a Cake Addin #addin nuget:?package=AWS.Distro.OpenTelemetry.AutoInstrumentation&version=1.3.1 // Install AWS.Distro.OpenTelemetry.AutoInstrumentation as a Cake Tool #tool nuget:?package=AWS.Distro.OpenTelemetry.AutoInstrumentation&version=1.3.1
Using the AWS.Distro.OpenTelemetry.AutoInstrumentation NuGet package
When to use the NuGet package
Use the NuGet package in the following scenarios:
- You control the application build but not the machine/container where the application is running.
- Support instrumentation of
self-contained
applications. - Facilitate developer experimentation with automatic instrumentation through NuGet packages.
- Solve version conflicts between the dependencies used by the application and the automatic instrumentation.
Limitations
While NuGet packages are a convenient way to deploy automatic instrumentation, they can't be used in all cases. The most common reasons for not using NuGet packages include the following:
- You can't add the package to the application project. For example, the application is from a third party that can't add the package.
- Reduce disk usage, or the size of a virtual machine, when multiple applications to be instrumented are installed in a single machine. In this case you can use a single deployment for all .NET applications running on the machine.
- A legacy application that can't be migrated to the SDK-style project.
Using the NuGet packages
To automatically instrument your application with the AWS Distribution
of OpenTelemetry .NET add
the AWS.Distro.OpenTelemetry.AutoInstrumentation
package to your project:
dotnet add [<PROJECT>] package AWS.Distro.OpenTelemetry.AutoInstrumentation --prerelease
If the application references packages that can be instrumented, but require other packages for the instrumentation to work, the build will fail and prompt you to either add the missing instrumentation package or to skip the instrumentation of the corresponding package:
~packages/opentelemetry.autoinstrumentation.buildtasks/1.7.0/build/OpenTelemetry.AutoInstrumentation.BuildTasks.targets(29,5): error : OpenTelemetry.AutoInstrumentation: add a reference to the instrumentation package 'MongoDB.Driver.Core.Extensions.DiagnosticSources' version 1.4.0 or add 'MongoDB.Driver.Core' to the property 'SkippedInstrumentations' to suppress this error.
To resolve the error either add the recommended instrumentation package or skip
the instrumentation of the listed package by adding it to the SkippedInstrumentation
property. For example:
<PropertyGroup>
<SkippedInstrumentations>MongoDB.Driver.Core;StackExchange.Redis</SkippedInstrumentations>
</PropertyGroup>
The same property can be also specified directly using the terminal.
Notice that the ;
separator needs to be properly escaped as '%3B':
dotnet build -p:SkippedInstrumentations=StackExchange.Redis%3BMongoDB.Driver.Core
To distribute the appropriate native runtime components with your .NET application,
specify a Runtime Identifier (RID)
to build the application using dotnet build
or dotnet publish
. This might
require choosing between distributing a
self-contained or a framework-dependent
application. Both types are compatible with automatic instrumentation.
Use the script in the output folder of the build to launch the application with automatic instrumentation activated.
- On Windows, use
adot-launch.cmd <application_executable>
- On Linux or Unix, use
adot-launch.sh <application_executable>
If you launch the application using the dotnet
CLI, add dotnet
after the script.
- On Windows, use
adot-launch.cmd dotnet <application>
- On Linux and Unix, use
adot-launch.sh dotnet <application>
The script passes to the application all the command-line parameters you provide.
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. |
.NET Framework | net462 is compatible. net463 was computed. net47 was computed. net471 was computed. net472 was computed. net48 was computed. net481 was computed. |
-
.NETFramework 4.6.2
- AWSSDK.Core (>= 3.7.303.27)
- Microsoft.Extensions.Logging (>= 8.0.0)
- Microsoft.Extensions.Logging.Console (>= 6.0.0)
- Newtonsoft.Json (>= 13.0.3)
- OpenTelemetry (>= 1.9.0)
- OpenTelemetry.Api (>= 1.9.0)
- OpenTelemetry.AutoInstrumentation (>= 1.7.0)
- OpenTelemetry.Exporter.OpenTelemetryProtocol (>= 1.9.0)
- OpenTelemetry.Extensions.AWS (>= 1.3.0-beta.1)
- OpenTelemetry.Extensions.Propagators (>= 1.9.0)
- OpenTelemetry.Instrumentation.Http (>= 1.9.0)
- OpenTelemetry.ResourceDetectors.AWS (>= 1.4.0-beta.1)
- OpenTelemetry.Sampler.AWS (>= 0.1.0-alpha.1)
- OpenTelemetry.SemanticConventions (>= 1.0.0-rc9.9)
-
net6.0
- AWSSDK.Core (>= 3.7.303.27)
- Microsoft.Extensions.Logging (>= 8.0.0)
- Microsoft.Extensions.Logging.Console (>= 6.0.0)
- Newtonsoft.Json (>= 13.0.3)
- OpenTelemetry (>= 1.9.0)
- OpenTelemetry.Api (>= 1.9.0)
- OpenTelemetry.AutoInstrumentation (>= 1.7.0)
- OpenTelemetry.Exporter.OpenTelemetryProtocol (>= 1.9.0)
- OpenTelemetry.Extensions.AWS (>= 1.3.0-beta.1)
- OpenTelemetry.Extensions.Propagators (>= 1.9.0)
- OpenTelemetry.Instrumentation.Http (>= 1.9.0)
- OpenTelemetry.ResourceDetectors.AWS (>= 1.4.0-beta.1)
- OpenTelemetry.Sampler.AWS (>= 0.1.0-alpha.1)
- OpenTelemetry.SemanticConventions (>= 1.0.0-rc9.9)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.
See release notes at https://github.com/aws-observability/aws-otel-dotnet-instrumentation/releases