Testes
Previous versions
Previous versions
  • 3.3.1
    • User Manual
  • 3.3.0
    • User Manual
  • 3.2.4
    • User Manual
      • Glossary
      • Accessing eva
      • Introduction
      • Creating a virtual agent
      • User Management
      • Channel Management
      • Developing a virtual agent
      • Automated Tests
      • Dashboard
      • Appendices
    • Development Manual
      • Base Architecture
      • Conversation context
      • Creating channels – The Conversation API
      • Webhooks
      • Data extraction
      • Distributed Tracing
      • Appendices
    • Virtual agent Migration Guide
    • eva Installation in Azure Cloud
Powered by GitBook
On this page
  • Accessing Jaeger
  • Looking for traces of a specific session ID
  • Understanding the Trace
  • Requisition headers, opentracing standard
  • Adding a custom ID to the trace
  1. 3.2.4
  2. Development Manual

Distributed Tracing

PreviousData extractionNextAppendices

Last updated 3 years ago

When solving problems, it is important to know how clients and eva communicate with each other and how eva’s multiple modules talk to each other during the platform operation. As eva uses ISTIO as service mesh, it is possible to view dialogs systemic errors using an ISTIO package tool called Jaeger

Like Dapper and OpenZipkit, it is an open code distributed tracing system used to monitor and solve problems in microservices-based system such as:

  • Distributed context propagation

  • Distributed transactions monitoring

  • Root cause analysis

  • Service dependence analysis

  • Latency / performance optimization For further information, visit ​

Accessing Jaeger

Important: Before accessing Jaeger, keep in mind that it deals

with sensible information.

By default, Jaeger is not accessible through the internet. To access it, forward the port using the commands below:

$ gcloud container clusters get-credentials --zone  --project $ kubectl port-forward --namespace istio-system$(kubectl get pod --namespace istio-system -- selector="app=jaeger" --output jsonpath='{.items[0].metadata.name}') 16686:16686

If there are no errors, the following message appears:

$ Forwarding from 127.0.0.1:16686 -> 16686

Looking for traces of a specific session ID

With access to Jaeger, open your browser with the address: http://localhost:16686.

In the upper right corner, you can search for traces related to a specific “sessioncode”, fill the TAG field with a session ID such as:

sessionCode=0c2d189f-ebfc-4253-9152-77e29de946ad

If you need to search for traces of a failed requisition, use the command:

error=true sessionCode=0c2d189f-ebfc-4253-9152- 77e29de946ad

Understanding the Trace

Before understanding na eva log in Jaeger, it is important to understand two concepts: span and trance.

A span is a logical work unit in Jaeger that has an operation name, start time and duration. Spans can be aligned and ordered to model causal relationships.

The Trace is the whole execution path though all modules that the requisition went though and can be viewed as an acyclical ordered spans chart.

With the search done and after clicking the selected trace:

It is possible to view the spans that happened during the call.

The red icon (!) helps to find the span containing the detailed error, for example:

Requisition headers, opentracing standard

ISTIO uses Envoy to integrate tracing by offering options to install several tracking back-ends and proxy configurations to send tracking spans automatically to them.

In eva, the default tool is Jaeger.

To make a correlation between the many requisitions that deals with a dialog, eva was changed to forward the headers below in all internal calls between modules. Doing so, it is possible to correlate independently from the instances in execution.

The headers defined in the Opentracing specifications are:

  • x-request-id

  • x-b3-traceid

  • x-b3-spanid

  • x-b3-parentspanid

  • x-b3-sampled

  • x-b3-flags

  • x-ot-span-context

Adding a custom ID to the trace

Sometimes it is necessary to add a custom ID to the requisition to the broker so there is an identifier that can be used to search traces.

For further information, check

​ ​

​ ​

https://istio.io/latest/docs/tasks/observability/distributed-
tracing/overview/
https://www.envoyproxy.io/docs/envoy/v1.12.0/configuration/http/http_c
onn_man/headers#x-client-trace-id
https://www.jaegertracing.io/