Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rename HTTPText to TextMap Propagator. #793

Merged
19 changes: 11 additions & 8 deletions specification/context/api-propagators.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ Table of Contents
- [Operations](#operations)
- [Inject](#inject)
- [Extract](#extract)
- [HTTPText Propagator](#httptext-propagator)
- [TextMap Propagator](#textmap-propagator)
- [Fields](#fields)
- [Inject](#inject-1)
- [Setter argument](#setter-argument)
Expand Down Expand Up @@ -49,7 +49,7 @@ and is bound to a data type, in order to propagate in-band context data across p

The Propagators API currently defines one `Propagator` type:

- `HTTPTextPropagator` is a type that inject values into and extracts values
- `TextMapPropagator` is a type that inject values into and extracts values
from carriers as string key/value pairs.

A binary `Propagator` type will be added in the future (see [#437](https://github.com/open-telemetry/opentelemetry-specification/issues/437)).
Expand Down Expand Up @@ -95,14 +95,17 @@ Returns a new `Context` derived from the `Context` passed as argument,
containing the extracted value, which can be a `SpanContext`,
`CorrelationContext` or another cross-cutting concern context.

## HTTPText Propagator
## TextMap Propagator

`HTTPTextPropagator` performs the injection and extraction of a cross-cutting concern
`TextMapPropagator` performs the injection and extraction of a cross-cutting concern
value as string key/values pairs into carriers that travel in-band across process boundaries.

The carrier of propagated data on both the client (injector) and server (extractor) side is
usually an HTTP request.

In order to increase compatibility, the key/value pairs MUST only consist of US-ASCII characters
that make up valid HTTP header fields as per [RFC 7230](https://tools.ietf.org/html/rfc7230#section-3.2).

`Getter` and `Setter` are optional helper components used for extraction and injection respectively,
and are defined as separate objects from the carrier to avoid runtime allocations,
by removing the need for additional interface-implementing-objects wrapping the carrier in order
Expand All @@ -127,7 +130,7 @@ The use cases of this are:
- allow pre-allocation of fields, especially in systems like gRPC Metadata
- allow a single-pass over an iterator

Returns list of fields that will be used by the `HttpTextPropagator`.
Returns list of fields that will be used by the `TextMapPropagator`.

### Inject

Expand All @@ -143,7 +146,7 @@ Optional arguments:

Setter is an argument in `Inject` that sets values into given fields.

`Setter` allows a `HttpTextPropagator` to set propagated fields into a carrier.
`Setter` allows a `TextMapPropagator` to set propagated fields into a carrier.

One of the ways to implement it is `Setter` class with `Set` method as described below.

Expand Down Expand Up @@ -175,7 +178,7 @@ Returns a new `Context` derived from the `Context` passed as argument.

Getter is an argument in `Extract` that get value from given field

`Getter` allows a `HttpTextPropagator` to read propagated fields from a carrier.
`Getter` allows a `TextMapPropagator` to read propagated fields from a carrier.

One of the ways to implement it is `Getter` class with `Get` method as described below.

Expand Down Expand Up @@ -208,7 +211,7 @@ A composite propagator can be built from a list of propagators, or a list of
injectors and extractors. The resulting composite `Propagator` will invoke the `Propagator`s, `Injector`s, or `Extractor`s, in the order they were specified.

Each composite `Propagator` will implement a specific `Propagator` type, such
as `HttpTextPropagator`, as different `Propagator` types will likely operate on different
as `TextMapPropagator`, as different `Propagator` types will likely operate on different
data types.

There MUST be functions to accomplish the following operations.
Expand Down
2 changes: 1 addition & 1 deletion specification/overview.md
Original file line number Diff line number Diff line change
Expand Up @@ -285,7 +285,7 @@ imposed by a specific transport and bound to a data type.

The Propagators API currently defines one `Propagator` type:

- `HTTPTextPropagator` injects values into and extracts values from carriers as text.
- `TextMapPropagator` injects values into and extracts values from carriers as text.

## Collector

Expand Down
2 changes: 1 addition & 1 deletion specification/trace/api.md
Original file line number Diff line number Diff line change
Expand Up @@ -692,7 +692,7 @@ implementer of these links.

The API layer MAY include the following `Propagator`s:

* A `HTTPTextPropagator` implementing the [W3C TraceContext Specification](https://www.w3.org/TR/trace-context/).
* A `TextMapPropagator` implementing the [W3C TraceContext Specification](https://www.w3.org/TR/trace-context/).

## Behavior of the API in the absence of an installed SDK

Expand Down