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

Gary Brown commented on CAMEL-14305:
------------------------------------

I applied the following change and it worked:
{noformat}
-@Ignore
 public class InstallOpenTracingTracerRuleTest extends CamelTestSupport {
 
-    @BindToRegistry("tracer")
     private static MockTracer tracer = new MockTracer(Propagator.TEXT_MAP);
 
     @EndpointInject("mock:result")
@@ -45,6 +44,18 @@ public class InstallOpenTracingTracerRuleTest extends 
CamelTestSupport {
     @Produce("direct:start")
     protected ProducerTemplate template;
 
+    @Override
+    protected CamelContext createCamelContext() throws Exception {
+        CamelContext context = super.createCamelContext();
+
+        OpenTracingTracer ottracer = new OpenTracingTracer();
+        ottracer.setTracer(tracer);
+
+        ottracer.init(context);
+
+        return context;
+    }
+
     @Before
     public void init() {
 {noformat}

But depends whether the @BindToRegistry is important for the agent?


> Support OpenTracing SpecialAgent
> --------------------------------
>
>                 Key: CAMEL-14305
>                 URL: https://issues.apache.org/jira/browse/CAMEL-14305
>             Project: Camel
>          Issue Type: Task
>    Affects Versions: 3.0.0
>            Reporter: Seva Safris
>            Priority: Major
>
> The OpenTracing SpecialAgent includes support for the Apache Camel 
> OpenTracing component. Since the release of Camel v3.0.0, the integration 
> fails to install.
> For previous versions of Camel, the SpecialAgent has usedĀ theĀ  
> [`InstallOpenTracingTracerRuleTest`|https://github.com/opentracing-contrib/java-specialagent/blob/e5df4f890e29e413e972915bf1adbdc3714519bd/rule/camel/src/test/java/org/apache/camel/opentracing/agent/InstallOpenTracingTracerRuleTest.java]
>  to assert that the Camel OpenTracing component works with SpecialAgent.
> Since the release of Camel v3.0.0, the [`InstallOpenTracingTracerRuleTest` 
> that is in Camel's 
> GitHub|https://github.com/apache/camel/blob/master/components/camel-opentracing/src/test/java/org/apache/camel/opentracing/agent/InstallOpenTracingTracerRuleTest.java]
>  has been marked with `@Ignore`. When I remove the `@Ignore` annotation, the 
> test fails. I am not experienced with the Camel OpenTracing component to 
> attempt to debug this issue.
> Currently, SpecialAgent integrates the Camel OpenTracing component for 
> [versions 2.24.0 to 
> 2.24.2|https://github.com/opentracing-contrib/java-specialagent/#61-instrumentation-plugins].
>  Does the Apache Camel team desire integration of the Camel 3.0.0 OpenTracing 
> component in SpecialAgent? 



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to