observable microservices with microprofile opentracing
play

Observable microservices with MicroProfile OpenTracing and - PowerPoint PPT Presentation

OPTIONAL SECTION MARKER OR TITLE Observable microservices with MicroProfile OpenTracing and looking beyond to OpenTelemetry Pavol Loffay Senior Software Engineer 1 Agenda Introduction to distributed tracing MicroProfile-OpenTracing


  1. OPTIONAL SECTION MARKER OR TITLE Observable microservices with MicroProfile OpenTracing and looking beyond to OpenTelemetry Pavol Loffay Senior Software Engineer 1

  2. Agenda ● Introduction to distributed tracing ● MicroProfile-OpenTracing ● Demo tracing in Quarkus with Jaeger ● OpenTelemetry 2

  3. Pavol Loffay ● Software Engineer at Red Hat ● Distributed tracing: Jaeger, OpenTracing, OpenTelemetry ● MicroProfile-OpenTracing 3

  4. Why tracing? 4

  5. Modern distributed systems are complex. Loading a page can involve 100s services and multiple nodes. 5

  6. CORPORATE SLIDE TEMPLATES 6

  7. We want to tell what happened with the request. Which service or component caused the problem under which conditions. 7

  8. Metrics - no context, which request caused a spike? Logs - hard to correlate, parallel requests, multiple hosts. 8

  9. Monitoring tools must tell stories Metrics and logs have no context or describe only one instance. Distributed tracing tells story about the whole the transaction. 9

  10. Distributed Tracing 10

  11. Distributed Tracing concepts time TraceID → {context} A A B {context} {context} TRACE C D B {context} {context} E E C D SPANS 11

  12. Distributed Tracing concepts In-process context propagation 12

  13. MicroProfile-OpenTracing 13

  14. MicroProfile-OpenTracing ● Uses OpenTracing ● Tracing API semantics and API ● Vendor neutral ● Defines additional API ● No data/wire format 14

  15. MicroProfile-OpenTracing Auto instrumentation @Path("/") public class Handler { @GET ● JAX-RS @Path("/hello") public Response hello() { Response response = client .target("http://localhost:8090/api") ● MicroProfile Rest .request() .get(); Client String entity = response.readEntity(String.class); response.close(); return Response.ok(entity).build(); } } 15

  16. MicroProfile-OpenTracing Explicit instrumentation @Path("/") public class Handler { @Inject private io.opentracing.Tracer tracer; ● @Traced @GET ● @Inject @Path("/hello") @Traced(operationName = "bonjour") public Response hello() { return Response.ok().build(); io.opentracing.Tracer } @GET @Path("/ping") @Traced(false) public Response ping() { return Response.ok().build(); } } 16

  17. MicroProfile-OpenTracing Configuration ● MP Config ● mp.opentracing.server.operation-name-provider ○ GET:foo.bar.UserHandler.getUser ○ /user/{id} ● mp.opentracing.server.skip-pattern ○ /health|/foo/bar* 17

  18. Demo Quarkus application https://github.com/pavolloffay/quarkus-tracing 18

  19. MicroProfile-OpenTracing Roadmap ● Operation names for MP Rest Client ● More annotations ● Automatically trace CDI ● MicroProfile-Reactive Messaging ● MicroProfile-Fault tolerance 19

  20. OpenTelemetry 20

  21. OpenTelemetry ● “The next major version of OpenTracing and OpenCensus” ● CNCF (Google, Microsoft, LightStep, Dynatrace, DataDog…) 21

  22. OpenTelemetry ● API, SDK ● Data format and W3C Trace-Context ● Tracing, Metrics, (Logs) ● Named tracers/meters tracer = OpenTelemetry.getTracerFactory().getTracer("io.opentelemetry.contrib.mongodb", "semver:1.0.0"); ● Agent/Collector 22

  23. 23

  24. OpenTelemetry in MP 1. New specification 2. Expose OpenTelemetry in MP-OT 3. Hybrid: new project and use OT shim 24

  25. Start with distributed tracing as early as possible. Go to MicroProfile forum and vote which proposal you like! 25

  26. OPTIONAL SECTION MARKER OR TITLE Thank you Red Hat is the world’s leading provider of enterprise open source software solutions. Award-winning support, training, and consulting services make Red Hat a trusted adviser to the Fortune 500. linkedin.com/company/red-hat facebook.com/redhatinc youtube.com/user/RedHatVideos twitter.com/RedHat 26

Recommend


More recommend