Table of Contents

Class B3Propagator

Namespace
OpenTelemetry.Context.Propagation
Assembly
OpenTelemetry.Api.dll

A text map propagator for B3. See https://github.com/openzipkin/b3-propagation. This class has been deprecated in favour of OpenTelemetry.Extensions.Propagators package.

[Obsolete("Use B3Propagator class from OpenTelemetry.Extensions.Propagators namespace, shipped as part of OpenTelemetry.Extensions.Propagators package.")]
public sealed class B3Propagator : TextMapPropagator
Inheritance
B3Propagator
Inherited Members

Constructors

B3Propagator()

Initializes a new instance of the B3Propagator class.

[Obsolete("Use B3Propagator class from OpenTelemetry.Extensions.Propagators namespace, shipped as part of OpenTelemetry.Extensions.Propagators package.")]
public B3Propagator()

B3Propagator(bool)

Initializes a new instance of the B3Propagator class.

[Obsolete("Use B3Propagator class from OpenTelemetry.Extensions.Propagators namespace, shipped as part of OpenTelemetry.Extensions.Propagators package.")]
public B3Propagator(bool singleHeader)

Parameters

singleHeader bool

Determines whether to use single or multiple headers when extracting or injecting span context.

Properties

Fields

Gets the list of headers used by propagator. The use cases of this are:

  • allow pre-allocation of fields, especially in systems like gRPC Metadata
  • allow a single-pass over an iterator (ex OpenTracing has no getter in TextMap).
public override ISet<string> Fields { get; }

Property Value

ISet<string>

Methods

Extract<T>(PropagationContext, T, Func<T, string, IEnumerable<string>>)

Extracts the context from a carrier.

[Obsolete("Use B3Propagator class from OpenTelemetry.Extensions.Propagators namespace, shipped as part of OpenTelemetry.Extensions.Propagators package.")]
public override PropagationContext Extract<T>(PropagationContext context, T carrier, Func<T, string, IEnumerable<string>> getter)

Parameters

context PropagationContext

The default context to be used if Extract fails.

carrier T

Object to extract context from. Instance of this object will be passed to the getter.

getter Func<T, string, IEnumerable<string>>

Function that will return string value of a key with the specified name.

Returns

PropagationContext

Context from it's text representation.

Type Parameters

T

Type of object to extract context from. Typically HttpRequest or similar.

Inject<T>(PropagationContext, T, Action<T, string, string>)

Injects the context into a carrier.

[Obsolete("Use B3Propagator class from OpenTelemetry.Extensions.Propagators namespace, shipped as part of OpenTelemetry.Extensions.Propagators package.")]
public override void Inject<T>(PropagationContext context, T carrier, Action<T, string, string> setter)

Parameters

context PropagationContext

The default context to transmit over the wire.

carrier T

Object to set context on. Instance of this object will be passed to setter.

setter Action<T, string, string>

Action that will set name and value pair on the object.

Type Parameters

T

Type of an object to set context on. Typically HttpRequest or similar.