Skip to content

Commit

Permalink
chore: address PR comments
Browse files Browse the repository at this point in the history
  • Loading branch information
vmarchaud committed May 2, 2021
1 parent 074471a commit bc560ac
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
5 changes: 5 additions & 0 deletions packages/opentelemetry-propagator-jaeger/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,10 @@ provider.register({
});
```

## Baggage Notes

Jeager Baggage is represented as multiple headers where the names are carrier dependent. For this reason, they are omitted from the `fields` method. This behavior should be taken into account if your application relies on the `fields` functionality. See the [specification][fields-spec-url] for more details.

## Trace on Jaeger UI

![example image](jaeger-tracing.png)
Expand All @@ -59,3 +63,4 @@ Apache 2.0 - See [LICENSE][license-url] for more information.
[devDependencies-url]: https://david-dm.org/open-telemetry/opentelemetry-js?path=packages%2Fopentelemetry-propagator-jaeger&type=dev
[npm-url]: https://www.npmjs.com/package/@opentelemetry/propagator-jaeger
[npm-img]: https://badge.fury.io/js/%40opentelemetry%2Fpropagator-jaeger.svg
[fields-spec-url]: https://github.com/open-telemetry/opentelemetry-specification/blob/master/specification/context/api-propagators.md#fields
Original file line number Diff line number Diff line change
Expand Up @@ -90,11 +90,11 @@ export class JaegerHttpTracePropagator implements TextMapPropagator {
: uberTraceIdHeader;
const baggageValues = getter
.keys(carrier)
.filter(key => key.includes(UBER_BAGGAGE_HEADER_PREFIX))
.filter(key => /^uberctx-(.+)/i.test(key))
.map(key => {
const value = getter.get(carrier, key);
return {
key: key.replace(`${UBER_BAGGAGE_HEADER_PREFIX}-`, ''),
key: key.substring(UBER_BAGGAGE_HEADER_PREFIX.length + 1),
value: Array.isArray(value) ? value[0] : value,
};
});
Expand Down

0 comments on commit bc560ac

Please sign in to comment.