Skip to content

Commit

Permalink
use set-cookie format
Browse files Browse the repository at this point in the history
  • Loading branch information
dyladan committed Apr 10, 2020
1 parent 4e40b84 commit 77864ba
Showing 1 changed file with 28 additions and 1 deletion.
29 changes: 28 additions & 1 deletion specification/correlationcontext/api.md
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,34 @@ OPTIONAL parameters:

### Serialization

Until the [W3C Correlation Context](https://w3c.github.io/correlation-context/) specification is recommended for use, Correlation Context should be serialized using [IETF Dictionary](https://tools.ietf.org/html/draft-ietf-httpbis-header-structure-17#section-3.2) as specified in the current draft of [IETF Structured Field Values for HTTP](https://datatracker.ietf.org/doc/draft-ietf-httpbis-header-structure/) with the header name `otcorrelationcontext`.
Until the [W3C Correlation Context](https://w3c.github.io/correlation-context/) specification is recommended for use, OpenTelemetry `CorrelationContext` implementations MUST be serialized according to the [editor's draft of W3C Correlation Context as of March 27, 2020](https:/w3c/correlation-context/blob/c974664b9ab4d33af6355f1f7f03a2d52c89a99e/correlation_context/HTTP_HEADER_FORMAT.md) using a vendor-specific header name to avoid collisions with the W3C Correlation Context specification should it change in the future.

#### Header Name

`CorrelationContext` implementations MUST use the header name `otcorrelationcontext`.

#### Header Value

`CorrelationContext` MUST be serialized according to the [editor's draft of W3C Correlation Context as of March 27, 2020](https:/w3c/correlation-context/blob/c974664b9ab4d33af6355f1f7f03a2d52c89a99e/correlation_context/HTTP_HEADER_FORMAT.md).

`CorrelationContext` values MUST be serialized as Percent-Encoded UTF-8 strings according to [RFC 3986 Section 2.1](https://tools.ietf.org/html/rfc3986#section-2.1).

#### Example

Correlation Context:

```json
{
"user": "[email protected]",
"name": "Example Name"
}
```

Header:

```
otcorrelcationcontext: user=foo%40example.com,name=Example%20Name
```

## Conflict Resolution

Expand Down

0 comments on commit 77864ba

Please sign in to comment.