This example illustrates how to enable tracing for a service deployed in Kyma. For demostration, 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 example-tracing file to learn about port naming and setting the app label.
- A Docker
- An Environment created in Kyma to which you deploy the example application.
-
Build the Docker image of the Go application. Run:
docker build . -t order-front:latest
-
Run the image:
docker run -p 8080:8080 order-front:latest
-
Export the name of the Kyma Environment to which you want to install the example as an environment variable. Run this command:
export KYMA_EXAMPLE_ENV="{YOUR_ENV_NAME}"
-
Change the value of the hostname parameter from
order-front-api.kyma.local
toorder-front-api.{YOUR_CLUSTER_DOMAIN}
in the example-tracing file. -
Deploy the service. Run:
kubectl apply -f ./example-tracing.yaml -n $KYMA_EXAMPLE_ENV
-
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.{domain-of-kyma-cluster}/orders
-
Access the tracing UI either locally at
https://jaeger.kyma.local
or on a cluster athttps://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:
kubectl delete deployment,svc,api -l example=tracing -n $KYMA_EXAMPLE_ENV