Full-Stack Distributed Tracing

Created:2023-10-04 Last Modified:2024-06-24

This document was translated by ChatGPT

DeepFlow leverages eBPF to innovatively implement AutoTracing, covering distributed tracing at both the API call and network transmission levels. This complements OpenTelemetry's function-level coverage within application code.

By integrating APM data sources such as OpenTelemetry and SkyWalking, AutoTracing capabilities are further enhanced, enabling full-stack distributed tracing across applications, systems, and networks. In the flame graph below, we can observe:

  • Complex and lengthy gateway paths can be traced, including API gateways, microservice gateways, load balancers, Ingress, etc.
  • Upstream and downstream calls of any microservice can be traced, including often-overlooked calls like DNS, and services that cannot be instrumented like MySQL and Redis.
  • Full-stack network paths between any two microservices can be traced, covering from application code to system calls, container network components like Sidecar/iptables/ipvs, virtual machine network components like OvS/LinuxBridge, and cloud network components like NFV gateways.

DeepFlow and APM Integration

DeepFlow and APM Integration

There are several methods for integrating DeepFlow with APM, categorized into four types:

  • Full-stack distributed tracing results displayed by DeepFlow
  • Full-stack distributed tracing results displayed by APM
      1. Providing API: APM calls the Trace Completion API provided by DeepFlow to obtain SYS Spans and NET Spans from DeepFlow. Configuration methods can be found in the Trace Completion API documentation
      1. Data Export: APM receives SYS Spans and NET Spans exported by DeepFlow via the OTLP protocol. Configuration methods can be found in the OTLP Exporter documentation

Among the four methods mentioned above, methods 1 and 2 require the least effort, as they only need configuration; method 3 also has a very small development workload, making it very suitable for initial use; method 4 requires understanding the association logic between SYS Span, NET Span, and APP Span, and has a larger development workload, making it suitable for use after gaining a deep understanding of DeepFlow.