From b57190293c6e43b7773eb439d4c02f168e6062d1 Mon Sep 17 00:00:00 2001 From: Prashant Srivastava Date: Wed, 3 Feb 2021 14:05:37 -0500 Subject: [PATCH] Upgraded to OTel 1.0.0-rc2. Fixed propagator. --- .../OpenTelemetry.Contrib.Extensions.AWSXRay.csproj | 2 +- .../Trace/AWSXRayPropagator.cs | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/OpenTelemetry.Contrib.Extensions.AWSXRay/OpenTelemetry.Contrib.Extensions.AWSXRay.csproj b/src/OpenTelemetry.Contrib.Extensions.AWSXRay/OpenTelemetry.Contrib.Extensions.AWSXRay.csproj index 76086b48e9..317586f184 100644 --- a/src/OpenTelemetry.Contrib.Extensions.AWSXRay/OpenTelemetry.Contrib.Extensions.AWSXRay.csproj +++ b/src/OpenTelemetry.Contrib.Extensions.AWSXRay/OpenTelemetry.Contrib.Extensions.AWSXRay.csproj @@ -5,6 +5,6 @@ OpenTelemetry extensions for AWS X-Ray. - + diff --git a/src/OpenTelemetry.Contrib.Extensions.AWSXRay/Trace/AWSXRayPropagator.cs b/src/OpenTelemetry.Contrib.Extensions.AWSXRay/Trace/AWSXRayPropagator.cs index 11159dd9da..a4cd229a3e 100644 --- a/src/OpenTelemetry.Contrib.Extensions.AWSXRay/Trace/AWSXRayPropagator.cs +++ b/src/OpenTelemetry.Contrib.Extensions.AWSXRay/Trace/AWSXRayPropagator.cs @@ -28,7 +28,7 @@ namespace OpenTelemetry.Contrib.Extensions.AWSXRay.Trace /// /// Propagator for AWS X-Ray. See https://docs.aws.amazon.com/xray/latest/devguide/xray-concepts.html#xray-concepts-tracingheader. /// - public class AWSXRayPropagator : IPropagator + public class AWSXRayPropagator : TextMapPropagator { private const string AWSXRayTraceHeaderKey = "X-Amzn-Trace-Id"; private const char KeyValueDelimiter = '='; @@ -51,10 +51,10 @@ public class AWSXRayPropagator : IPropagator private const char NotSampledValue = '0'; /// - public ISet Fields => new HashSet() { AWSXRayTraceHeaderKey }; + public override ISet Fields => new HashSet() { AWSXRayTraceHeaderKey }; /// - public PropagationContext Extract(PropagationContext context, T carrier, Func> getter) + public override PropagationContext Extract(PropagationContext context, T carrier, Func> getter) { if (context.ActivityContext.IsValid()) { @@ -100,7 +100,7 @@ public PropagationContext Extract(PropagationContext context, T carrier, Func } /// - public void Inject(PropagationContext context, T carrier, Action setter) + public override void Inject(PropagationContext context, T carrier, Action setter) { if (context.ActivityContext.TraceId == default || context.ActivityContext.SpanId == default) {