Skip to content

Commit

Permalink
Remove binary format propagator (open-telemetry#426)
Browse files Browse the repository at this point in the history
* remove binary format

* add note about re-adding binary format in future

Co-authored-by: Carlos Alberto Cortez <calberto.cortez@gmail.com>
Co-authored-by: Bogdan Drutu <lazy@splunk.com>
  • Loading branch information
3 people committed Feb 6, 2020
1 parent f2af73c commit 5a196f4
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 41 deletions.
36 changes: 2 additions & 34 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,43 +16,14 @@ Table of Contents

</details>

Propagators API consists of two main formats:
Propagators API currently consists of one format:

- `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.
A binary format will be added in the future.

## HTTP Text Format

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://github.com/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

0 comments on commit 5a196f4

Please sign in to comment.