1 of 85

Observability in Production

with

OpenTelemetry

presented by Ron Nathaniel

Apache 2.0 Licensed

2 of 85

Quick Intro

Name: Ron

Pronounced like: � Rhône

Saône

3 of 85

I love Python

github.com/ronnathaniel

4 of 85

Solutions Architect

Emerging Tech

& Incubation

5 of 85

OpenTelemetry

(Open Source CNCF Project)

6 of 85

Our Agenda

7 of 85

Our Agenda

What is Observability?

8 of 85

Our Agenda

What is OpenTelemetry?

Observability vs OpenTelemetry?

9 of 85

Our Agenda

How can we add OpenTelemetry

to your applications today?

10 of 85

Our Agenda

Where does all this data go?

11 of 85

Observability Basics

12 of 85

What is Observability?

13 of 85

Observability

is a measure of how well

internal states of a system�can be inferred from knowledge

of its external outputs

14 of 85

Observability

is a measure of how well

internal states of a system�can be inferred from knowledge

of its external outputs

15 of 85

Observability

is a measure of how well

internal states of a system�can be inferred from knowledge

of its external outputs

16 of 85

17 of 85

18 of 85

Can we observe applications?

19 of 85

Can we observe applications?

…What is an application?

20 of 85

Monoliths?

21 of 85

Monoliths?

22 of 85

Monoliths?

23 of 85

Monoliths?

24 of 85

Monoliths?

25 of 85

Microservices on the Cloud

26 of 85

27 of 85

Challenges

A

28 of 85

Challenges

Observe

B

29 of 85

Challenges

Troubleshoot

C

30 of 85

Challenges

Optimize

D

31 of 85

Telemetry Data

32 of 85

What is Telemetry Data?

33 of 85

Three Pillars of Observability

Metrics

Logs

Traces

34 of 85

Three Pillars of Observability

Metrics

(What?)

Logs

Traces

35 of 85

Three Pillars of Observability

Metrics

(What?)

Logs

(Why?)

Traces

36 of 85

Three Pillars of Observability

Metrics

(What?)

Logs

(Why?)

Traces

(Where?)

37 of 85

MeLT

38 of 85

39 of 85

Trace = Family

40 of 85

Trace = Family

Span = Person in

the Family

41 of 85

Let’s implement Observability

42 of 85

Let’s implement Observability

An Instrumentation framework.

43 of 85

Let’s implement Observability

An Instrumentation framework.

And a place to send the data.

44 of 85

Let’s implement Observability

An Instrumentation framework.

And a place to send the data.

And a way to visualize it.

45 of 85

Introducing…

46 of 85

OpenTelemetry

47 of 85

OpenTelemetry

A collection of tools, APIs, and SDKs.

Used to instrument, generate, collect, and export telemetry data.

48 of 85

OpenTelemetry

A collection of tools, APIs, and SDKs.

Used to instrument, generate, collect, and export telemetry data.

49 of 85

OpenTelemetry

A collection of tools, APIs, and SDKs.

Used to instrument, generate, collect, and export telemetry data.

50 of 85

Architecture

Source: grafana blog

*

51 of 85

Language SDKs

Two Methods

52 of 85

Language SDKs

Core Repo

(API and SDK)

Two Methods

53 of 85

Language SDKs

Contrib Repo

(automatic instrumentations)

Core Repo

(API and SDK)

Two Methods

54 of 85

Automatic

Instrumentation

55 of 85

Otel Collector Components

*

56 of 85

Do We Need a Collector?

57 of 85

OpenTelemetry is

just the Client?

58 of 85

OpenTelemetry is

just the Client?

Yes. For now…

59 of 85

Where can you send your Telemetry Data?

60 of 85

Vendor-Neutral Backends

61 of 85

Vendor-Neutral Backends�(Open Source)

62 of 85

Vendor-Neutral Backends�(Open Source)

TeleTrace

63 of 85

Vendor-Neutral Backends�(Open Source)

Jaeger

64 of 85

Vendor-Neutral Backends�(Open Source)

Zipkin

65 of 85

Vendor-Neutral Backends�(Open Source)

Prometheus

66 of 85

Vendor-Neutral Backends�(Open Source)

stdout / stderr streaming

67 of 85

What are we

looking at?

{

"name": "root",

"context": {

"trace_id": "0x7b21...”,

"span_id": "0x3784e...",

"trace_state": "[]"

},

"parent_id": null,

"start_time": "2022-07-11T20:37:37.498779Z",

"end_time": "2022-07-11T20:37:37.498849Z",

"status": {

"status_code": "UNSET"

},

"resource": {

"telemetry.sdk.name": "opentelemetry",

"telemetry.sdk.version": "1.11.1",

"service.name": "unknown_service"

}

}

68 of 85

Auto Instrument Flask

Hint: Google “OpenTelemetry Flask Instrumentation Python”

Answer: Use FlaskInstrumentor()

69 of 85

What are we

looking at?

{

"name": "/",

"context": {

"trace_id": "0xf06...",

"span_id": "0x2b3e...",

"trace_state": "[]"

},

"kind": "SpanKind.SERVER",

"parent_id": "0x334b5632f9967f45",

"start_time": "2022-07-04T09:51:33.578142Z",

"end_time": "2022-07-04T09:51:33.581726Z",

"status": {

"status_code": "UNSET"

},

"attributes": {

"http.method": "GET",

"http.server_name": "127.0.0.1",

"http.scheme": "http",

"net.host.port": 5000,

"http.host": "<app-name>.glitch.me",

"http.target": "/",

}

}

70 of 85

How automatic is automatic?

71 of 85

< 5 lines of code

72 of 85

< 5 lines of code

Sounds easy…

73 of 85

Too Difficult!

74 of 85

Why is in-code instrumentation too difficult?

Too many Applications (1000s).

75 of 85

Why is in-code instrumentation too difficult?

Might want to remove instrumentation in the future.

76 of 85

Why is in-code instrumentation too difficult?

Engineering doesn’t have the resources.

77 of 85

The Contributors of Otel Listened

78 of 85

No-Code

Automatic Instrumentation

79 of 85

No-Code

Automatic Instrumentation

Command Line

80 of 85

No-Code

Automatic Instrumentation

Kubernetes

81 of 85

No-Code

Automatic Instrumentation

Serverless Functions

82 of 85

No-Code

Automatic Instrumentation

And more every day…

83 of 85

Huge Community

Documentation

GitHub

Slack

SIG meetings

Joining the community

84 of 85

LICENSE

Copyright 2019, The OpenTelemetry Authors

Licensed under the Apache License, Version 2.0 (the "License");

you may not use this file except in compliance with the License.

You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software

distributed under the License is distributed on an "AS IS" BASIS,

WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.

See the License for the specific language governing permissions and

limitations under the License.

85 of 85

Thank you very much.