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

Define OTLP protocol driver registration mechanism #3722

Closed
wants to merge 8 commits into from
Closed
Show file tree
Hide file tree
Changes from all 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
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,8 @@ release.
- New exporter implementations do not need to support
`OTEL_EXPORTER_OTLP_SPAN_INSECURE` and `OTEL_EXPORTER_OTLP_METRIC_INSECURE`.
([#3719](https://github.com/open-telemetry/opentelemetry-specification/pull/3719))
- Define protocol driver registration mechanism.
([#3722](https://github.com/open-telemetry/opentelemetry-specification/pull/3722))

### Compatibility

Expand Down
13 changes: 9 additions & 4 deletions specification/protocol/exporter.md
Original file line number Diff line number Diff line change
Expand Up @@ -143,15 +143,20 @@ The `OTEL_EXPORTER_OTLP_PROTOCOL`, `OTEL_EXPORTER_OTLP_TRACES_PROTOCOL`, and `OT
- `http/protobuf` for protobuf-encoded data over HTTP connection
- `http/json` for JSON-encoded data over HTTP connection

**[2]**: SDKs SHOULD support both `grpc` and `http/protobuf` transports and MUST
support at least one of them. If they support only one, it SHOULD be
`http/protobuf`. They also MAY support `http/json`.

If no configuration is provided the default transport SHOULD be `http/protobuf`
unless SDKs have good reasons to choose `grpc` as the default (e.g. for backward
compatibility reasons when `grpc` was already the default in a stable SDK
release).

The exporter SHOULD NOT depend on any transport protocol driver.
pellared marked this conversation as resolved.
Show resolved Hide resolved
The exporter SHOULD have a mechanism to register transport protocol driver.
The caller SHOULD explicitly register the driver for the default transport protocol if one wants to support it.
Copy link
Member Author

@pellared pellared Oct 18, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@tigrannajaryan @yurishkuro would this be better?

Suggested change
The caller SHOULD explicitly register the driver for the default transport protocol if one wants to support it.
By default, no driver SHOULD be registered. The exporter SHOULD require the caller to explicitly register the driver for the default transport protocol if the caller wants to support it.

In a stable SDK release, the properties described in this paragraph above can be different for backward compatibility reasons.

SDKs SHOULD provide drivers for both `grpc` and `http/protobuf` transport protocols.
SDKs MUST provide at least one of them. If they provide only one, it SHOULD be a driver for `http/protobuf`.
reyang marked this conversation as resolved.
Show resolved Hide resolved
SDKs MAY provide a driver for `http/json`.

### Specifying headers via environment variables

The `OTEL_EXPORTER_OTLP_HEADERS`, `OTEL_EXPORTER_OTLP_TRACES_HEADERS`, `OTEL_EXPORTER_OTLP_METRICS_HEADERS` environment variables will contain a list of key value pairs, and these are expected to be represented in a format matching to the [W3C Correlation-Context](https://github.com/w3c/baggage/blob/master/baggage/HTTP_HEADER_FORMAT.md), except that additional semi-colon delimited metadata is not supported, i.e.: key1=value1,key2=value2. All attribute values MUST be considered strings.
Expand Down
Loading