2019-10-08 api world · 2019-10-28 · apis: context, metrics, and tracing (logs in the future)...

36
Introducing Yuri Shkuro SOFTWARE ENGINEER @ UBER

Upload: others

Post on 11-Aug-2020

1 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: 2019-10-08 API World · 2019-10-28 · APIs: Context, Metrics, and Tracing (Logs in the future) “Batteries included” - default SDKs Pluggable Exporters, Samplers, etc. Default

Introducing

Yuri ShkuroSOFTWARE ENGINEER @ UBER

Page 2: 2019-10-08 API World · 2019-10-28 · APIs: Context, Metrics, and Tracing (Logs in the future) “Batteries included” - default SDKs Pluggable Exporters, Samplers, etc. Default

Agenda

Observability

OpenTelemetry

History

Design

Community

Q & A

Page 3: 2019-10-08 API World · 2019-10-28 · APIs: Context, Metrics, and Tracing (Logs in the future) “Batteries included” - default SDKs Pluggable Exporters, Samplers, etc. Default

Yuri Shkuro

Software EngineerUber Technologies

shkuro.com

Founder & Maintainerof CNCF Jaeger

jaegertracing.io

Co-founder of OpenTracing & OpenTelemetry

Author of "Mastering Distributed Tracing",by Packt Publishing

Page 4: 2019-10-08 API World · 2019-10-28 · APIs: Context, Metrics, and Tracing (Logs in the future) “Batteries included” - default SDKs Pluggable Exporters, Samplers, etc. Default

Observabilityin distributed systems

and microservices

Part I

Page 5: 2019-10-08 API World · 2019-10-28 · APIs: Context, Metrics, and Tracing (Logs in the future) “Batteries included” - default SDKs Pluggable Exporters, Samplers, etc. Default

Scaling up does not scale

Scaling out - what does that mean?

Modern Systems

Page 6: 2019-10-08 API World · 2019-10-28 · APIs: Context, Metrics, and Tracing (Logs in the future) “Batteries included” - default SDKs Pluggable Exporters, Samplers, etc. Default

Scaling Wide

Page 7: 2019-10-08 API World · 2019-10-28 · APIs: Context, Metrics, and Tracing (Logs in the future) “Batteries included” - default SDKs Pluggable Exporters, Samplers, etc. Default

Scaling Deep

Page 8: 2019-10-08 API World · 2019-10-28 · APIs: Context, Metrics, and Tracing (Logs in the future) “Batteries included” - default SDKs Pluggable Exporters, Samplers, etc. Default

Microservices at scale are not just wide systems,

they are deep systems

Page 9: 2019-10-08 API World · 2019-10-28 · APIs: Context, Metrics, and Tracing (Logs in the future) “Batteries included” - default SDKs Pluggable Exporters, Samplers, etc. Default
Page 10: 2019-10-08 API World · 2019-10-28 · APIs: Context, Metrics, and Tracing (Logs in the future) “Batteries included” - default SDKs Pluggable Exporters, Samplers, etc. Default

Real production requestTouches 32 microservices, over 100 RPCs, 14 levels of depth

Page 11: 2019-10-08 API World · 2019-10-28 · APIs: Context, Metrics, and Tracing (Logs in the future) “Batteries included” - default SDKs Pluggable Exporters, Samplers, etc. Default

In deep distributed systems, finding what is broken and where

is often more difficult than why

Page 12: 2019-10-08 API World · 2019-10-28 · APIs: Context, Metrics, and Tracing (Logs in the future) “Batteries included” - default SDKs Pluggable Exporters, Samplers, etc. Default

Managing/Operating Deep Systems

To maintain a service’s SLOs (“service level objectives”: latency, errors, etc.),

we must control the entire triangle

In microservices you often have responsibility without control

Page 13: 2019-10-08 API World · 2019-10-28 · APIs: Context, Metrics, and Tracing (Logs in the future) “Batteries included” - default SDKs Pluggable Exporters, Samplers, etc. Default

Controllability is the dual ofObservability

Control Theory

