[
https://issues.apache.org/jira/browse/CAMEL-23564?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Magnus Ekstrand updated CAMEL-23564:
------------------------------------
Attachment: otel-baggage-sample.zip
Here is an example project to isolate the problem. Run it with `mvn test` and
notice that ExternalBaggage is present in the log but BusinessReference is not.
[^otel-baggage-sample.zip]
> Baggage customization doesn't seem to work
> ------------------------------------------
>
> Key: CAMEL-23564
> URL: https://issues.apache.org/jira/browse/CAMEL-23564
> Project: Camel
> Issue Type: Bug
> Components: camel-opentelemetry
> Affects Versions: 4.20.0
> Reporter: Magnus Ekstrand
> Priority: Major
> Attachments: otel-baggage-sample.zip
>
>
> We are trying to use the Baggage Customization feature introduced in Camel
> 4.20, but can't seem to get it to work.
>
> We use the OTEL Agent with MDC Instrumentation to have trace_id, span_id and
> baggage included in the logs. It works as
> expected for our vanilla Spring Boot applications.
>
> For our Camel routes, only externally provided baggage (i.e. an incoming
> baggage header) shows up in the logs, but baggage
> entries added using a Camel OTEL_BAGGAGE_ header as described in
> [https://camel.apache.org/components/next/others/opentelemetry2.html#_baggage_customization]
> does not show up in the logs.
>
> Our route looks like this:
>
> {code:java}
> from(..)
> .setHeader("OTEL_BAGGAGE_BusinessReference", header(REFERENCE_HEADER))
> .process(logReceived) // <- logging happens in here
> .process(transformer) // <- logging happens in here
> .to(..)
> .process(logSent); // <- logging happens in here
> {code}
>
> An incoming baggage entry is included in the logs, but not the
> BusinessReference entry.
>
> What am I doing wrong?
--
This message was sent by Atlassian Jira
(v8.20.10#820010)