![]() |
VOOZH | about |
dotnet add package Marius.OpenTelemetry.Exporter.XRay --version 1.0.14
NuGet\Install-Package Marius.OpenTelemetry.Exporter.XRay -Version 1.0.14
<PackageReference Include="Marius.OpenTelemetry.Exporter.XRay" Version="1.0.14" />
<PackageVersion Include="Marius.OpenTelemetry.Exporter.XRay" Version="1.0.14" />Directory.Packages.props
<PackageReference Include="Marius.OpenTelemetry.Exporter.XRay" />Project file
paket add Marius.OpenTelemetry.Exporter.XRay --version 1.0.14
#r "nuget: Marius.OpenTelemetry.Exporter.XRay, 1.0.14"
#:package Marius.OpenTelemetry.Exporter.XRay@1.0.14
#addin nuget:?package=Marius.OpenTelemetry.Exporter.XRay&version=1.0.14Install as a Cake Addin
#tool nuget:?package=Marius.OpenTelemetry.Exporter.XRay&version=1.0.14Install as a Cake Tool
NOTE: This exporter is not affiliated with or officially supported by Amazon.
This is a port of AWS X-Ray Tracing Exporter for OpenTelemetry Collector.
The XRay Exporter exports telemetry to AWS X-Ray service without the need for X-Ray daemon or AWS Distro for Open Telemetry.
dotnet add package Marius.OpenTelemetry.Exporter.XRay
using var tracerProvider = Sdk.CreateTracerProviderBuilder()
.SetSampler(new AlwaysOnSampler())
.AddSource("DemoSource")
.AddXRayExporter()
.Build();
}
XRay exporter requires X-Ray compatible trace ids thus overwrites Activity.TraceIdGenerator
with a compatible generator. If OpenTelemetry.Contrib.Extensions.AWSXRay is used to generate
trace ids then set XRayExporterOptions.GenerateTraceIds = false.
XRayExporterOptions contains various options to configure the XRay Exporter.
AmazonXRayClientFactory (optional, default: null)If client factory is not provided then default will be used:
IAmazonXRay from service providerAmazonXRayClient is createdGenerateTraceIds (optional, default: true)If true then default trace ids generator will be used.
The value false should be only used if OpenTelemetry.Contrib.Extensions.AWSXRay
is configured to generate trace ids.
IndexAllAttribute (optional, default: true), IndexedAttributes (optional, default: empty)If IndexAllAttributes is set to true the all non-XRay tags and attributes are passed as annotations
for AWS X-Ray service to be indexed.
If IndexAllAttributes is set to false then only the attributes/tags listed in IndexAttributes
will be passed as annotations, other values will be passed as metadata.
IndexedAttributesA list of attributes to be passed as annotations to X-Ray.
Resource attributes must have "otel.resource." prefix.
ShouldIndexAttribute (optional, default: null)If provided then this function is used to determine which attributes/tags are to be passed via annotations for X-Ray service to be indexed.
ShouldIndexAttribute is only called for attributes that are not in IndexedAttributes list.
If function returns true then attribute/tag is passed as annotation.
If function returns false then attribute/tag is passed as metadata.
Example:
options.IndexAllAttributes = false; // Set to false otherwise ShouldIndexAttribute is ignored
options.ShouldIndexAttribute = ShouldIndexAttribute;
bool ShouldIndexAttribute(string name, bool isResource)
{
if (isResource)
{
// In case of resource the final key is "otel.resource." + name
// var key = "otel.resource." + name;
if (name == "build"
|| name.Contains("internal"))
{
// index otel.resource.key (will ne normalized to otel_resource_key) and
// any other key that contains "internal"
return true;
}
return false;
}
// Only index tenant_id and correlation_id
return name == "tenant_id" || name == "correlation_id";
}
Both indexed attributes and function:
options.IndexAllAttributes = false; // Set to false otherwise ShouldIndexAttribute is ignored
options.ShouldIndexAttribute = ShouldIndexAttribute;
options.IndexedAttributes = new[]
{
"otel.resource.build",
"tenant_id",
"correlation_id",
};
bool ShouldIndexAttribute(string name, bool isResource)
{
if (isResource)
{
// In case of resource the final key is "otel.resource." + name
// var key = "otel.resource." + name;
return name.Contains("internal");
}
// "tenant_id" and "correlation_id" are already indexed
// don't index anything else
return false;
}
IndexActivityNames (optional, default: true)If true then activity_display_name and activity_operation_name corresponding to Activity.DisplayName
and Activity.OperationName are passed as annotations.
ValidateTraceId (optional, default: false)If true then will reject/ignore activities that have either invalid aws trace id or trace id has expired.
LogGroupNames (optional, default: null)List of log group names for cloud watch if not provided by resource attributes ("aws.log.group.names" and "aws.log.group.arns").
AllowDotInAnnotationKey (optional, default: false)If true then dots in attribute keys are allowed and will not be replaced with underscores.
Corresponds to BETA feature flag "exporter.xray.allowDot".
Original doc: X-Ray Exporter will no longer convert . to _ in annotation keys when this feature gate is enabled.
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net5.0 net5.0 is compatible. net5.0-windows net5.0-windows was computed. net6.0 net6.0 is compatible. net6.0-android net6.0-android was computed. net6.0-ios net6.0-ios was computed. net6.0-maccatalyst net6.0-maccatalyst was computed. net6.0-macos net6.0-macos was computed. net6.0-tvos net6.0-tvos was computed. net6.0-windows net6.0-windows was computed. net7.0 net7.0 is compatible. net7.0-android net7.0-android was computed. net7.0-ios net7.0-ios was computed. net7.0-maccatalyst net7.0-maccatalyst was computed. net7.0-macos net7.0-macos was computed. net7.0-tvos net7.0-tvos was computed. net7.0-windows net7.0-windows was computed. net8.0 net8.0 is compatible. net8.0-android net8.0-android was computed. net8.0-browser net8.0-browser was computed. net8.0-ios net8.0-ios was computed. net8.0-maccatalyst net8.0-maccatalyst was computed. net8.0-macos net8.0-macos was computed. net8.0-tvos net8.0-tvos was computed. net8.0-windows net8.0-windows was computed. net9.0 net9.0 is compatible. net9.0-android net9.0-android was computed. net9.0-browser net9.0-browser was computed. net9.0-ios net9.0-ios was computed. net9.0-maccatalyst net9.0-maccatalyst was computed. net9.0-macos net9.0-macos was computed. net9.0-tvos net9.0-tvos was computed. net9.0-windows net9.0-windows was computed. net10.0 net10.0 was computed. net10.0-android net10.0-android was computed. net10.0-browser net10.0-browser was computed. net10.0-ios net10.0-ios was computed. net10.0-maccatalyst net10.0-maccatalyst was computed. net10.0-macos net10.0-macos was computed. net10.0-tvos net10.0-tvos was computed. net10.0-windows net10.0-windows was computed. |
| .NET Core | netcoreapp3.0 netcoreapp3.0 was computed. netcoreapp3.1 netcoreapp3.1 is compatible. |
| .NET Standard | netstandard2.1 netstandard2.1 is compatible. |
| MonoAndroid | monoandroid monoandroid was computed. |
| MonoMac | monomac monomac was computed. |
| MonoTouch | monotouch monotouch was computed. |
| Tizen | tizen60 tizen60 was computed. |
| Xamarin.iOS | xamarinios xamarinios was computed. |
| Xamarin.Mac | xamarinmac xamarinmac was computed. |
| Xamarin.TVOS | xamarintvos xamarintvos was computed. |
| Xamarin.WatchOS | xamarinwatchos xamarinwatchos was computed. |
This package is not used by any NuGet packages.
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 1.0.14 | 56,725 | 12/3/2024 |
| 1.0.13 | 40,972 | 1/26/2023 |
| 1.0.12 | 435 | 1/26/2023 |
| 1.0.11 | 3,501 | 1/24/2023 |
| 1.0.10 | 1,417 | 1/10/2023 |
| 1.0.9 | 3,360 | 11/13/2022 |
| 1.0.8 | 491 | 11/2/2022 |
| 1.0.7 | 481 | 10/31/2022 |
| 1.0.6 | 778 | 10/26/2022 |
| 1.0.5 | 528 | 10/25/2022 |
| 1.0.4 | 524 | 10/24/2022 |
| 1.0.3 | 549 | 10/23/2022 |
| 1.0.2 | 614 | 10/23/2022 |
| 1.0.1 | 527 | 10/22/2022 |
| 1.0.0 | 551 | 10/20/2022 |