CAUTION This example is outdated and will be updated soon. Please have a look at the trace-demo and jaeger instead.
This example illustrates how to enable tracing for a service deployed in Kyma. For demonstration, it creates a Go application. This application uses http-db-service for CRUD operations on orders.
To understand how traces are propagated, see the Go application. See the deployment
file to learn about port naming and setting the app
label.
- Kyma OS version 2.10.x or higher
- kubectl version 1.22.x or higher
- Helm 3.x
NOTE: By default, the sampling rate for Istio is set to
1
, while100
is the maximum value. This means that only 1 out of 100 requests is sent to Jaeger for trace recording, which can affect the number of traces displayed for the service. To change this behavior, adjust therandomSamplingPercentage
setting in the Istio's telemetry resource:
kubectl -n istio-system edit telemetries.telemetry.istio.io kyma-traces
-
Export your Namespace as a variable by replacing the
{namespace}
placeholder in the following command and running it:export KYMA_EXAMPLE_NS="{namespace}"
-
Deploy the service. Run this command:
kubectl apply -f deployment/deployment.yaml -n $KYMA_EXAMPLE_NS
-
Call the example service to simulate an incoming order. Run:
curl -H "Content-Type: application/json" -d '{"orderCode" : "007", "orderPrice" : 12.0}' https://order-front-api.{YOUR_CLUSTER_DOMAIN}/orders
-
Access the Jaeger UI on the cluster at
http://localhost:16686
using port-forwarding:
kubectl port-forward -n kyma-system svc/tracing-jaeger-query 16686:16686
-
Select order-front from the list of available services and click Find Traces.
-
The UI displays end-to-end traces for the API call that simulated an incoming order.
To remove all resources related to this example from your Kyma cluster, run this command:
kubectl delete all,api -l example=tracing -n $KYMA_EXAMPLE_NS