zipkin

openzipkinApache-2.0活跃维护

Zipkin 是一个分布式追踪系统,用于收集和查看微服务间的调用链路与耗时,帮助定位跨服务延迟和故障。

Zipkin is a distributed tracing system

3.6.1发布于 2026-04-08 19:00 UTC17,476star +3 / 7 天3,093fork同步于 2026-11-10 17:25 UTC

怎么上手

由 README 提炼,执行前请确认
curl -sSL https://zipkin.io/quickstart.sh | bash -s
java -jar zipkin.jar
硬件要求按 README 说明

README 未说明具体硬件要求;服务端需 JRE 17+,核心库最低 Java 8,存储组件需 Java 17+。

有 Docker 镜像
下载:源码 zip·GitHub Releases(安装包)本站不镜像安装包

项目说明

由 README 自动翻译提炼

分布式链路追踪系统,收集并查询服务调用耗时数据,帮你定位微服务架构中的延迟问题

Zipkin 是一个分布式追踪系统,用于收集和查看微服务间的调用链路与耗时,帮助定位跨服务延迟和故障。

核心能力

  • 按 trace ID 或服务、操作名、标签、耗时查询链路
  • UI 展示依赖拓扑图,呈现各应用间调用量与错误路径
  • 支持 HTTP、Kafka、gRPC、RabbitMQ 等多种上报方式
  • 存储可选内存、Cassandra 或 Elasticsearch 后端
  • 提供精简版 slim 构建,启动更快且体积更小

容易踩的坑

服务端运行需 JRE 17+,低版本 Java 无法启动;Cassandra 和 Elasticsearch 存储需额外跑 zipkin-dependencies 聚合作业才能出依赖图;slim 版不支持 Kafka、RabbitMQ 等消息传输,选型时注意;默认 UI 端口为 9411。

内容由模型根据 README 生成,可能不完整或不准确,以官方文档为准。看原文 README

最近发版

5 个版本3.6.1
  1. 3.6.1最新正式版2026-04-08 · 2026-04-08 19:00 UTC

    What's Changed

    New Contributors

    Full Changelog: https://github.com/openzipkin/zipkin/compare/3.6.0...3.6.1

  2. 3.6.02026-03-23 · 2026-03-23 21:13 UTC
    查看更新说明

    What's Changed

    Zipkin 3.6.0 docker images are now based on JRE 25. Library bytecode are the same versions as before.

    Thanks to @reta and @tmurakam for a lot of maintenance especially around OpenSearch support.

    Note, we no longer test against the now EOL Elasticsearch 7.x in favor of 8.x and 9.x.

    Notable library updates:

    • Armeria 1.32.3 -> 1.37.0
    • Spring Boot 3.4.5 -> 3.5.12
    • Netty 4.1.121.Final -> 4.2.10.Final
    • Jackson 2.18.3 -> 2.21.2
    • Micrometer 1.14.5 -> 1.16.4

    Notable Docker image updates:

    • Alpine 3.21.3 -> 3.23.3
    • JRE 21.0.7_p6 -> 25.0.2_p10

    New Contributors

    For fine grained details, see the comparison with 3.5.1.

  3. 3.5.12025-04-27 · 2025-04-27 20:51 UTC
    查看更新说明

    What's Changed

    Full Changelog: https://github.com/openzipkin/zipkin/compare/3.5.0...3.5.1

  4. 3.5.02025-02-16 · 2025-02-16 18:23 UTC
    查看更新说明

    What's Changed

    Zipkin now supports Apache Pulsar as a span transport, enabled by PULSAR_SERVICE_URL and documented here. Kudos to @CodePrometheus for all the work on this!

    We also updated all libraries and docker base layers to latest, fixing all critical CVEs. Thanks to @reta on the continued help keeping things tidy and routinely released!

    New Contributors

    Full Changelog: https://github.com/openzipkin/zipkin/compare/3.4.4...3.5.0

  5. 3.4.42025-02-16 · 2025-02-16 17:20 UTC
    查看更新说明

    What's Changed

    Full Changelog: https://github.com/openzipkin/zipkin/compare/3.4.3...3.4.4

用户点评

