Add fields method (#226)

Co-authored-by: (Eliseo) Nathaniel Ruiz Nowell <enruizno@uwaterloo.ca>
This commit is contained in:
Diego Hurtado
2020-12-01 18:18:33 -06:00
committed by GitHub
parent 3e36dc282d
commit 8b323e935d
5 changed files with 29 additions and 1 deletions

View File

@ -2,6 +2,9 @@
## Unreleased
- Add method to return fields injected by propagator
([#226](https://github.com/open-telemetry/opentelemetry-python/pull/226))
## Version 0.16b0
Released 2020-11-25

View File

@ -274,3 +274,12 @@ class AwsXRayFormat(TextMapPropagator):
set_in_carrier(
carrier, TRACE_HEADER_KEY, trace_header,
)
def fields(self):
"""Returns a set with the fields set in `inject`.
See
`opentelemetry.trace.propagation.textmap.TextMapPropagator.fields`
"""
return {TRACE_HEADER_KEY}