Add SpanKind parameter to telemetry API to support proper span type#22577
Add SpanKind parameter to telemetry API to support proper span type#22577JiriOndrusek wants to merge 1 commit intoapache:mainfrom
Conversation
|
🌟 Thank you for your contribution to the Apache Camel project! 🌟 🐫 Apache Camel Committers, please review the following items:
|
| * <ul> | ||
| * <li>CLIENT - The span covers a client-side call to a remote service</li> | ||
| * <li>SERVER - The span covers server-side handling of a remote request</li> | ||
| * <li>PRODUCER - The span covers the production of a message to a remote broker/queue</li> |
There was a problem hiding this comment.
I dont think this is limited to a remote broker/queue, it can be any kind of remote networking, even a HTTP REST call and so on.
|
There is some API changes it would be nice to add this in the 4.20 upgrade guide doc. |
squakez
left a comment
There was a problem hiding this comment.
I will have a thoroughly look asap. However, in the while just consider that the "spanKind" concept is an opentelemetry concept only and not necessarily supported by any other telemetry components. Ideally this feature should be developed at subcomponent level only and we need to evaluate if any generic "extension point" is really required on the abstract telemetry component.
I will give you more details shortly.
|
🧪 CI tested the following changed modules:
All tested modules (11 modules)
|
84146e8 to
8b0b9b5
Compare
8b0b9b5 to
ef6f620
Compare
squakez
left a comment
There was a problem hiding this comment.
Thanks for the work but I think what you're trying to achieve is already covered by the presence of the SpanDecorator, whose goal is exactly to include any additional information to the Span before or after the trace is generated (via methods public void beforeTracingEvent(Span span, Exchange exchange, Endpoint endpoint) and public void afterTracingEvent(Span span, Exchange exchange)).
I think that the kind can be generated and set on the span directly in each decorator, which would be also cleaner from an API point of view.
|
Superseded by #22610 |
fixes https://issues.apache.org/jira/browse/CAMEL-23312
Adds SpanKind parameter to the Camel telemetry API to enable proper span type classification
(CLIENT, SERVER, PRODUCER, CONSUMER, INTERNAL) across different observability backends.
Changes:
Impact: Enables proper span classification in distributed traces, improving observability for
messaging and HTTP components.
Description
Target
mainbranch)Tracking
Apache Camel coding standards and style
mvn clean install -DskipTestslocally from root folder and I have committed all auto-generated changes.