登录用户的真实使用记录,可按版本和硬件筛选
共 0 条

    还没有人点评。第一个说出真实体验的人最有价值。

    README 原文

    未翻译

    zipkin

    Gitter chat Build Status Maven Central

    Zipkin is a distributed tracing system. It helps gather timing data needed to troubleshoot latency problems in service architectures. Features include both the collection and lookup of this data.

    If you have a trace ID in a log file, you can jump directly to it. Otherwise, you can query based on attributes such as service, operation name, tags and duration. Some interesting data will be summarized for you, such as the percentage of time spent in a service, and whether operations failed.

    The Zipkin UI also presents a dependency diagram showing how many traced requests went through each application. This can be helpful for identifying aggregate behavior including error paths or calls to deprecated services.

    Application’s need to be “instrumented” to report trace data to Zipkin. This usually means configuration of a tracer or instrumentation library. The most popular ways to report data to Zipkin are via http or Kafka, though many other options exist, such as Apache ActiveMQ, gRPC, RabbitMQ and Apache Pulsar. The data served to the UI is stored in-memory, or persistently with a supported backend such as Apache Cassandra or Elasticsearch.

    Quick-start

    The quickest way to get started is to fetch the latest released server as a self-contained executable jar. Note that the Zipkin server requires minimum JRE 17+. For example:

    curl -sSL https://zipkin.io/quickstart.sh | bash -s
    java -jar zipkin.jar
    

    You can also start Zipkin via Docker.

    # Note: this is mirrored as ghcr.io/openzipkin/zipkin
    docker run -d -p 9411:9411 openzipkin/zipkin
    

    Once the server is running, you can view traces with the Zipkin UI at http://localhost:9411/zipkin.

    If your applications aren't sending traces, yet, configure them with Zipkin instrumentation or try one of our examples.

    Check out the zipkin-server documentation for configuration details, or Docker examples for how to use docker-compose.

    Zipkin Slim

    The slim build of Zipkin is smaller and starts faster. It supports in-memory and Elasticsearch storage, but doesn't support messaging transports like Kafka or RabbitMQ. If these constraints match your needs, you can try slim like below:

    Running via Java:

    curl -sSL https://zipkin.io/quickstart.sh | bash -s io.zipkin:zipkin-server:LATEST:slim zipkin.jar
    java -jar zipkin.jar
    

    Running via Docker:

    # Note: this is mirrored as ghcr.io/openzipkin/zipkin-slim
    docker run -d -p 9411:9411 openzipkin/zipkin-slim
    

    Running via Homebrew:

    brew install zipkin
    # to run in foreground
    zipkin
    # to run in background
    brew services start zipkin
    

    Core Library

    The core library is used by both Zipkin instrumentation and the Zipkin server.

    This includes built-in codec for Zipkin's v1 and v2 json formats. A direct dependency on gson (json library) is avoided by minifying and repackaging classes used. The result is a 155k jar which won't conflict with any library you use.

    Ex.

    // All data are recorded against the same endpoint, associated with your service graph
    localEndpoint = Endpoint.newBuilder().serviceName("tweetie").ip("192.168.0.1").build()
    span = Span.newBuilder()
        .traceId("d3d200866a77cc59")
        .id("d3d200866a77cc59")
        .name("targz")
        .localEndpoint(localEndpoint)
        .timestamp(epochMicros())
        .duration(durationInMicros)
        .putTag("compression.level", "9");
    
    // Now, you can encode it as json
    bytes = SpanBytesEncoder.JSON_V2.encode(span);
    

    Note: The above is just an example, most likely you'll want to use an existing tracing library like Brave

    Core Library Requires Java 8+

    The minimum Java language level of the core library is 8. This helps support those writing agent instrumentation. Version 2.x was the last to support Java 6.

    Note: zipkin-reporter-brave does not use this library. So, brave still supports Java 6.

    Storage Component

    Zipkin includes a StorageComponent, used to store and query spans and dependency links. This is used by the server and those making collectors, or span reporters. For this reason, storage components have minimal dependencies, though require Java 17+.

    Ex.

    // this won't create network connections
    storage = ElasticsearchStorage.newBuilder()
                                  .hosts(asList("http://myelastic:9200")).build();
    
    // prepare a call
    traceCall = storage.spanStore().getTrace("d3d200866a77cc59");
    
    // execute it synchronously or asynchronously
    trace = traceCall.execute();
    
    // clean up any sessions, etc
    storage.close();
    

    In-Memory

    The InMemoryStorage component is packaged in zipkin's core library. It is neither persistent, nor viable for realistic work loads. Its purpose is for testing, for example starting a server on your laptop without any database needed.

    Cassandra

    The Cassandra component uses Cassandra 3.11.3+ features, but is tested against the latest patch of Cassandra 4.1.

    This is the second generation of our Cassandra schema. It stores spans using UDTs, such that they appear like Zipkin v2 json in cqlsh. It is designed for scale, and uses a combination of SASI and manually implemented indexes to make querying larger data more performant.

    Note: This store requires a job to aggregate dependency links.

    Elasticsearch

    The Elasticsearch component uses Elasticsearch 5+ features, but is tested against Elasticsearch 7-8.x and OpenSearch 2.x.

    It stores spans as Zipkin v2 json so that integration with other tools is straightforward. To help with scale, this uses a combination of custom and manually implemented indexing.

    Note: This store requires a spark job to aggregate dependency links.

    Disabling search

    The following API endpoints provide search features, and are enabled by default. Search primarily allows the trace list screen of the UI operate.

    • GET /services - Distinct Span.localServiceName
    • GET /remoteServices?serviceName=X - Distinct Span.remoteServiceName by Span.localServiceName
    • GET /spans?serviceName=X - Distinct Span.name by Span.localServiceName
    • GET /autocompleteKeys - Distinct keys of Span.tags subject to configurable whitelist
    • GET /autocompleteValues?key=X - Distinct values of Span.tags by key
    • GET /traces - Traces matching a query possibly including the above criteria

    When search is disabled, traces can only be retrieved by ID (GET /trace/{traceId}). Disabling search is only viable when there is an alternative way to find trace IDs, such as logs. Disabling search can reduce storage costs or increase write throughput.

    StorageComponent.Builder.searchEnabled(false) is implied when a zipkin is run with the env variable SEARCH_ENABLED=false.

    Legacy (v1) components

    The following components are no longer encouraged, but exist to help aid transition to supported ones. These are indicated as "v1" as they use data layouts based on Zipkin's V1 Thrift model, as opposed to the simpler v2 data model currently used.

    MySQL

    The MySQL v1 component uses MySQL 5.6+ features, but is tested against MariaDB 10.11.

    The schema was designed to be easy to understand and get started with; it was not designed for performance. Ex spans fields are columns, so you can perform ad-hoc queries using SQL. However, this component has known performance issues: queries will eventually take seconds to return if you put a lot of data into it.

    This store does not require a job to aggregate dependency links. However, running the job will improve performance of dependencies queries.

    Running the server from source

    The Zipkin server receives spans via HTTP POST and respond to queries from its UI. It can also run collectors, such as RabbitMQ or Kafka.

    To run the server from the currently checked out source, enter the following. JDK 17+ is required to compile the source.

    # Build the server and also make its dependencies
    $ ./mvnw -q --batch-mode -DskipTests --also-make -pl zipkin-server clean install
    # Run the server
    $ java -jar ./zipkin-server/target/zipkin-server-*exec.jar
    

    Artifacts

    Server artifacts are under the maven group id io.zipkin Library artifacts are under the maven group id io.zipkin.zipkin2

    Library Releases

    Releases are at Maven Central

    Library Snapshots

    Snapshots are uploaded to Sonatype after commits to master.

    Docker Images

    Released versions of zipkin-server are published to Docker Hub as openzipkin/zipkin and GitHub Container Registry as ghcr.io/openzipkin/zipkin. See docker for details.

    Helm Charts

    Helm charts are available via helm repo add zipkin https://zipkin.io/zipkin-helm. See zipkin-helm for details.

    Javadocs

    https://zipkin.io/zipkin contains versioned folders with JavaDocs published on each (non-PR) build, as well as releases.