Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 12 additions & 10 deletions baggage-processor/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,18 @@ Do not put sensitive information in Baggage.

## Usage

### Usage with SDK auto-configuration

If you are using the OpenTelemetry SDK auto-configuration, you can add the span and log baggage
processors through configuration.

| Property | Description |
|--------------------------------------------------------------------|---------------------------------------------------------------------------------------------------|
| `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. |
| `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. |

### Usage through programmatic activation

Add the span and log processor when configuring the tracer and logger providers.

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

## Usage with SDK auto-configuration

If you are using the OpenTelemetry SDK auto-configuration, you can add the span and log baggage
processors through configuration.

| Property | Description |
|--------------------------------------------------------------------|---------------------------------------------------------------------------------------------------|
| `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. |
| `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. |

## Component owners

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