You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@camel.apache.org by "Pasquale Congiusti (Jira)" <ji...@apache.org> on 2025/07/04 09:51:00 UTC

[jira] [Commented] (CAMEL-21917) [camel-telemetry] Load decorators dynamically

    [ https://issues.apache.org/jira/browse/CAMEL-21917?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17995726#comment-17995726 ] 

Pasquale Congiusti commented on CAMEL-21917:
--------------------------------------------

I've done a preliminary analysis of this. Probably the best solution is to have a maven plugin which generates dynamically a SpanDecorator class for every component and the related Service entry. The plugin should not produce the generated class when it exists already an implementation, assuming such an implementation was developed to extend the behavior of a given component.

> [camel-telemetry] Load decorators dynamically
> ---------------------------------------------
>
>                 Key: CAMEL-21917
>                 URL: https://issues.apache.org/jira/browse/CAMEL-21917
>             Project: Camel
>          Issue Type: Improvement
>    Affects Versions: 4.x
>            Reporter: Pasquale Congiusti
>            Assignee: Pasquale Congiusti
>            Priority: Minor
>             Fix For: 4.14.0
>
>
> The telemetry components are using a service loading mechanism to discover the decorators available at runtime. However, this mechanism requires the team to maintain a service file [1] listing all the available classes. It would be more convenient to have instead a dynamic mechanism to scan all the classes directly instead.
> [1] https://github.com/apache/camel/blob/d25b31b435d14d826a2e86aafdf05643aeac1e3b/components/camel-opentelemetry/src/main/resources/META-INF/services/org.apache.camel.tracing.SpanDecorator



--
This message was sent by Atlassian Jira
(v8.20.10#820010)