تصدير التتبعات إلى Zipkin
اعرض التتبعات بصريًا في Zipkin
تصدير التتبعات إلى Zipkin درس مجاني في Spring Boot 4 Microservices & REST APIs على CoddyKit. هذا هو الدرس 3 من أصل 4. يمكنك قراءة الدرس كاملاً أدناه مجاناً — ثم تمرن عليه مباشرة في المتصفح باستخدام محرر أكواد مدمج ومدرس ذكاء اصطناعي متاح 24/7. هذا الدرس جزء من مسار التعلم في Spring Boot 4 Microservices & REST APIs، وتقدمك يتزامن عبر الويب وتطبيق CoddyKit. تتضمن دورة Spring Boot 4 Microservices & REST APIs 4 دروس في المجموع.
بعض أجزاء هذا الدرس لم تُترجم بعد وتظهر باللغة الإنجليزية.
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:9411Adding 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/spansSetting 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 devService 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-serviceHow 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.nameis the Zipkin service name- Explore waterfalls and the service dependency graph in the UI
الأسئلة الشائعة
هل درس «تصدير التتبعات إلى Zipkin» مجاني؟
نعم — نص درس «تصدير التتبعات إلى Zipkin» كامل متاح مجاناً هنا على الويب. لتمرينه بشكل تفاعلي (محرر أكواد مدمج ومدرس ذكاء اصطناعي متاح 24/7) وفتح باقي دورة Spring Boot 4 Microservices & REST APIs، انتقل إلى CoddyKit PRO. تتضمن دورة Spring Boot 4 Microservices & REST APIs 4 دروس في المجموع.
ماذا ستتعلم في «تصدير التتبعات إلى Zipkin»؟
اعرض التتبعات بصريًا في Zipkin تتمرن على Spring Boot 4 Microservices & REST APIs مع أكواد عملية تشغلها مباشرة في المتصفح، ومدرس ذكاء اصطناعي متاح 24/7 يجيب على أسئلتك أثناء عملك.
هل أحتاج إلى خبرة سابقة لأبدأ Spring Boot 4 Microservices & REST APIs؟
لا تُشترط خبرة سابقة. Spring Boot 4 Microservices & REST APIs على CoddyKit منظم للمبتدئين حتى المتقدمين، لذا يمكنك البدء من هنا أو من البداية والتقدم بسرعتك الخاصة. هذا هو الدرس 3 من أصل 4.
كم من الوقت يستغرق درس «تصدير التتبعات إلى Zipkin»؟
معظم دروس CoddyKit تستغرق حوالي 5–10 دقائق. كل منها موجز وتفاعلي، لذا تحرز تقدماً مستمراً وتستأنف من حيث توقفت عبر الويب والتطبيق.
هل يمكنني كتابة وتشغيل أكواد في درس Spring Boot 4 Microservices & REST APIs هذا؟
نعم. كل درس في Spring Boot 4 Microservices & REST APIs يتضمن محرر أكواد مدمج، لذا تكتب وتشغل أكواداً حقيقية مباشرة في متصفحك وتحصل على تعليقات فورية من الذكاء الاصطناعي — بدون إعداد محلي.
جميع الدروس في هذه الدورة
- أهمية التتبّع الموزّع
- تتبّع Micrometer
- تصدير التتبعات إلى Zipkin
- ربط السجلات بالتتبعات