Update README.rst (#2575)
This commit is contained in:
parent
768694cf75
commit
c06fd1dd53
|
|
@ -1,10 +1,22 @@
|
||||||
OpenTelemetry Baggage Span Processor
|
OpenTelemetry Baggage Span Processor
|
||||||
====================================
|
====================================
|
||||||
|
|
||||||
|
|pypi|
|
||||||
|
|
||||||
|
.. |pypi| image:: https://badge.fury.io/py/opentelemetry-processor-baggage.svg
|
||||||
|
:target: https://pypi.org/project/opentelemetry-processor-baggage/
|
||||||
|
|
||||||
The BaggageSpanProcessor reads entries stored in Baggage
|
The BaggageSpanProcessor reads entries stored in Baggage
|
||||||
from the parent context and adds the baggage entries' keys and
|
from the parent context and adds the baggage entries' keys and
|
||||||
values to the span as attributes on span start.
|
values to the span as attributes on span start.
|
||||||
|
|
||||||
|
Installation
|
||||||
|
------------
|
||||||
|
|
||||||
|
::
|
||||||
|
|
||||||
|
pip install opentelemetry-processor-baggage
|
||||||
|
|
||||||
Add this span processor to a tracer provider.
|
Add this span processor to a tracer provider.
|
||||||
|
|
||||||
Keys and values added to Baggage will appear on subsequent child
|
Keys and values added to Baggage will appear on subsequent child
|
||||||
|
|
@ -48,4 +60,4 @@ For example, to only copy baggage entries that match the regex `^key.+`:
|
||||||
```python
|
```python
|
||||||
regex_predicate = lambda baggage_key: baggage_key.startswith("^key.+")
|
regex_predicate = lambda baggage_key: baggage_key.startswith("^key.+")
|
||||||
tracer_provider.add_span_processor(BaggageSpanProcessor(regex_predicate))
|
tracer_provider.add_span_processor(BaggageSpanProcessor(regex_predicate))
|
||||||
```
|
```
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue