Skip to content

Commit

Permalink
Upgraded to OTel 1.0.0-rc2. Fixed propagator. (#61)
Browse files Browse the repository at this point in the history
  • Loading branch information
srprash authored Feb 3, 2021
1 parent 25ac501 commit a7e698f
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,6 @@
<Description>OpenTelemetry extensions for AWS X-Ray.</Description>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="OpenTelemetry" Version="0.7.0-beta.1" />
<PackageReference Include="OpenTelemetry" Version="1.0.0-rc2" />
</ItemGroup>
</Project>
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ namespace OpenTelemetry.Contrib.Extensions.AWSXRay.Trace
/// <summary>
/// Propagator for AWS X-Ray. See https://docs.aws.amazon.com/xray/latest/devguide/xray-concepts.html#xray-concepts-tracingheader.
/// </summary>
public class AWSXRayPropagator : IPropagator
public class AWSXRayPropagator : TextMapPropagator
{
private const string AWSXRayTraceHeaderKey = "X-Amzn-Trace-Id";
private const char KeyValueDelimiter = '=';
Expand All @@ -51,10 +51,10 @@ public class AWSXRayPropagator : IPropagator
private const char NotSampledValue = '0';

/// <inheritdoc/>
public ISet<string> Fields => new HashSet<string>() { AWSXRayTraceHeaderKey };
public override ISet<string> Fields => new HashSet<string>() { AWSXRayTraceHeaderKey };

/// <inheritdoc/>
public PropagationContext Extract<T>(PropagationContext context, T carrier, Func<T, string, IEnumerable<string>> getter)
public override PropagationContext Extract<T>(PropagationContext context, T carrier, Func<T, string, IEnumerable<string>> getter)
{
if (context.ActivityContext.IsValid())
{
Expand Down Expand Up @@ -100,7 +100,7 @@ public PropagationContext Extract<T>(PropagationContext context, T carrier, Func
}

/// <inheritdoc/>
public void Inject<T>(PropagationContext context, T carrier, Action<T, string, string> setter)
public override void Inject<T>(PropagationContext context, T carrier, Action<T, string, string> setter)
{
if (context.ActivityContext.TraceId == default || context.ActivityContext.SpanId == default)
{
Expand Down

0 comments on commit a7e698f

Please sign in to comment.