0Pricing
Spring Boot 4 Microservices & REST APIs · Lektion

Traces nach Zipkin exportieren

Visualisieren Sie Traces in Zipkin.

Traces nach Zipkin exportieren ist eine kostenlose Spring Boot 4 Microservices & REST APIs-Lektion auf CoddyKit. Dies ist Lektion 3 von 4. Du kannst die komplette Lektion unten kostenlos lesen – dann übst du sie direkt im Browser mit einem integrierten Code-Editor und einem KI-Tutor rund um die Uhr. Sie ist Teil des Spring Boot 4 Microservices & REST APIs-Lernpfads, und dein Fortschritt wird über Web und CoddyKit-App synchronisiert. Der Spring Boot 4 Microservices & REST APIs-Kurs umfasst insgesamt 4 Lektionen.

Teile dieser Lektion wurden noch nicht übersetzt und werden auf Englisch angezeigt.

Why an exporter is needed

Creating spans is not enough - they must be exported to a backend that stores and visualizes them. Zipkin is a popular, easy-to-run choice.

Running Zipkin

The simplest way to run Zipkin locally is its Docker image. It exposes a UI and an ingest API on port 9411.

// docker run -d -p 9411:9411 openzipkin/zipkin
// UI at http://localhost:9411

Adding the Zipkin reporter

Add the reporter dependency so finished spans are sent to Zipkin.

<dependency>
  <groupId>io.zipkin.reporter2</groupId>
  <artifactId>zipkin-reporter-brave</artifactId>
</dependency>

Configuring the endpoint

Tell Spring where Zipkin lives. The default endpoint is the local Zipkin ingest URL.

management:
  zipkin:
    tracing:
      endpoint: http://localhost:9411/api/v2/spans

Setting the sampling rate

Combine the exporter with a sampling probability. In development you often sample 100% to see every trace.

management:
  tracing:
    sampling:
      probability: 1.0   # 100% in dev

Service name in Zipkin

Spans are grouped by service. Zipkin uses spring.application.name as the service name, so set it meaningfully on each app.

spring:
  application:
    name: order-service

How spans reach Zipkin

Each service buffers finished spans and reports them to Zipkin asynchronously (over HTTP by default). Zipkin joins spans sharing a traceId into one trace.

Exploring traces in the UI

In the Zipkin UI you search by service, span name, tag or duration, then open a trace to see the waterfall of spans across all services.

Reading the dependency graph

Zipkin can render a service dependency diagram from collected traces, showing which services call which - a live map of your architecture.

Alternative backends

The same Micrometer setup can export elsewhere. With the OpenTelemetry bridge you can send to OTLP-compatible backends (Tempo, Jaeger, vendors) instead of Zipkin.

Production considerations

In production, lower the sampling rate, secure the Zipkin endpoint, and ensure the reporter's async queue does not drop too many spans under load. Tracing should never harm request latency.

Quick Check

Confirm your exporter knowledge.

Recap

You exported traces to Zipkin:

  • Run Zipkin (port 9411) and add the Zipkin reporter
  • Set the endpoint and a sampling probability
  • spring.application.name is the Zipkin service name
  • Explore waterfalls and the service dependency graph in the UI

Häufig gestellte Fragen

Ist die Lektion „Traces nach Zipkin exportieren“ kostenlos?

Ja — der vollständige Text von „Traces nach Zipkin exportieren“ ist hier im Web kostenlos zu lesen. Um sie interaktiv zu üben (integrierter Code-Editor und 24/7 KI-Tutor) und den Rest des Spring Boot 4 Microservices & REST APIs-Kurses freizuschalten, upgrade auf CoddyKit PRO. Der Spring Boot 4 Microservices & REST APIs-Kurs umfasst insgesamt 4 Lektionen.

Was lerne ich in „Traces nach Zipkin exportieren“?

Visualisieren Sie Traces in Zipkin. Du übst Spring Boot 4 Microservices & REST APIs mit praktischem Code, den du direkt im Browser ausführst, und ein 24/7 KI-Tutor beantwortet deine Fragen während du die Lektion bearbeitest.

Brauche ich Erfahrung, um Spring Boot 4 Microservices & REST APIs zu starten?

Keine Vorkenntnisse erforderlich. Spring Boot 4 Microservices & REST APIs auf CoddyKit ist für Anfänger bis fortgeschrittene Lernende strukturiert, sodass du hier starten oder von Anfang an beginnen und in deinem eigenen Tempo voranschreiten kannst. Dies ist Lektion 3 von 4.

Wie lange dauert die Lektion „Traces nach Zipkin exportieren“?

Die meisten CoddyKit-Lektionen dauern etwa 5–10 Minuten. Jede ist kompakt und interaktiv, sodass du stetig Fortschritte machst und genau dort weitermachst, wo du aufgehört hast – im Web und in der App.

Kann ich in dieser Spring Boot 4 Microservices & REST APIs-Lektion Code schreiben und ausführen?

Ja. Jede Spring Boot 4 Microservices & REST APIs-Lektion enthält einen integrierten Code-Editor, sodass du echten Code direkt in deinem Browser schreibst und ausführst und sofort KI-Feedback erhältst — ohne lokale Einrichtung erforderlich.

Alle Lektionen in diesem Kurs

  1. Warum verteiltes Tracing wichtig ist
  2. Micrometer Tracing
  3. Traces nach Zipkin exportieren
  4. Logs und Traces korrelieren
← Zurück zu Spring Boot 4 Microservices & REST APIs