You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by GitBox <gi...@apache.org> on 2022/04/11 11:11:54 UTC

[GitHub] [camel-k] squakez commented on a diff in pull request #3184: tracing trait usage example

squakez commented on code in PR #3184:
URL: https://github.com/apache/camel-k/pull/3184#discussion_r847206717


##########
examples/traits/tracing/README.md:
##########
@@ -0,0 +1,50 @@
+# Camel K Tracing Trait
+
+In this section you will find examples about fine tuning your `Integration` using **Tracing** `trait` capability.
+
+The Tracing trait can be used to automatically publish tracing information of interactions to an OpenTracing compatible collector.
+
+## Configure and Setup Jaeger
+
+1. Enable Ingress addon in Minikube 
+
+    $ minikube addons enable ingress
+
+2. Add Minikube IP to /etc/hosts:
+
+    $ echo "$(minikube ip) example.com" | sudo tee -a /etc/hosts
+
+3. To install Jaeger, make sure the Jaeger operator is installed:
+
+    $ kubetcl apply -f tracing/instance.yaml
+
+4. Apply the Jaeger All-in-one Template:
+
+    $ kubectl apply -f https://raw.githubusercontent.com/jaegertracing/jaeger-kubernetes/master/all-in-one/jaeger-all-in-one-template.yml
+
+
+## Enable OpenTracing and trace a REST API call in Camel K Route 
+
+Tracing is an important approach for controlling and monitoring the experience of users. We  will be creating two distributed services: 'Order,' which is a rest service, and 'Inventory,' which is also a rest service.
+
+Quarkus OpenTracing extension in Camel automatically creates a Camel OpenTracingTracer and binds it to the Camel registry. Simply configure the properties to enable open tracing.
+
+See`quarkus.properties` for details.

Review Comment:
   See `quarkus.properties`, with a space



##########
examples/traits/tracing/README.md:
##########
@@ -0,0 +1,50 @@
+# Camel K Tracing Trait
+
+In this section you will find examples about fine tuning your `Integration` using **Tracing** `trait` capability.
+
+The Tracing trait can be used to automatically publish tracing information of interactions to an OpenTracing compatible collector.
+
+## Configure and Setup Jaeger
+
+1. Enable Ingress addon in Minikube 
+
+    $ minikube addons enable ingress
+
+2. Add Minikube IP to /etc/hosts:
+
+    $ echo "$(minikube ip) example.com" | sudo tee -a /etc/hosts
+
+3. To install Jaeger, make sure the Jaeger operator is installed:
+
+    $ kubetcl apply -f tracing/instance.yaml
+
+4. Apply the Jaeger All-in-one Template:
+
+    $ kubectl apply -f https://raw.githubusercontent.com/jaegertracing/jaeger-kubernetes/master/all-in-one/jaeger-all-in-one-template.yml
+
+
+## Enable OpenTracing and trace a REST API call in Camel K Route 
+
+Tracing is an important approach for controlling and monitoring the experience of users. We  will be creating two distributed services: 'Order,' which is a rest service, and 'Inventory,' which is also a rest service.

Review Comment:
   You may need `Order` and `Inventory`, with backtick and without `,`



##########
examples/traits/tracing/customizers/OpentracingCustomizer.java:
##########
@@ -0,0 +1,42 @@
+package customziers;

Review Comment:
   Maybe `customizers`



##########
examples/traits/tracing/InventoryService.java:
##########
@@ -0,0 +1,113 @@
+/*
+ * 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.
+ */
+
+
+ /* kamel run --name=inventory-service -d camel-swagger-java -d camel-jackson -d camel-undertow  InventoryService.java

Review Comment:
   Just keep the line we are using to run this Integration



##########
examples/traits/tracing/OrderService.java:
##########
@@ -0,0 +1,133 @@
+/** 

Review Comment:
   Missing copyright statements



##########
examples/traits/tracing/OrderService.java:
##########
@@ -0,0 +1,133 @@
+/** 
+kamel run --name=order-service-api -d camel-swagger-java -d camel-jackson -d camel-undertow  OrderService.java --dev
+kamel run --name order customizers/OpentracingCustomizer.java -d camel-opentracing -d mvn:io.jaegertracing:jaeger-client:1.2.0 -d camel-swagger-java -d camel-jackson -d camel-undertow --property-file application.properties OrderService.java

Review Comment:
   Just keep the line used to run this Integration



##########
examples/traits/tracing/customizers/OpentracingCustomizer.java:
##########
@@ -0,0 +1,42 @@
+package customziers;

Review Comment:
   Copyright statements



-- 
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