[
https://issues.apache.org/jira/browse/CAMEL-23564?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=18083230#comment-18083230
]
Magnus Ekstrand commented on CAMEL-23564:
-----------------------------------------
Thanks for your reply [~beskow]!
So my options for getting information into Baggage over integration boundaries
are to use
{code:java}
camel.opentelemetry2.traceProcessors=true{code}
or the work around that Björn Beskow suggests.
That I first need to instruct Camel to put a span on everything and then do an
exclude on those parts that I don’t want spans on is in my opinion an
anti-pattern. This way of working will potentially lead to a configuration hard
to look through and understand.
In some of our projects there may be 12-14 routes. Can you elaborate how a
common excludePattern can meet different needs of different routes? Is it even
possible?
> Baggage customization doesn't seem to work
> ------------------------------------------
>
> Key: CAMEL-23564
> URL: https://issues.apache.org/jira/browse/CAMEL-23564
> Project: Camel
> Issue Type: Improvement
> Components: camel-opentelemetry
> Affects Versions: 4.20.0
> Reporter: Magnus Ekstrand
> Assignee: Federico Mariani
> Priority: Major
> Labels: Documentation
> 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)