Page 14: 2019-10-08 API World · 2019-10-28 · APIs: Context, Metrics, and Tracing (Logs in the future) “Batteries included” - default SDKs Pluggable Exporters, Samplers, etc. Default

So Called “Three Pillars” of Observability

Metrics Logs Traces

Page 15: 2019-10-08 API World · 2019-10-28 · APIs: Context, Metrics, and Tracing (Logs in the future) “Batteries included” - default SDKs Pluggable Exporters, Samplers, etc. Default

Metrics and Logs Alone Are Not Enough

Cognitive load ≈ O(depth2)

Metrics

Logs

Page 16: 2019-10-08 API World · 2019-10-28 · APIs: Context, Metrics, and Tracing (Logs in the future) “Batteries included” - default SDKs Pluggable Exporters, Samplers, etc. Default

Distributed Tracing Provides Context

Metrics

Logs

Traces

Page 17: 2019-10-08 API World · 2019-10-28 · APIs: Context, Metrics, and Tracing (Logs in the future) “Batteries included” - default SDKs Pluggable Exporters, Samplers, etc. Default

With Context From Traces

Cognitive load ≈ O(depth)

Metrics

Logs

Traces

Page 18: 2019-10-08 API World · 2019-10-28 · APIs: Context, Metrics, and Tracing (Logs in the future) “Batteries included” - default SDKs Pluggable Exporters, Samplers, etc. Default

Controllability requires Observability

Traces are the contextual glue for the other signals

Observability requires high quality Telemetry

Page 19: 2019-10-08 API World · 2019-10-28 · APIs: Context, Metrics, and Tracing (Logs in the future) “Batteries included” - default SDKs Pluggable Exporters, Samplers, etc. Default

Part IIhttps://opentelemetry.io/

Page 20: 2019-10-08 API World · 2019-10-28 · APIs: Context, Metrics, and Tracing (Logs in the future) “Batteries included” - default SDKs Pluggable Exporters, Samplers, etc. Default

Our Software Is Highly ComposableOften from Open Source Components

Microservice

Queue DriverDB Driver

DB Queue

Server Framework RPC Framework

Threads

Page 21: 2019-10-08 API World · 2019-10-28 · APIs: Context, Metrics, and Tracing (Logs in the future) “Batteries included” - default SDKs Pluggable Exporters, Samplers, etc. Default

Telemetry must become a built-in feature of

cloud-native software

Page 22: 2019-10-08 API World · 2019-10-28 · APIs: Context, Metrics, and Tracing (Logs in the future) “Batteries included” - default SDKs Pluggable Exporters, Samplers, etc. Default

This Is Not the First Time

OpenCensus

Page 23: 2019-10-08 API World · 2019-10-28 · APIs: Context, Metrics, and Tracing (Logs in the future) “Batteries included” - default SDKs Pluggable Exporters, Samplers, etc. Default

OpenTracingFirst attempt at standardization

Tracing only

Pure API, user must mount an implementation

Coupled with context propagation

180+ integrations with OSS libraries

Page 24: 2019-10-08 API World · 2019-10-28 · APIs: Context, Metrics, and Tracing (Logs in the future) “Batteries included” - default SDKs Pluggable Exporters, Samplers, etc. Default

OpenTracing Design

User application process

Application (automatically instrumented)Application

Application (manually instrumented) Automatic

instrumentationManually instrumented

frameworks

Instrumentation API

Tracing library implementation

Tracing backend - Visualization frontend

Agent Collector

API

opentracing contrib

Page 25: 2019-10-08 API World · 2019-10-28 · APIs: Context, Metrics, and Tracing (Logs in the future) “Batteries included” - default SDKs Pluggable Exporters, Samplers, etc. Default

OpenCensusSimilar, but not the same

Metrics and Tracing

“Batteries included” - default SDK

Pluggable Exporters

API not cleanly separated

Agent and Collector

OpenCensus

Page 26: 2019-10-08 API World · 2019-10-28 · APIs: Context, Metrics, and Tracing (Logs in the future) “Batteries included” - default SDKs Pluggable Exporters, Samplers, etc. Default

The next major version of bothOpenTracing and OpenCensus

OpenCensus

