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

Remove binary format propagator #426

Merged
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
36 changes: 1 addition & 35 deletions specification/api-propagators.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,6 @@
Table of Contents
</summary>

- [Binary Format](#binary-format)
- [ToBytes](#tobytes)
- [FromBytes](#frombytes)
- [HTTP Text Format](#http-text-format)
- [Fields](#fields)
- [Inject](#inject)
Expand All @@ -19,44 +16,13 @@ Table of Contents

</details>

Propagators API consists of two main formats:
Propagators API consists of one main format:
carlosalberto marked this conversation as resolved.
Show resolved Hide resolved

- `BinaryFormat` is used to serialize and deserialize a value into a binary representation.
- `HTTPTextFormat` is used to inject and extract a value as text into carriers that travel
in-band across process boundaries.

Deserializing must set `IsRemote` to true on the returned `SpanContext`.

## Binary Format

`BinaryFormat` is a formatter to serialize and deserialize a value into a binary format.

`BinaryFormat` MUST expose the APIs that serializes values into bytes,
and deserializes values from bytes.

### ToBytes

Serializes the given value into the on-the-wire representation.

Required arguments:

- the value to serialize, can be `SpanContext` or `DistributedContext`.

Returns the on-the-wire byte representation of the value.

### FromBytes

Creates a value from the given on-the-wire encoded representation.

If the value could not be parsed, the underlying implementation SHOULD decide to return ether
an empty value, an invalid value, or a valid value.

Required arguments:

- on-the-wire byte representation of the value.

Returns a value deserialized from bytes.

## HTTP Text Format

`HTTPTextFormat` is a formatter that injects and extracts a value as text into carriers that
Expand Down
8 changes: 3 additions & 5 deletions specification/api-tracing.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ Table of Contents
* [GetCurrentSpan](#getcurrentspan)
* [WithSpan](#withspan)
* [SpanBuilder](#spanbuilder)
* [GetBinaryFormat](#getbinaryformat)
* [GetHttpTextFormat](#gethttptextformat)
* [SpanContext](#spancontext)
* [Span](#span)
Expand Down Expand Up @@ -132,9 +131,8 @@ The `Tracer` MUST provide methods to:
- Make a given `Span` as active

The `Tracer` SHOULD allow end users to configure other tracing components that
control how `Span`s are passed across process boundaries, including the binary
and text format `Propagator`s used to serialize `Span`s created by the
`Tracer`.
control how `Span`s are passed across process boundaries, including the text
format `Propagator` used to serialize `Span`s created by the `Tracer`.

When getting the current span, the `Tracer` MUST return a placeholder `Span`
with an invalid `SpanContext` if there is no currently active `Span`.
Expand All @@ -152,7 +150,7 @@ convenience methods to manage a `Span`'s lifetime and the scope in which a
time) but stil active. A `Span` may be active on one thread after it has been
made inactive on another.

The implementation MUST provide no-op binary and text `Propagator`s, which the
The implementation MUST provide a text `Propagator`, which the
`Tracer` SHOULD use by default if other propagators are not configured. SDKs
SHOULD use the W3C HTTP Trace Context as the default text format. For more
details, see [trace-context](https:/w3c/trace-context).
Expand Down
3 changes: 1 addition & 2 deletions specification/overview.md
Original file line number Diff line number Diff line change
Expand Up @@ -238,9 +238,8 @@ for an example.
## Propagators

OpenTelemetry uses `Propagators` to serialize and deserialize `SpanContext` and `DistributedContext`
into a binary or text format. Currently there are two types of propagators:
into text format. Currently there is one type of propagator:

- `BinaryFormat` which is used to serialize and deserialize a value into a binary representation.
- `HTTPTextFormat` which is used to inject and extract a value as text into carriers that travel
in-band across process boundaries.

Expand Down