You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by "RuslanHryn (via GitHub)" <gi...@apache.org> on 2023/08/28 12:05:35 UTC

[GitHub] [camel] RuslanHryn opened a new pull request, #11213: CAMEL-19776: Added tracing strategy for OpenTelemetry to trace proces…

RuslanHryn opened a new pull request, #11213:
URL: https://github.com/apache/camel/pull/11213

   …sors
   
   # Description
   
   Currency, we are migrating from Camel OpenTracing to Camel OpenTelemetry,
   and OpenTelemetry does not provide a tracing strategy to trace each processor similar to OpenTracingTracingStrategy.
   
   Please add OpenTelematryTracingStrategy for OpenTelemetryTracer with the same functionality as we have in OpenTracingTracingStrategy
   
   OpenTelemetryTracer ottracer = new OpenTelemetryTracer();
   ottracer.setTracingStrategy(new OpenTelemetryTracingStrategy(tracer)); 76
   
   # Target
   
   camel-3.x
   
   After a successful review, I will create another PR for the main branch(Camel 4)
   
   - [ ] I checked that the commit is targeting the correct branch (note that Camel 3 uses `camel-3.x`, whereas Camel 4 uses the `main` branch)
   
   # Tracking
   - [ ] If this is a large change, bug fix, or code improvement, I checked there is a [JIRA issue](https://issues.apache.org/jira/browse/CAMEL-19776) filed for the change (usually before you start working on it).
   
   <!--
   # *Note*: trivial changes like, typos, minor documentation fixes and other small items do not require a JIRA issue. In this case your pull request should address just this issue, without pulling in other changes.
   -->
   
   # Apache Camel coding standards and style
   
   - [ ] I checked that each commit in the pull request has a meaningful subject line and body.
   
   <!--
   If you're unsure, you can format the pull request title like `[CAMEL-XXX] Fixes bug in camel-file component`, where you replace `CAMEL-XXX` with the appropriate JIRA issue.
   -->
   
   - [ ] I have run `mvn clean install -DskipTests` locally and I have committed all auto-generated changes
   
   <!--
   You can run the aforementioned command in your module so that the build auto-formats your code. This will also be verified as part of the checks and your PR may be rejected if if there are uncommited changes after running `mvn clean install -DskipTests`.
   
   You can learn more about the contribution guidelines at https://github.com/apache/camel/blob/main/CONTRIBUTING.md
   -->
   
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@camel.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [camel] RuslanHryn commented on a diff in pull request #11213: CAMEL-19776: Added tracing strategy for OpenTelemetry to trace proces…

Posted by "RuslanHryn (via GitHub)" <gi...@apache.org>.
RuslanHryn commented on code in PR #11213:
URL: https://github.com/apache/camel/pull/11213#discussion_r1307346070


##########
components/camel-opentelemetry/src/main/java/org/apache/camel/opentelemetry/OpenTelemetryTracingStrategy.java:
##########
@@ -0,0 +1,107 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.camel.opentelemetry;
+
+import io.opentelemetry.api.trace.Span;
+import io.opentelemetry.api.trace.StatusCode;
+import io.opentelemetry.context.Context;
+import io.opentelemetry.context.Scope;
+import org.apache.camel.CamelContext;
+import org.apache.camel.Exchange;
+import org.apache.camel.NamedNode;
+import org.apache.camel.Processor;
+import org.apache.camel.spi.InterceptStrategy;
+import org.apache.camel.support.PatternHelper;
+import org.apache.camel.support.processor.DelegateAsyncProcessor;
+import org.apache.camel.tracing.ActiveSpanManager;
+import org.apache.camel.tracing.SpanDecorator;
+
+public class OpenTelemetryTracingStrategy implements InterceptStrategy {

Review Comment:
   Copied from came-opentracing and migrated it to OpenTelemetry



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@camel.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [camel] RuslanHryn commented on pull request #11213: CAMEL-19776: Added tracing strategy for OpenTelemetry to trace proces…

Posted by "RuslanHryn (via GitHub)" <gi...@apache.org>.
RuslanHryn commented on PR #11213:
URL: https://github.com/apache/camel/pull/11213#issuecomment-1695674412

   Failed checkstyle is not relevant to my changes 
   from the logs
   ```
   [camel-undertow] [INFO] --- maven-checkstyle-plugin:3.1.2:checkstyle (default-cli) @ camel-undertow ---
   [camel-netty-http] [INFO] Starting audit...
   [ERROR] /home/runner/work/camel/camel/components/camel-netty-http/src/main/java/org/apache/camel/component/netty/http/NettyHttpEndpoint.java:53:5: Variable access definition in wrong order. [DeclarationOrder]
   [ERROR] /home/runner/work/camel/camel/components/camel-netty-http/src/test/java/org/apache/camel/component/netty/http/NettyHttpProducerProxyModeTest.java:37:5: Static variable definition in wrong order. [DeclarationOrder]
   [ERROR] /home/runner/work/camel/camel/components/camel-netty-http/src/test/java/org/apache/camel/component/netty/http/NettyHttpProducerProxyModeTest.java:37:30: Name 'port' must match pattern '^[A-Z][A-Z0-9]*(_[A-Z0-9]+)*$'. [ConstantName]
   Audit done.
   ```


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@camel.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [camel] oscerd commented on pull request #11213: CAMEL-19776: Added tracing strategy for OpenTelemetry to trace proces…

Posted by "oscerd (via GitHub)" <gi...@apache.org>.
oscerd commented on PR #11213:
URL: https://github.com/apache/camel/pull/11213#issuecomment-1695609449

   I think this should go on main too 


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@camel.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [camel] github-actions[bot] commented on pull request #11213: CAMEL-19776: Added tracing strategy for OpenTelemetry to trace proces…

Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on PR #11213:
URL: https://github.com/apache/camel/pull/11213#issuecomment-1695668684

   :no_entry_sign: There are (likely) no changes in core core to be tested in this PR


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@camel.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [camel] RuslanHryn commented on pull request #11213: CAMEL-19776: Added tracing strategy for OpenTelemetry to trace proces…

Posted by "RuslanHryn (via GitHub)" <gi...@apache.org>.
RuslanHryn commented on PR #11213:
URL: https://github.com/apache/camel/pull/11213#issuecomment-1695637178

   How to view `checkstyle.log` from the build of the PR? 
   I run `mvn clean install -Psourcecheck` locally and found no errors.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@camel.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [camel] davsclaus merged pull request #11213: CAMEL-19776: Added tracing strategy for OpenTelemetry to trace proces…

Posted by "davsclaus (via GitHub)" <gi...@apache.org>.
davsclaus merged PR #11213:
URL: https://github.com/apache/camel/pull/11213


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@camel.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [camel] github-actions[bot] commented on pull request #11213: CAMEL-19776: Added tracing strategy for OpenTelemetry to trace proces…

Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on PR #11213:
URL: https://github.com/apache/camel/pull/11213#issuecomment-1695668652

   ### Components test results:
   
   | Total | Tested | Failed :x: | Passed :white_check_mark: | 
   | --- | --- | --- |  --- |
   | 1 | 1 | 0 | 1 |


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@camel.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [camel] RuslanHryn commented on pull request #11213: CAMEL-19776: Added tracing strategy for OpenTelemetry to trace proces…

Posted by "RuslanHryn (via GitHub)" <gi...@apache.org>.
RuslanHryn commented on PR #11213:
URL: https://github.com/apache/camel/pull/11213#issuecomment-1697233182

   @davsclaus Thank you!
   I've prepared two more PRs 
   for main branch https://github.com/apache/camel/pull/11231
   for camel-4.0.x https://github.com/apache/camel/pull/11230 . Needs it to not block migration to Spring Boot 3


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@camel.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [camel] github-actions[bot] commented on pull request #11213: CAMEL-19776: Added tracing strategy for OpenTelemetry to trace proces…

Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on PR #11213:
URL: https://github.com/apache/camel/pull/11213#issuecomment-1695578516

   :star2: Thank you for your contribution to the Apache Camel project! :star2: 
   
   :warning: Please note that the changes on this PR may be **tested automatically**. 
   
   If necessary Apache Camel Committers may access logs and test results in the job summaries!


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@camel.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [camel] RuslanHryn commented on pull request #11213: CAMEL-19776: Added tracing strategy for OpenTelemetry to trace proces…

Posted by "RuslanHryn (via GitHub)" <gi...@apache.org>.
RuslanHryn commented on PR #11213:
URL: https://github.com/apache/camel/pull/11213#issuecomment-1695612329

   @oscerd yes, After a successful review, I will create another PR for the main branch(Camel 4)


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@camel.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [camel] davsclaus commented on pull request #11213: CAMEL-19776: Added tracing strategy for OpenTelemetry to trace proces…

Posted by "davsclaus (via GitHub)" <gi...@apache.org>.
davsclaus commented on PR #11213:
URL: https://github.com/apache/camel/pull/11213#issuecomment-1696762227

   Thanks can you send another PR for main branch


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@camel.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org