Distributed Tracing & Observability With Zipkin and Micrometer

    Question 1: DISTRIBUTED TRACING - Purpose of Distributed Tracing

    What is the primary purpose of distributed tracing in microservices?

    Question 2: DISTRIBUTED TRACING - Spring Cloud Sleuth Role

    What does Spring Cloud Sleuth do in a Spring Boot microservice?

    Question 3: DISTRIBUTED TRACING - Code Snippet (Enable Sleuth and Zipkin)

    What is achieved by this configuration in application.yml?

    spring: zipkin: base-url: http://localhost:9411 enabled: true sleuth: sampler: probability: 1.0

    Question 4: DISTRIBUTED TRACING - Span vs Trace

    Which statement is correct?

    Question 5: DISTRIBUTED TRACING - Micrometer Metrics Purpose

    What is Micrometer used for in Spring Boot?

    Question 6: DISTRIBUTED TRACING - Code Snippet (Custom Span)

    What does this snippet do?

    @Autowired Tracer tracer; public void processPayment() { Span newSpan = tracer.nextSpan().name("payment-span"); try (Tracer.SpanInScope ws = tracer.withSpan(newSpan.start())) { // business logic here } finally { newSpan.end(); } }

    Question 7: DISTRIBUTED TRACING - Auto-Instrumentation

    How does Spring Cloud Sleuth instrument HTTP requests automatically?

    Question 8: DISTRIBUTED TRACING - Code Snippet (Micrometer Counter)

    What does this snippet achieve?

    @Autowired MeterRegistry registry; public void incrementOrders() { registry.counter("orders.processed").increment(); }

    Question 9: DISTRIBUTED TRACING - Sampling Probability

    In Sleuth, what does setting spring.sleuth.sampler.probability=0.5 do?

    Question 10: DISTRIBUTED TRACING - Visualizing Traces

    Which tool is commonly used to visualize traces collected from Sleuth?