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 as the target deployment environment.
- Helm for local installation.
NOTE: By default, the PILOT_TRACE_SAMPLING value in the IstioControlPlane is set to
1
, where100
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, follow these instructions to increase the value.
NOTE: If you use a local Deployment of Kyma on Minikube, be aware that Jaeger installation is optional, and you cannot install it locally by default. However, you can install it on a Kyma instance and run it locally using Helm.
- To install Jaeger, go to the Kyma resources directory and run the following command:
helm install -n jaeger -f jaeger/values.yaml --namespace kyma-system --set-string global.domainName=kyma.local --set-string global.isLocalEnv=true jaeger/
- Follow the instructions in the Cluster installation section (skip step 2). You can access the tracing UI locally at
https://jaeger.kyma.local
.
-
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 tracing UI on a cluster at
https://jaeger.{YOUR_CLUSTER_DOMAIN}
. -
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