[
https://issues.apache.org/jira/browse/CAMEL-22478?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=18030184#comment-18030184
]
Raymond commented on CAMEL-22478:
---------------------------------
OK, thanks for clearing things up.
On the question of where this traceId should be placed, I always think a bit
like this (though this is a bit opinionated):
1. I use properties for internal stuff (Camel/Platform level)
2. I use headers for message related stuff (integration/user level) for
internal and external use. This is data that is also sent to external systems,
and is automatically converted based on the component (for example converted by
the HTTP component to HTTP headers and then send to an external system/URL).
3. I use variables for message related stuff (integration/user level) for
internal use only (not send to external systems)
So in this case properties would be make most sense to me, of course properties
are on the exchange level, and headers are on the message level (in/out).
I'm also thinking that it would be nice to have it available on the API (as
method). So instead of
exchange.getProperty({color:#6aab73}"traceid"{color});
It maybe nice to have something like this:
exchange.getTraceID();
Though they basically do the same, and the first has the advantage that it
doesn't need to be available when there is no trace ID, I always find it a bit
hidden. So when it's a property then you need to know about it, while when it's
in the API you can just explore the API/JavaDoc.
> [camel-telemetry] Introduce traceid/spanid exchange headers
> -----------------------------------------------------------
>
> Key: CAMEL-22478
> URL: https://issues.apache.org/jira/browse/CAMEL-22478
> Project: Camel
> Issue Type: Task
> Reporter: Pasquale Congiusti
> Assignee: Pasquale Congiusti
> Priority: Minor
> Fix For: 4.16.0
>
>
> Now that we have introduced a simpler MDC mechanism we can introduce some
> parameter in all telemetry components and make it easier for the user to
> include traceid/spanid MDC information. In the past we had to deprecate this
> as we had no support for the context propagation. With the new component,
> this is now consistent and we can provide the feature ootb by simply adding
> those Exchange headers.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)