Observable microservices with MicroProfile OpenTracing and - - PowerPoint PPT Presentation

observable microservices with microprofile opentracing
SMART_READER_LITE
LIVE PREVIEW

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


slide-1
SLIDE 1

1

Observable microservices with MicroProfile OpenTracing and looking beyond to OpenTelemetry

Pavol Loffay Senior Software Engineer

OPTIONAL SECTION MARKER OR TITLE

slide-2
SLIDE 2

2

  • Introduction to distributed tracing
  • MicroProfile-OpenTracing
  • Demo tracing in Quarkus with Jaeger
  • OpenTelemetry

Agenda

slide-3
SLIDE 3

3

  • Software Engineer at Red Hat
  • Distributed tracing: Jaeger, OpenTracing,

OpenTelemetry

  • MicroProfile-OpenTracing

Pavol Loffay

slide-4
SLIDE 4

Why tracing?

4

slide-5
SLIDE 5

5

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

slide-6
SLIDE 6

CORPORATE SLIDE TEMPLATES

6

slide-7
SLIDE 7

7

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

slide-8
SLIDE 8

8

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

slide-9
SLIDE 9

9

Monitoring tools must tell stories

Metrics and logs have no context or describe only

  • ne instance.

Distributed tracing tells story about the whole the transaction.

slide-10
SLIDE 10

Distributed Tracing

10

slide-11
SLIDE 11

11

Distributed Tracing concepts

A B C D E

{context} {context} {context} {context} TraceID → {context}

A B E C D time TRACE SPANS

slide-12
SLIDE 12

12

Distributed Tracing concepts

In-process context propagation

slide-13
SLIDE 13

MicroProfile-OpenTracing

13

slide-14
SLIDE 14

14

  • Tracing API
  • Vendor neutral
  • No data/wire format
  • Uses OpenTracing

semantics and API

  • Defines additional API

MicroProfile-OpenTracing

slide-15
SLIDE 15

15

  • JAX-RS
  • MicroProfile Rest

Client

@Path("/") public class Handler { @GET @Path("/hello") public Response hello() { Response response = client .target("http://localhost:8090/api") .request() .get(); String entity = response.readEntity(String.class); response.close(); return Response.ok(entity).build(); } }

MicroProfile-OpenTracing

Auto instrumentation

slide-16
SLIDE 16

16

  • @Traced
  • @Inject

io.opentracing.Tracer

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

MicroProfile-OpenTracing

Explicit instrumentation

slide-17
SLIDE 17

17

  • MP Config
  • mp.opentracing.server.operation-name-provider

○ GET:foo.bar.UserHandler.getUser ○ /user/{id}

  • mp.opentracing.server.skip-pattern

○ /health|/foo/bar*

MicroProfile-OpenTracing

Configuration

slide-18
SLIDE 18

18

Demo

Quarkus application

https://github.com/pavolloffay/quarkus-tracing

slide-19
SLIDE 19

19

  • Operation names for MP Rest Client
  • More annotations
  • Automatically trace CDI
  • MicroProfile-Reactive Messaging
  • MicroProfile-Fault tolerance

MicroProfile-OpenTracing

Roadmap

slide-20
SLIDE 20

OpenTelemetry

20

slide-21
SLIDE 21

21

  • “The next major version of OpenTracing

and OpenCensus”

  • CNCF (Google, Microsoft, LightStep,

Dynatrace, DataDog…)

OpenTelemetry

slide-22
SLIDE 22

22

  • 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

OpenTelemetry

slide-23
SLIDE 23

23

slide-24
SLIDE 24

24

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

OpenTelemetry in MP

slide-25
SLIDE 25

25

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

slide-26
SLIDE 26

linkedin.com/company/red-hat youtube.com/user/RedHatVideos facebook.com/redhatinc twitter.com/RedHat

26

Red Hat is the world’s leading provider of enterprise

  • pen source software solutions. Award-winning support,

training, and consulting services make Red Hat a trusted adviser to the Fortune 500.

Thank you

OPTIONAL SECTION MARKER OR TITLE