What is SOFATracer

更新时间:
复制 MD 格式

SOFATracer is a distributed tracing system from Ant Financial that is based on the OpenTracing specification. Its core function is to link a request across multiple service nodes using a global TraceId. This unified TraceId allows SOFATracer to record all network calls in the invocation chain as logs. The system also reports data to Zipkin for remote visualization, which provides a clear view of all network calls.

Features

Distributed tracing solution based on the OpenTracing specification

SOFATracer provides a tracing solution that is based on the OpenTracing specification and extends its features. Frameworks and components can use this solution to enable tracing through instrumentation.

Asynchronous log printing to disk

SOFATracer uses the Disruptor high-performance lock-free circular queue to asynchronously print logs to a local disk. Frameworks and components can customize the log file output format for asynchronous log printing during integration. SOFATracer provides two types of logs: summary logs and statistics logs:

  • Summary logs: A log is written to disk for every call.

  • Statistics logs: A log is output with statistics at regular intervals.

Log auto-purging and rolling

SOFATracer supports automatic purging and rolling for logs that are asynchronously written to disk. Logs can be purged daily and rolled hourly or daily.

Extensions based on SLF4J MDC

SLF4J provides the Mapped Diagnostic Contexts (MDC) feature. This feature lets you define and modify the format and content of log outputs. SOFATracer integrates the SLF4J MDC feature. To output the TraceId and SpanId from the current tracer context, you can simply modify the log configuration file.

Interface display

SOFATracer can remotely report trace data to the open source product Zipkin for visualization.

Unified configuration

The configuration file provides extensive options for customizing the application.

Scenarios

Solves distributed tracing challenges in large-scale microservices architectures, provides visibility into network calls, and facilitates rapid fault discovery and service governance.

Component instrumentation

SOFATracer currently supports instrumentation for open source components such as Spring MVC, database connection pools that implement the standard Java Database Connectivity (JDBC) interface (DBCP, Druid, c3p0, tomcat, HikariCP, and BoneCP), HttpClient, Dubbo, and Spring Cloud OpenFeign. Instrumentation support for other open source components, such as MQ and Redis, is under development.