+ =

OpenTelemetry

Page 27: 2019-10-08 API World · 2019-10-28 · APIs: Context, Metrics, and Tracing (Logs in the future) “Batteries included” - default SDKs Pluggable Exporters, Samplers, etc. Default

OpenTelemetryA complete system

APIs: Context, Metrics, and Tracing (Logs in the future)

“Batteries included” - default SDKs

Pluggable Exporters, Samplers, etc.

Default data formats

Agent and Collector

Backwards compatible with OpenTracing and OpenCensus via default bridge

Page 28: 2019-10-08 API World · 2019-10-28 · APIs: Context, Metrics, and Tracing (Logs in the future) “Batteries included” - default SDKs Pluggable Exporters, Samplers, etc. Default

OpenTelemetry DesignUser application process

Application (automatically instrumented)Application

Application (manually instrumented) Automatic

instrumentationManually instrumented

frameworks

Instrumentation API

Minimum implementation or full SDK

Monitoring backend

Agent Collector

API

SDK

Agent & Collector

contrib

Page 29: 2019-10-08 API World · 2019-10-28 · APIs: Context, Metrics, and Tracing (Logs in the future) “Batteries included” - default SDKs Pluggable Exporters, Samplers, etc. Default

OpenTelemetry DesignBuilt on top of context propagation

Page 30: 2019-10-08 API World · 2019-10-28 · APIs: Context, Metrics, and Tracing (Logs in the future) “Batteries included” - default SDKs Pluggable Exporters, Samplers, etc. Default

Types of Context

Correlationsfor observability signals (labels)

Baggagefor application context

Custom context

Page 31: 2019-10-08 API World · 2019-10-28 · APIs: Context, Metrics, and Tracing (Logs in the future) “Batteries included” - default SDKs Pluggable Exporters, Samplers, etc. Default

OpenTelemetry Design - Layers

Agent & Collector

Application code / Instrumentation

Metrics API Tracing API

Baggage API Correlations API

Context

Inter-process Context Propagation

Plugins: TracingCorrelationsBaggage Custom

Page 32: 2019-10-08 API World · 2019-10-28 · APIs: Context, Metrics, and Tracing (Logs in the future) “Batteries included” - default SDKs Pluggable Exporters, Samplers, etc. Default

OpenTelemetry Community

Governing Committee(5 people, 4+ seats election in October)

Technical Committee

Language SIGs

Auto-instrumentation SIGs

Agent/Collector SIGSpecification SIG

https://github.com/open-telemetry/community

Page 33: 2019-10-08 API World · 2019-10-28 · APIs: Context, Metrics, and Tracing (Logs in the future) “Batteries included” - default SDKs Pluggable Exporters, Samplers, etc. Default

Project Status - October

Mid-October

Specification v0.2-alpha

November

Specification Beta

SDKs BetaCollector, Exporters

SDKs v0.2-alphaC#, Go, Java, Javascript, Python

https://opentelemetry.io/project-status/

Page 34: 2019-10-08 API World · 2019-10-28 · APIs: Context, Metrics, and Tracing (Logs in the future) “Batteries included” - default SDKs Pluggable Exporters, Samplers, etc. Default

Future WorkYou can help!

Automatic instrumentation

(zero touch)

Expandlanguage coverage

(Erland, C++, Ruby, …)

Integrate with otherOSS projects

(K8s, Envoy, etc.)

Page 35: 2019-10-08 API World · 2019-10-28 · APIs: Context, Metrics, and Tracing (Logs in the future) “Batteries included” - default SDKs Pluggable Exporters, Samplers, etc. Default

How To Get Involved

Code: https://github.com/open-telemetryChat: https://gitter.im/open-telemetry/community

Join a Special Interest

Group (SIG)

Provide Feedback,and OTEPs

Integrate with yourOSS project

Page 36: 2019-10-08 API World · 2019-10-28 · APIs: Context, Metrics, and Tracing (Logs in the future) “Batteries included” - default SDKs Pluggable Exporters, Samplers, etc. Default

Q&A

Thank YouFind me @ https://shkuro.comhttps://opentelemetry.io/