Skip to content

Latest commit

 

History

History
60 lines (38 loc) · 2.25 KB

README.md

File metadata and controls

60 lines (38 loc) · 2.25 KB

Example Tracing

CAUTION This example is outdated and will be updated soon. Please have a look at the trace-demo and jaeger instead.

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 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, while 100 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 the randomSamplingPercentage setting in the Istio's telemetry resource:

kubectl -n istio-system edit telemetries.telemetry.istio.io kyma-traces

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 Jaeger UI on the cluster at http://localhost:16686 using port-forwarding:

kubectl port-forward -n kyma-system svc/tracing-jaeger-query 16686:16686
  1. Select order-front from the list of available services and click Find Traces.

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