Permalink
Branch: master
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
66 lines (38 sloc) 2.53 KB

Example Tracing

Overview

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.

Prerequisites

  • Kyma as the target deployment environment.
  • Helm for local installation.
  • A Namespace to which you deploy the example with the env: "true" label. For more information, read the related documentation.

Installation

Local installation

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.

  1. 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/
  1. Follow the instructions in the Cluster installation section (skip step 2). You can access the tracing UI locally at https://jaeger.kyma.local.

Cluster installation

  1. Export your Namespace as a variable by replacing the {namespace} placeholder in the following command and running it:

    export KYMA_EXAMPLE_NS="{namespace}"
  2. Deploy the service. Run this command:

    kubectl apply -f deployment/deployment.yaml -n $KYMA_EXAMPLE_NS

Get traces from the example service

  1. 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
  2. Access the tracing UI on a cluster at https://jaeger.{YOUR_CLUSTER_DOMAIN}.

  3. Select order-front from the list of available services and click Find Traces.

  4. The UI displays end-to-end traces for the API call that simulated an incoming order.

Cleanup

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