Skip to content

Commit

Permalink
Clarify case sensitivity in propagator spec. (open-telemetry#346)
Browse files Browse the repository at this point in the history
* Clarify sensitivity in propagator spec.

* Update api-propagators.md

* Fix markdownlint.
  • Loading branch information
Oberon00 authored and Sergey Kanzhelev committed Feb 18, 2020
1 parent 3fa8486 commit ba969b0
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions specification/api-propagators.md
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,8 @@ Required arguments:
- the key of the field.
- the value of the field.

The implemenation SHOULD preserve casing (e.g. it should not transform `Content-Type` to `content-type`) if the used protocol is case insensitive, otherwise it MUST preserve casing.

### Extract

Extracts the value from upstream. For example, as http headers.
Expand All @@ -141,11 +143,11 @@ Getter is an argument in `Extract` that get value from given field

##### Get

Returns the first value of the given propagation key or returns null if the key doesn't exist.
The Get function MUST return the first value of the given propagation key or return null if the key doesn't exist.

Required arguments:

- the carrier of propagation fields, such as an http request.
- the carrier of propagation fields, such as an HTTP request.
- the key of the field.

Returns the first value of the given propagation key or returns null if the key doesn't exist.
The Get function is responsible for handling case sensitivity. If the getter is intended to work with a HTTP request object, the getter MUST be case insensitive. To improve compatibility with other text-based protocols, text format implemenations MUST ensure to always use the canonical casing for their attributes. NOTE: Cannonical casing for HTTP headers is usually title case (e.g. `Content-Type` instead of `content-type`).

0 comments on commit ba969b0

Please sign in to comment.