Skip to content

Commit 6069c1d

Browse files
Update README.md to put the emphasis on SDK Auto Configuration (open-telemetry#1627)
1 parent ec755da commit 6069c1d

File tree

1 file changed

+12
-10
lines changed

1 file changed

+12
-10
lines changed

baggage-processor/README.md

Lines changed: 12 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,18 @@ Do not put sensitive information in Baggage.
1515

1616
## Usage
1717

18+
### Usage with SDK auto-configuration
19+
20+
If you are using the OpenTelemetry SDK auto-configuration, you can add the span and log baggage
21+
processors through configuration.
22+
23+
| Property | Description |
24+
|--------------------------------------------------------------------|---------------------------------------------------------------------------------------------------|
25+
| `otel.java.experimental.span-attributes.copy-from-baggage.include` | Add baggage entries as span attributes, e.g. `key1,key2` or `*` to add all baggage items as keys. |
26+
| `otel.java.experimental.log-attributes.copy-from-baggage.include` | Add baggage entries as log attributes, e.g. `key1,key2` or `*` to add all baggage items as keys. |
27+
28+
### Usage through programmatic activation
29+
1830
Add the span and log processor when configuring the tracer and logger providers.
1931

2032
To configure the span and log processors to copy all baggage entries during configuration:
@@ -49,16 +61,6 @@ new BaggageSpanProcessor(baggageKey -> pattern.matcher(baggageKey).matches());
4961
new BaggageLogRecordProcessor(baggageKey -> pattern.matcher(baggageKey).matches());
5062
```
5163

52-
## Usage with SDK auto-configuration
53-
54-
If you are using the OpenTelemetry SDK auto-configuration, you can add the span and log baggage
55-
processors through configuration.
56-
57-
| Property | Description |
58-
|--------------------------------------------------------------------|---------------------------------------------------------------------------------------------------|
59-
| `otel.java.experimental.span-attributes.copy-from-baggage.include` | Add baggage entries as span attributes, e.g. `key1,key2` or `*` to add all baggage items as keys. |
60-
| `otel.java.experimental.log-attributes.copy-from-baggage.include` | Add baggage entries as log attributes, e.g. `key1,key2` or `*` to add all baggage items as keys. |
61-
6264
## Component owners
6365

6466
- [Mike Golsmith](https://github.com/MikeGoldsmith), Honeycomb

0 commit comments

Comments
 (0)