SlideShare a Scribd company logo
Introduction to Open Telemetry
-Your Universal Telemetry Library-
Tonny Adhi Sabastian
(tonny.sabastian@gojek.com)
Open Infrastructure Day Asia - September 11th, 2021
About Me
● Currently : Senior DevOps Engineer at MAPAN (GoTo Group) - https://www.mapan.id (2018 - Now)
○ We’re hiring, please visit https://www.career.mapan.id/
○ Send your CV to mapan-recruitment@gojek.com
○ Interest in our DevOps engineering ? PM me via mail
● Former Lead Engineer for University of Indonesia - Data Center (2012 - 2018) - https://ui.ac.id
● Former Lecturer at Faculty of Computer Science , University of Indonesia (2014 - 2018)
○ Teaching Subject : Distributed System , System Programming, Modern IT Infrastructure
○ Research Subject : IoT , Deep Packet Inspection, Aeronautical Telecommunication Network, Linux System Performance
● Co-founding two startup during 2012 - 2018 , (Rumio - AR Platform & Peentar - IoT Platform) - now defunct
● Former volunteer system administrator for kambing.ui.ac.id - one of Indonesia largest F/OSS repository ; now defunct (2009 -
2018)
● Contact : tonny.sabastian@gojek.com / tonny@segmentationfault.xyz
Agenda
● Observability 101
● Meet OpenTelemetry
● Instrumenting with OpenTelemetry - Tracing with Go
Example -
● OpenTelemetry @ MAPAN
Observability 101
The Observability Triad
Do you know what your codes are doing on 2AM when your payment service is down ?
Monitoring
Tracing
Logging
Metrics - It’s About The Number
● Each metric reports a number
● The monitoring system tracks
those numbers over time
● Identify anomalous behavior and
wake someone up
● Recognizes trends for your
infrastructure scaling
● Four Golden Signals - ( Latency -
Traffic - Saturation - Errors )
Tracing - Finding Your Bottleneck
● Uniquely identify Requests and
Spans
● Spans carry contextual metadata
● Runtime reports start/end
timestamps for each span
● Span Aggregator find out how
long everything took
Logging - How to debug your production at 2AM
● Convey appropriate urgency
● Provide enough information
● Not overwhelming
● Structured for searching not reading
Meet OpenTelemetry
OpenTelemetry
● OpenCensus + OpenTracing =
OpenTelemetry
● Provides a unified set of open
standards API, SDK, and middleware
for generating and exporting Trace ,
Metrics, (and logging - incoming)
● Enabling quick bootstrap of
observability into your system
● Contributor from various major
vendor and wide community support
source : https://opentelemetry.io
OpenTelemetry Architecture (1)
● API : Used to generate telemetry data
● SDK : Implementation of API in various
languages
○ Tracer : responsible for creating and
tracking span - distributed tracing
○ Meter : responsible for creating and
tracking metrics
● OpenTelemetry Proto : protobuf
implementation on semantic convention
and OpenTelemetry Protocol (OTLP)
source :
https://blog.newrelic.com/product-news/what-is-opentelemetry/
OpenTelemetry Architecture (2)
● Collector : middleware service on receiving,
processing, and exporting telemetry data to
various telemetry backend (ex : jaeger,
prometheus, datadog, etc). It’s acting as
telemetry pipeline
● Collector composed of following components :
○ receivers : receive telemetry data
○ processors : telemetry data
additional processing
○ exporters : send telemetry data to
final backend
● Collector can be deployed as Agent or Gateway
source :
https://blog.newrelic.com/product-news/what-is-opentelemetry/
Instrumenting with OpenTelemetry
Tracing API Concepts
● TracerProvider is the entry point of the API. It’s providing access to
Tracers
○ TracerProvider register global configuration of exporter, tracing
attributes and sampler
● Tracer is the class responsible for creating Spans
● Spans is the API to trace an operation within your code
Tracing SDK Concepts
● Sampler , controls the number of traces capture and send to backend
○ Sampling Decision Values [ DROP | RECORD_ONLY |
RECORD_AND_SAMPLE ]
○ SDK Built In Samplers [ AlwaysOn | AlwaysOff |
TraceIDRatioBased ]
● SpanProcessor , hook for span start and stop invocation
○ SDK Built In Processor [ ExportFormatConverter | Batcher ]
○ Only invoked when isRecording is true
● SpanExporter, defines interfaces for specific backend exporters (ex :
Jaeger, OTLP, Lighstep, Datadog)
Go Instrumentation - Set Dependencies
OpenTelemetry Go Dependencies
Go Instrumentation - Create Tracer
● Set SpanExporter using OpenTelemetry
Protocol via otlpgrpc
● Set initial SpanAttributes, such as your
ServiceName
● Deploy TracerProvider with our established
SpanExporter, Sampler and initial
SpanAttributes
Go Instrumentation - Adding Span
● Create a Tracer and bind it to a
TracerProvider
● Bind the Tracer to a Span
● Set additional SpanAttributes. Perhaps you
want to trace your http request
● Track an event on your function. Add a
SpanEvent to our Span
Go Instrumentation - Trace from your HTTP Router
● Create http handler function with http
request path as its span context
● Bind this function with your http router
Go Instrumentation - Spawn your Tracer
● Create a context and bind it to your Tracer
● Bind your http handler function to your http
router. This will create your root span
Go Instrumentation - Span Result on Jaeger
Go Instrumentation - OpenTelemetry @ MAPAN
● Wrap OpenTelemetry into our Observability
Library
● Wrap our Observability Library into our HTTP
Server Library
● Simple Observability Bootstraping via server
start options
Demo
Instrumentation Demo
● Demo Repository in Golang https://github.com/tonnyadhi/distributed-tracing-example
● Contains two services
○ Weather Service, fetch weather report from backend and print it in JSON
○ OWM Service, fetch weather report from OpenWeathermap, simplify it and
Sent it to Weather Service
● Distributed Tracing is set between two services using OpenTelemetry HTTP Traces
● Span are sent to OpenTelemetry Collector. The collector will export the span to Jaeger
and Sentry
Thank You

More Related Content

What's hot

Exploring the power of OpenTelemetry on Kubernetes
Exploring the power of OpenTelemetry on KubernetesExploring the power of OpenTelemetry on Kubernetes
Exploring the power of OpenTelemetry on Kubernetes
Red Hat Developers
 
Everything You wanted to Know About Distributed Tracing
Everything You wanted to Know About Distributed TracingEverything You wanted to Know About Distributed Tracing
Everything You wanted to Know About Distributed Tracing
Amuhinda Hungai
 
OpenTelemetry For Operators
OpenTelemetry For OperatorsOpenTelemetry For Operators
OpenTelemetry For Operators
Kevin Brockhoff
 
OpenTelemetry: From front- to backend (2022)
OpenTelemetry: From front- to backend (2022)OpenTelemetry: From front- to backend (2022)
OpenTelemetry: From front- to backend (2022)
Sebastian Poxhofer
 
Intro to open source observability with grafana, prometheus, loki, and tempo(...
Intro to open source observability with grafana, prometheus, loki, and tempo(...Intro to open source observability with grafana, prometheus, loki, and tempo(...
Intro to open source observability with grafana, prometheus, loki, and tempo(...
LibbySchulze
 
Observability in Java: Getting Started with OpenTelemetry
Observability in Java: Getting Started with OpenTelemetryObservability in Java: Getting Started with OpenTelemetry
Observability in Java: Getting Started with OpenTelemetry
DevOps.com
 
Adopting OpenTelemetry
Adopting OpenTelemetryAdopting OpenTelemetry
Adopting OpenTelemetry
Vincent Behar
 
Grafana Loki: like Prometheus, but for Logs
Grafana Loki: like Prometheus, but for LogsGrafana Loki: like Prometheus, but for Logs
Grafana Loki: like Prometheus, but for Logs
Marco Pracucci
 
OpenTelemetry Introduction
OpenTelemetry Introduction OpenTelemetry Introduction
OpenTelemetry Introduction
DimitrisFinas1
 
OSMC 2022 | The Power of Metrics, Logs & Traces with Open Source by Emil-Andr...
OSMC 2022 | The Power of Metrics, Logs & Traces with Open Source by Emil-Andr...OSMC 2022 | The Power of Metrics, Logs & Traces with Open Source by Emil-Andr...
OSMC 2022 | The Power of Metrics, Logs & Traces with Open Source by Emil-Andr...
NETWAYS
 
Application Performance Monitoring with OpenTelemetry
Application Performance Monitoring with OpenTelemetryApplication Performance Monitoring with OpenTelemetry
Application Performance Monitoring with OpenTelemetry
Jan Mikeš
 
Juraci Paixão Kröhling - All you need to know about OpenTelemetry
Juraci Paixão Kröhling - All you need to know about OpenTelemetryJuraci Paixão Kröhling - All you need to know about OpenTelemetry
Juraci Paixão Kröhling - All you need to know about OpenTelemetry
Juliano Costa
 
Monitoring using Prometheus and Grafana
Monitoring using Prometheus and GrafanaMonitoring using Prometheus and Grafana
Monitoring using Prometheus and Grafana
Arvind Kumar G.S
 
Monitoring Kubernetes with Prometheus
Monitoring Kubernetes with PrometheusMonitoring Kubernetes with Prometheus
Monitoring Kubernetes with Prometheus
Grafana Labs
 
Prometheus 101
Prometheus 101Prometheus 101
Prometheus 101
Paul Podolny
 
Kubernetes Observability with Prometheus by Example
Kubernetes Observability with Prometheus by ExampleKubernetes Observability with Prometheus by Example
Kubernetes Observability with Prometheus by Example
Thomas Riley
 
Distributed tracing 101
Distributed tracing 101Distributed tracing 101
Distributed tracing 101
Itiel Shwartz
 
Prometheus - basics
Prometheus - basicsPrometheus - basics
Prometheus - basics
Juraj Hantak
 
Prometheus design and philosophy
Prometheus design and philosophy   Prometheus design and philosophy
Prometheus design and philosophy
Docker, Inc.
 
Understand your system like never before with OpenTelemetry, Grafana, and Pro...
Understand your system like never before with OpenTelemetry, Grafana, and Pro...Understand your system like never before with OpenTelemetry, Grafana, and Pro...
Understand your system like never before with OpenTelemetry, Grafana, and Pro...
LibbySchulze
 

What's hot (20)

Exploring the power of OpenTelemetry on Kubernetes
Exploring the power of OpenTelemetry on KubernetesExploring the power of OpenTelemetry on Kubernetes
Exploring the power of OpenTelemetry on Kubernetes
 
Everything You wanted to Know About Distributed Tracing
Everything You wanted to Know About Distributed TracingEverything You wanted to Know About Distributed Tracing
Everything You wanted to Know About Distributed Tracing
 
OpenTelemetry For Operators
OpenTelemetry For OperatorsOpenTelemetry For Operators
OpenTelemetry For Operators
 
OpenTelemetry: From front- to backend (2022)
OpenTelemetry: From front- to backend (2022)OpenTelemetry: From front- to backend (2022)
OpenTelemetry: From front- to backend (2022)
 
Intro to open source observability with grafana, prometheus, loki, and tempo(...
Intro to open source observability with grafana, prometheus, loki, and tempo(...Intro to open source observability with grafana, prometheus, loki, and tempo(...
Intro to open source observability with grafana, prometheus, loki, and tempo(...
 
Observability in Java: Getting Started with OpenTelemetry
Observability in Java: Getting Started with OpenTelemetryObservability in Java: Getting Started with OpenTelemetry
Observability in Java: Getting Started with OpenTelemetry
 
Adopting OpenTelemetry
Adopting OpenTelemetryAdopting OpenTelemetry
Adopting OpenTelemetry
 
Grafana Loki: like Prometheus, but for Logs
Grafana Loki: like Prometheus, but for LogsGrafana Loki: like Prometheus, but for Logs
Grafana Loki: like Prometheus, but for Logs
 
OpenTelemetry Introduction
OpenTelemetry Introduction OpenTelemetry Introduction
OpenTelemetry Introduction
 
OSMC 2022 | The Power of Metrics, Logs & Traces with Open Source by Emil-Andr...
OSMC 2022 | The Power of Metrics, Logs & Traces with Open Source by Emil-Andr...OSMC 2022 | The Power of Metrics, Logs & Traces with Open Source by Emil-Andr...
OSMC 2022 | The Power of Metrics, Logs & Traces with Open Source by Emil-Andr...
 
Application Performance Monitoring with OpenTelemetry
Application Performance Monitoring with OpenTelemetryApplication Performance Monitoring with OpenTelemetry
Application Performance Monitoring with OpenTelemetry
 
Juraci Paixão Kröhling - All you need to know about OpenTelemetry
Juraci Paixão Kröhling - All you need to know about OpenTelemetryJuraci Paixão Kröhling - All you need to know about OpenTelemetry
Juraci Paixão Kröhling - All you need to know about OpenTelemetry
 
Monitoring using Prometheus and Grafana
Monitoring using Prometheus and GrafanaMonitoring using Prometheus and Grafana
Monitoring using Prometheus and Grafana
 
Monitoring Kubernetes with Prometheus
Monitoring Kubernetes with PrometheusMonitoring Kubernetes with Prometheus
Monitoring Kubernetes with Prometheus
 
Prometheus 101
Prometheus 101Prometheus 101
Prometheus 101
 
Kubernetes Observability with Prometheus by Example
Kubernetes Observability with Prometheus by ExampleKubernetes Observability with Prometheus by Example
Kubernetes Observability with Prometheus by Example
 
Distributed tracing 101
Distributed tracing 101Distributed tracing 101
Distributed tracing 101
 
Prometheus - basics
Prometheus - basicsPrometheus - basics
Prometheus - basics
 
Prometheus design and philosophy
Prometheus design and philosophy   Prometheus design and philosophy
Prometheus design and philosophy
 
Understand your system like never before with OpenTelemetry, Grafana, and Pro...
Understand your system like never before with OpenTelemetry, Grafana, and Pro...Understand your system like never before with OpenTelemetry, Grafana, and Pro...
Understand your system like never before with OpenTelemetry, Grafana, and Pro...
 

Similar to Introduction to Open Telemetry as Observability Library

OpenTelemetry 101 FTW
OpenTelemetry 101 FTWOpenTelemetry 101 FTW
OpenTelemetry 101 FTW
NGINX, Inc.
 
2307 - DevBCN - Otel 101_compressed.pdf
2307 - DevBCN - Otel 101_compressed.pdf2307 - DevBCN - Otel 101_compressed.pdf
2307 - DevBCN - Otel 101_compressed.pdf
DimitrisFinas1
 
Netflix Open Source: Building a Distributed and Automated Open Source Program
Netflix Open Source:  Building a Distributed and Automated Open Source ProgramNetflix Open Source:  Building a Distributed and Automated Open Source Program
Netflix Open Source: Building a Distributed and Automated Open Source Program
aspyker
 
Building a Distributed & Automated Open Source Program at Netflix
Building a Distributed & Automated Open Source Program at NetflixBuilding a Distributed & Automated Open Source Program at Netflix
Building a Distributed & Automated Open Source Program at Netflix
All Things Open
 
Monitoring in Big Data Platform - Albert Lewandowski, GetInData
Monitoring in Big Data Platform - Albert Lewandowski, GetInDataMonitoring in Big Data Platform - Albert Lewandowski, GetInData
Monitoring in Big Data Platform - Albert Lewandowski, GetInData
GetInData
 
Tracing-for-fun-and-profit.pptx
Tracing-for-fun-and-profit.pptxTracing-for-fun-and-profit.pptx
Tracing-for-fun-and-profit.pptx
Hai Nguyen Duy
 
Tracing 2000+ polyglot microservices at Uber with Jaeger and OpenTracing
Tracing 2000+ polyglot microservices at Uber with Jaeger and OpenTracingTracing 2000+ polyglot microservices at Uber with Jaeger and OpenTracing
Tracing 2000+ polyglot microservices at Uber with Jaeger and OpenTracing
Yuri Shkuro
 
EO Application Packages - hands-on
EO Application Packages - hands-onEO Application Packages - hands-on
EO Application Packages - hands-on
terradue
 
Getting Started Monitoring with Prometheus and Grafana
Getting Started Monitoring with Prometheus and GrafanaGetting Started Monitoring with Prometheus and Grafana
Getting Started Monitoring with Prometheus and Grafana
Syah Dwi Prihatmoko
 
Devoxx 2015 - Building the Internet of Things with Eclipse IoT
Devoxx 2015 - Building the Internet of Things with Eclipse IoTDevoxx 2015 - Building the Internet of Things with Eclipse IoT
Devoxx 2015 - Building the Internet of Things with Eclipse IoT
Benjamin Cabé
 
Implementing Observability for Kubernetes.pdf
Implementing Observability for Kubernetes.pdfImplementing Observability for Kubernetes.pdf
Implementing Observability for Kubernetes.pdf
Jose Manuel Ortega Candel
 
Ridwan Fadjar Septian PyCon ID 2021 Regular Talk - django application monitor...
Ridwan Fadjar Septian PyCon ID 2021 Regular Talk - django application monitor...Ridwan Fadjar Septian PyCon ID 2021 Regular Talk - django application monitor...
Ridwan Fadjar Septian PyCon ID 2021 Regular Talk - django application monitor...
Ridwan Fadjar
 
Docker at and with SignalFx
Docker at and with SignalFxDocker at and with SignalFx
Docker at and with SignalFx
SignalFx
 
Docker {at,with} SignalFx
Docker {at,with} SignalFxDocker {at,with} SignalFx
Docker {at,with} SignalFx
Maxime Petazzoni
 
Sumologic <3 Open Source
Sumologic <3 Open SourceSumologic <3 Open Source
Sumologic <3 Open Source
NGINX, Inc.
 
IoT: From Arduino Microcontrollers to Tizen Products using IoTivity
IoT: From Arduino Microcontrollers to Tizen Products using IoTivityIoT: From Arduino Microcontrollers to Tizen Products using IoTivity
IoT: From Arduino Microcontrollers to Tizen Products using IoTivity
Samsung Open Source Group
 
IoT: From Arduino MicroControllers to Tizen Products Using IoTivity - Philipp...
IoT: From Arduino MicroControllers to Tizen Products Using IoTivity - Philipp...IoT: From Arduino MicroControllers to Tizen Products Using IoTivity - Philipp...
IoT: From Arduino MicroControllers to Tizen Products Using IoTivity - Philipp...
WithTheBest
 
ElasTest presentation in MadridJUG (Madrid December 2017)
ElasTest presentation in MadridJUG (Madrid December 2017)ElasTest presentation in MadridJUG (Madrid December 2017)
ElasTest presentation in MadridJUG (Madrid December 2017)
ElasTest Project
 
Smart net
Smart netSmart net
Smart net
Amirhosein Ataei
 
End-to-end IoT solutions with Java and Eclipse IoT
End-to-end IoT solutions with Java and Eclipse IoTEnd-to-end IoT solutions with Java and Eclipse IoT
End-to-end IoT solutions with Java and Eclipse IoT
Benjamin Cabé
 

Similar to Introduction to Open Telemetry as Observability Library (20)

OpenTelemetry 101 FTW
OpenTelemetry 101 FTWOpenTelemetry 101 FTW
OpenTelemetry 101 FTW
 
2307 - DevBCN - Otel 101_compressed.pdf
2307 - DevBCN - Otel 101_compressed.pdf2307 - DevBCN - Otel 101_compressed.pdf
2307 - DevBCN - Otel 101_compressed.pdf
 
Netflix Open Source: Building a Distributed and Automated Open Source Program
Netflix Open Source:  Building a Distributed and Automated Open Source ProgramNetflix Open Source:  Building a Distributed and Automated Open Source Program
Netflix Open Source: Building a Distributed and Automated Open Source Program
 
Building a Distributed & Automated Open Source Program at Netflix
Building a Distributed & Automated Open Source Program at NetflixBuilding a Distributed & Automated Open Source Program at Netflix
Building a Distributed & Automated Open Source Program at Netflix
 
Monitoring in Big Data Platform - Albert Lewandowski, GetInData
Monitoring in Big Data Platform - Albert Lewandowski, GetInDataMonitoring in Big Data Platform - Albert Lewandowski, GetInData
Monitoring in Big Data Platform - Albert Lewandowski, GetInData
 
Tracing-for-fun-and-profit.pptx
Tracing-for-fun-and-profit.pptxTracing-for-fun-and-profit.pptx
Tracing-for-fun-and-profit.pptx
 
Tracing 2000+ polyglot microservices at Uber with Jaeger and OpenTracing
Tracing 2000+ polyglot microservices at Uber with Jaeger and OpenTracingTracing 2000+ polyglot microservices at Uber with Jaeger and OpenTracing
Tracing 2000+ polyglot microservices at Uber with Jaeger and OpenTracing
 
EO Application Packages - hands-on
EO Application Packages - hands-onEO Application Packages - hands-on
EO Application Packages - hands-on
 
Getting Started Monitoring with Prometheus and Grafana
Getting Started Monitoring with Prometheus and GrafanaGetting Started Monitoring with Prometheus and Grafana
Getting Started Monitoring with Prometheus and Grafana
 
Devoxx 2015 - Building the Internet of Things with Eclipse IoT
Devoxx 2015 - Building the Internet of Things with Eclipse IoTDevoxx 2015 - Building the Internet of Things with Eclipse IoT
Devoxx 2015 - Building the Internet of Things with Eclipse IoT
 
Implementing Observability for Kubernetes.pdf
Implementing Observability for Kubernetes.pdfImplementing Observability for Kubernetes.pdf
Implementing Observability for Kubernetes.pdf
 
Ridwan Fadjar Septian PyCon ID 2021 Regular Talk - django application monitor...
Ridwan Fadjar Septian PyCon ID 2021 Regular Talk - django application monitor...Ridwan Fadjar Septian PyCon ID 2021 Regular Talk - django application monitor...
Ridwan Fadjar Septian PyCon ID 2021 Regular Talk - django application monitor...
 
Docker at and with SignalFx
Docker at and with SignalFxDocker at and with SignalFx
Docker at and with SignalFx
 
Docker {at,with} SignalFx
Docker {at,with} SignalFxDocker {at,with} SignalFx
Docker {at,with} SignalFx
 
Sumologic <3 Open Source
Sumologic <3 Open SourceSumologic <3 Open Source
Sumologic <3 Open Source
 
IoT: From Arduino Microcontrollers to Tizen Products using IoTivity
IoT: From Arduino Microcontrollers to Tizen Products using IoTivityIoT: From Arduino Microcontrollers to Tizen Products using IoTivity
IoT: From Arduino Microcontrollers to Tizen Products using IoTivity
 
IoT: From Arduino MicroControllers to Tizen Products Using IoTivity - Philipp...
IoT: From Arduino MicroControllers to Tizen Products Using IoTivity - Philipp...IoT: From Arduino MicroControllers to Tizen Products Using IoTivity - Philipp...
IoT: From Arduino MicroControllers to Tizen Products Using IoTivity - Philipp...
 
ElasTest presentation in MadridJUG (Madrid December 2017)
ElasTest presentation in MadridJUG (Madrid December 2017)ElasTest presentation in MadridJUG (Madrid December 2017)
ElasTest presentation in MadridJUG (Madrid December 2017)
 
Smart net
Smart netSmart net
Smart net
 
End-to-end IoT solutions with Java and Eclipse IoT
End-to-end IoT solutions with Java and Eclipse IoTEnd-to-end IoT solutions with Java and Eclipse IoT
End-to-end IoT solutions with Java and Eclipse IoT
 

More from Tonny Adhi Sabastian

The_Story_of_Microservices_YAI_KALBIS.pdf
The_Story_of_Microservices_YAI_KALBIS.pdfThe_Story_of_Microservices_YAI_KALBIS.pdf
The_Story_of_Microservices_YAI_KALBIS.pdf
Tonny Adhi Sabastian
 
Delivering High Quality Elixir Code using Gitlab
Delivering High Quality Elixir Code using GitlabDelivering High Quality Elixir Code using Gitlab
Delivering High Quality Elixir Code using Gitlab
Tonny Adhi Sabastian
 
Single Sign On (SSO) Services with Free/Open Source Software
Single Sign On (SSO) Services with Free/Open Source SoftwareSingle Sign On (SSO) Services with Free/Open Source Software
Single Sign On (SSO) Services with Free/Open Source Software
Tonny Adhi Sabastian
 
Software Delivery Pipeline
Software Delivery PipelineSoftware Delivery Pipeline
Software Delivery Pipeline
Tonny Adhi Sabastian
 
DevOps Culture and Principles
DevOps Culture and PrinciplesDevOps Culture and Principles
DevOps Culture and Principles
Tonny Adhi Sabastian
 
Cloud Services On UI and Ideas for Federated Cloud on idREN
Cloud Services On UI and Ideas for Federated Cloud on idRENCloud Services On UI and Ideas for Federated Cloud on idREN
Cloud Services On UI and Ideas for Federated Cloud on idREN
Tonny Adhi Sabastian
 
Towards universitas indonesia_next_generation_firewall_service
Towards universitas indonesia_next_generation_firewall_serviceTowards universitas indonesia_next_generation_firewall_service
Towards universitas indonesia_next_generation_firewall_service
Tonny Adhi Sabastian
 
Paparan menteri kadisdik 141201 - low v.0
Paparan menteri   kadisdik 141201 - low v.0Paparan menteri   kadisdik 141201 - low v.0
Paparan menteri kadisdik 141201 - low v.0
Tonny Adhi Sabastian
 
Cloud computing 101 & The Development Beyond
Cloud computing 101  &  The Development BeyondCloud computing 101  &  The Development Beyond
Cloud computing 101 & The Development Beyond
Tonny Adhi Sabastian
 
Raspberry Pi GPIO 101
Raspberry Pi GPIO 101Raspberry Pi GPIO 101
Raspberry Pi GPIO 101
Tonny Adhi Sabastian
 
Kreatif Dengan Piranti Keras Open Source Raspberry Pi
Kreatif Dengan Piranti Keras Open Source Raspberry PiKreatif Dengan Piranti Keras Open Source Raspberry Pi
Kreatif Dengan Piranti Keras Open Source Raspberry Pi
Tonny Adhi Sabastian
 
RaspberryPi-KopiDarat-IDPython-Oktober2013
RaspberryPi-KopiDarat-IDPython-Oktober2013RaspberryPi-KopiDarat-IDPython-Oktober2013
RaspberryPi-KopiDarat-IDPython-Oktober2013
Tonny Adhi Sabastian
 
Raspberry Pi 101
Raspberry Pi 101Raspberry Pi 101
Raspberry Pi 101
Tonny Adhi Sabastian
 

More from Tonny Adhi Sabastian (13)

The_Story_of_Microservices_YAI_KALBIS.pdf
The_Story_of_Microservices_YAI_KALBIS.pdfThe_Story_of_Microservices_YAI_KALBIS.pdf
The_Story_of_Microservices_YAI_KALBIS.pdf
 
Delivering High Quality Elixir Code using Gitlab
Delivering High Quality Elixir Code using GitlabDelivering High Quality Elixir Code using Gitlab
Delivering High Quality Elixir Code using Gitlab
 
Single Sign On (SSO) Services with Free/Open Source Software
Single Sign On (SSO) Services with Free/Open Source SoftwareSingle Sign On (SSO) Services with Free/Open Source Software
Single Sign On (SSO) Services with Free/Open Source Software
 
Software Delivery Pipeline
Software Delivery PipelineSoftware Delivery Pipeline
Software Delivery Pipeline
 
DevOps Culture and Principles
DevOps Culture and PrinciplesDevOps Culture and Principles
DevOps Culture and Principles
 
Cloud Services On UI and Ideas for Federated Cloud on idREN
Cloud Services On UI and Ideas for Federated Cloud on idRENCloud Services On UI and Ideas for Federated Cloud on idREN
Cloud Services On UI and Ideas for Federated Cloud on idREN
 
Towards universitas indonesia_next_generation_firewall_service
Towards universitas indonesia_next_generation_firewall_serviceTowards universitas indonesia_next_generation_firewall_service
Towards universitas indonesia_next_generation_firewall_service
 
Paparan menteri kadisdik 141201 - low v.0
Paparan menteri   kadisdik 141201 - low v.0Paparan menteri   kadisdik 141201 - low v.0
Paparan menteri kadisdik 141201 - low v.0
 
Cloud computing 101 & The Development Beyond
Cloud computing 101  &  The Development BeyondCloud computing 101  &  The Development Beyond
Cloud computing 101 & The Development Beyond
 
Raspberry Pi GPIO 101
Raspberry Pi GPIO 101Raspberry Pi GPIO 101
Raspberry Pi GPIO 101
 
Kreatif Dengan Piranti Keras Open Source Raspberry Pi
Kreatif Dengan Piranti Keras Open Source Raspberry PiKreatif Dengan Piranti Keras Open Source Raspberry Pi
Kreatif Dengan Piranti Keras Open Source Raspberry Pi
 
RaspberryPi-KopiDarat-IDPython-Oktober2013
RaspberryPi-KopiDarat-IDPython-Oktober2013RaspberryPi-KopiDarat-IDPython-Oktober2013
RaspberryPi-KopiDarat-IDPython-Oktober2013
 
Raspberry Pi 101
Raspberry Pi 101Raspberry Pi 101
Raspberry Pi 101
 

Recently uploaded

All you need to know about Spring Boot and GraalVM
All you need to know about Spring Boot and GraalVMAll you need to know about Spring Boot and GraalVM
All you need to know about Spring Boot and GraalVM
Alina Yurenko
 
What’s New in Odoo 17 – A Complete Roadmap
What’s New in Odoo 17 – A Complete RoadmapWhat’s New in Odoo 17 – A Complete Roadmap
What’s New in Odoo 17 – A Complete Roadmap
Envertis Software Solutions
 
Mobile App Development Company In Noida | Drona Infotech
Mobile App Development Company In Noida | Drona InfotechMobile App Development Company In Noida | Drona Infotech
Mobile App Development Company In Noida | Drona Infotech
Drona Infotech
 
E-commerce Development Services- Hornet Dynamics
E-commerce Development Services- Hornet DynamicsE-commerce Development Services- Hornet Dynamics
E-commerce Development Services- Hornet Dynamics
Hornet Dynamics
 
Enhanced Screen Flows UI/UX using SLDS with Tom Kitt
Enhanced Screen Flows UI/UX using SLDS with Tom KittEnhanced Screen Flows UI/UX using SLDS with Tom Kitt
Enhanced Screen Flows UI/UX using SLDS with Tom Kitt
Peter Caitens
 
KuberTENes Birthday Bash Guadalajara - Introducción a Argo CD
KuberTENes Birthday Bash Guadalajara - Introducción a Argo CDKuberTENes Birthday Bash Guadalajara - Introducción a Argo CD
KuberTENes Birthday Bash Guadalajara - Introducción a Argo CD
rodomar2
 
Enums On Steroids - let's look at sealed classes !
Enums On Steroids - let's look at sealed classes !Enums On Steroids - let's look at sealed classes !
Enums On Steroids - let's look at sealed classes !
Marcin Chrost
 
Unveiling the Advantages of Agile Software Development.pdf
Unveiling the Advantages of Agile Software Development.pdfUnveiling the Advantages of Agile Software Development.pdf
Unveiling the Advantages of Agile Software Development.pdf
brainerhub1
 
Unlock the Secrets to Effortless Video Creation with Invideo: Your Ultimate G...
Unlock the Secrets to Effortless Video Creation with Invideo: Your Ultimate G...Unlock the Secrets to Effortless Video Creation with Invideo: Your Ultimate G...
Unlock the Secrets to Effortless Video Creation with Invideo: Your Ultimate G...
The Third Creative Media
 
Preparing Non - Technical Founders for Engaging a Tech Agency
Preparing Non - Technical Founders for Engaging  a  Tech AgencyPreparing Non - Technical Founders for Engaging  a  Tech Agency
Preparing Non - Technical Founders for Engaging a Tech Agency
ISH Technologies
 
Everything You Need to Know About X-Sign: The eSign Functionality of XfilesPr...
Everything You Need to Know About X-Sign: The eSign Functionality of XfilesPr...Everything You Need to Know About X-Sign: The eSign Functionality of XfilesPr...
Everything You Need to Know About X-Sign: The eSign Functionality of XfilesPr...
XfilesPro
 
Microservice Teams - How the cloud changes the way we work
Microservice Teams - How the cloud changes the way we workMicroservice Teams - How the cloud changes the way we work
Microservice Teams - How the cloud changes the way we work
Sven Peters
 
ALGIT - Assembly Line for Green IT - Numbers, Data, Facts
ALGIT - Assembly Line for Green IT - Numbers, Data, FactsALGIT - Assembly Line for Green IT - Numbers, Data, Facts
ALGIT - Assembly Line for Green IT - Numbers, Data, Facts
Green Software Development
 
Using Query Store in Azure PostgreSQL to Understand Query Performance
Using Query Store in Azure PostgreSQL to Understand Query PerformanceUsing Query Store in Azure PostgreSQL to Understand Query Performance
Using Query Store in Azure PostgreSQL to Understand Query Performance
Grant Fritchey
 
GreenCode-A-VSCode-Plugin--Dario-Jurisic
GreenCode-A-VSCode-Plugin--Dario-JurisicGreenCode-A-VSCode-Plugin--Dario-Jurisic
GreenCode-A-VSCode-Plugin--Dario-Jurisic
Green Software Development
 
ACE - Team 24 Wrapup event at ahmedabad.
ACE - Team 24 Wrapup event at ahmedabad.ACE - Team 24 Wrapup event at ahmedabad.
ACE - Team 24 Wrapup event at ahmedabad.
Maitrey Patel
 
Malibou Pitch Deck For Its €3M Seed Round
Malibou Pitch Deck For Its €3M Seed RoundMalibou Pitch Deck For Its €3M Seed Round
Malibou Pitch Deck For Its €3M Seed Round
sjcobrien
 
Why Apache Kafka Clusters Are Like Galaxies (And Other Cosmic Kafka Quandarie...
Why Apache Kafka Clusters Are Like Galaxies (And Other Cosmic Kafka Quandarie...Why Apache Kafka Clusters Are Like Galaxies (And Other Cosmic Kafka Quandarie...
Why Apache Kafka Clusters Are Like Galaxies (And Other Cosmic Kafka Quandarie...
Paul Brebner
 
How Can Hiring A Mobile App Development Company Help Your Business Grow?
How Can Hiring A Mobile App Development Company Help Your Business Grow?How Can Hiring A Mobile App Development Company Help Your Business Grow?
How Can Hiring A Mobile App Development Company Help Your Business Grow?
ToXSL Technologies
 
Modelling Up - DDDEurope 2024 - Amsterdam
Modelling Up - DDDEurope 2024 - AmsterdamModelling Up - DDDEurope 2024 - Amsterdam
Modelling Up - DDDEurope 2024 - Amsterdam
Alberto Brandolini
 

Recently uploaded (20)

All you need to know about Spring Boot and GraalVM
All you need to know about Spring Boot and GraalVMAll you need to know about Spring Boot and GraalVM
All you need to know about Spring Boot and GraalVM
 
What’s New in Odoo 17 – A Complete Roadmap
What’s New in Odoo 17 – A Complete RoadmapWhat’s New in Odoo 17 – A Complete Roadmap
What’s New in Odoo 17 – A Complete Roadmap
 
Mobile App Development Company In Noida | Drona Infotech
Mobile App Development Company In Noida | Drona InfotechMobile App Development Company In Noida | Drona Infotech
Mobile App Development Company In Noida | Drona Infotech
 
E-commerce Development Services- Hornet Dynamics
E-commerce Development Services- Hornet DynamicsE-commerce Development Services- Hornet Dynamics
E-commerce Development Services- Hornet Dynamics
 
Enhanced Screen Flows UI/UX using SLDS with Tom Kitt
Enhanced Screen Flows UI/UX using SLDS with Tom KittEnhanced Screen Flows UI/UX using SLDS with Tom Kitt
Enhanced Screen Flows UI/UX using SLDS with Tom Kitt
 
KuberTENes Birthday Bash Guadalajara - Introducción a Argo CD
KuberTENes Birthday Bash Guadalajara - Introducción a Argo CDKuberTENes Birthday Bash Guadalajara - Introducción a Argo CD
KuberTENes Birthday Bash Guadalajara - Introducción a Argo CD
 
Enums On Steroids - let's look at sealed classes !
Enums On Steroids - let's look at sealed classes !Enums On Steroids - let's look at sealed classes !
Enums On Steroids - let's look at sealed classes !
 
Unveiling the Advantages of Agile Software Development.pdf
Unveiling the Advantages of Agile Software Development.pdfUnveiling the Advantages of Agile Software Development.pdf
Unveiling the Advantages of Agile Software Development.pdf
 
Unlock the Secrets to Effortless Video Creation with Invideo: Your Ultimate G...
Unlock the Secrets to Effortless Video Creation with Invideo: Your Ultimate G...Unlock the Secrets to Effortless Video Creation with Invideo: Your Ultimate G...
Unlock the Secrets to Effortless Video Creation with Invideo: Your Ultimate G...
 
Preparing Non - Technical Founders for Engaging a Tech Agency
Preparing Non - Technical Founders for Engaging  a  Tech AgencyPreparing Non - Technical Founders for Engaging  a  Tech Agency
Preparing Non - Technical Founders for Engaging a Tech Agency
 
Everything You Need to Know About X-Sign: The eSign Functionality of XfilesPr...
Everything You Need to Know About X-Sign: The eSign Functionality of XfilesPr...Everything You Need to Know About X-Sign: The eSign Functionality of XfilesPr...
Everything You Need to Know About X-Sign: The eSign Functionality of XfilesPr...
 
Microservice Teams - How the cloud changes the way we work
Microservice Teams - How the cloud changes the way we workMicroservice Teams - How the cloud changes the way we work
Microservice Teams - How the cloud changes the way we work
 
ALGIT - Assembly Line for Green IT - Numbers, Data, Facts
ALGIT - Assembly Line for Green IT - Numbers, Data, FactsALGIT - Assembly Line for Green IT - Numbers, Data, Facts
ALGIT - Assembly Line for Green IT - Numbers, Data, Facts
 
Using Query Store in Azure PostgreSQL to Understand Query Performance
Using Query Store in Azure PostgreSQL to Understand Query PerformanceUsing Query Store in Azure PostgreSQL to Understand Query Performance
Using Query Store in Azure PostgreSQL to Understand Query Performance
 
GreenCode-A-VSCode-Plugin--Dario-Jurisic
GreenCode-A-VSCode-Plugin--Dario-JurisicGreenCode-A-VSCode-Plugin--Dario-Jurisic
GreenCode-A-VSCode-Plugin--Dario-Jurisic
 
ACE - Team 24 Wrapup event at ahmedabad.
ACE - Team 24 Wrapup event at ahmedabad.ACE - Team 24 Wrapup event at ahmedabad.
ACE - Team 24 Wrapup event at ahmedabad.
 
Malibou Pitch Deck For Its €3M Seed Round
Malibou Pitch Deck For Its €3M Seed RoundMalibou Pitch Deck For Its €3M Seed Round
Malibou Pitch Deck For Its €3M Seed Round
 
Why Apache Kafka Clusters Are Like Galaxies (And Other Cosmic Kafka Quandarie...
Why Apache Kafka Clusters Are Like Galaxies (And Other Cosmic Kafka Quandarie...Why Apache Kafka Clusters Are Like Galaxies (And Other Cosmic Kafka Quandarie...
Why Apache Kafka Clusters Are Like Galaxies (And Other Cosmic Kafka Quandarie...
 
How Can Hiring A Mobile App Development Company Help Your Business Grow?
How Can Hiring A Mobile App Development Company Help Your Business Grow?How Can Hiring A Mobile App Development Company Help Your Business Grow?
How Can Hiring A Mobile App Development Company Help Your Business Grow?
 
Modelling Up - DDDEurope 2024 - Amsterdam
Modelling Up - DDDEurope 2024 - AmsterdamModelling Up - DDDEurope 2024 - Amsterdam
Modelling Up - DDDEurope 2024 - Amsterdam
 

Introduction to Open Telemetry as Observability Library

  • 1. Introduction to Open Telemetry -Your Universal Telemetry Library- Tonny Adhi Sabastian (tonny.sabastian@gojek.com) Open Infrastructure Day Asia - September 11th, 2021
  • 2. About Me ● Currently : Senior DevOps Engineer at MAPAN (GoTo Group) - https://www.mapan.id (2018 - Now) ○ We’re hiring, please visit https://www.career.mapan.id/ ○ Send your CV to mapan-recruitment@gojek.com ○ Interest in our DevOps engineering ? PM me via mail ● Former Lead Engineer for University of Indonesia - Data Center (2012 - 2018) - https://ui.ac.id ● Former Lecturer at Faculty of Computer Science , University of Indonesia (2014 - 2018) ○ Teaching Subject : Distributed System , System Programming, Modern IT Infrastructure ○ Research Subject : IoT , Deep Packet Inspection, Aeronautical Telecommunication Network, Linux System Performance ● Co-founding two startup during 2012 - 2018 , (Rumio - AR Platform & Peentar - IoT Platform) - now defunct ● Former volunteer system administrator for kambing.ui.ac.id - one of Indonesia largest F/OSS repository ; now defunct (2009 - 2018) ● Contact : tonny.sabastian@gojek.com / tonny@segmentationfault.xyz
  • 3. Agenda ● Observability 101 ● Meet OpenTelemetry ● Instrumenting with OpenTelemetry - Tracing with Go Example - ● OpenTelemetry @ MAPAN
  • 5. The Observability Triad Do you know what your codes are doing on 2AM when your payment service is down ? Monitoring Tracing Logging
  • 6. Metrics - It’s About The Number ● Each metric reports a number ● The monitoring system tracks those numbers over time ● Identify anomalous behavior and wake someone up ● Recognizes trends for your infrastructure scaling ● Four Golden Signals - ( Latency - Traffic - Saturation - Errors )
  • 7. Tracing - Finding Your Bottleneck ● Uniquely identify Requests and Spans ● Spans carry contextual metadata ● Runtime reports start/end timestamps for each span ● Span Aggregator find out how long everything took
  • 8. Logging - How to debug your production at 2AM ● Convey appropriate urgency ● Provide enough information ● Not overwhelming ● Structured for searching not reading
  • 10. OpenTelemetry ● OpenCensus + OpenTracing = OpenTelemetry ● Provides a unified set of open standards API, SDK, and middleware for generating and exporting Trace , Metrics, (and logging - incoming) ● Enabling quick bootstrap of observability into your system ● Contributor from various major vendor and wide community support source : https://opentelemetry.io
  • 11. OpenTelemetry Architecture (1) ● API : Used to generate telemetry data ● SDK : Implementation of API in various languages ○ Tracer : responsible for creating and tracking span - distributed tracing ○ Meter : responsible for creating and tracking metrics ● OpenTelemetry Proto : protobuf implementation on semantic convention and OpenTelemetry Protocol (OTLP) source : https://blog.newrelic.com/product-news/what-is-opentelemetry/
  • 12. OpenTelemetry Architecture (2) ● Collector : middleware service on receiving, processing, and exporting telemetry data to various telemetry backend (ex : jaeger, prometheus, datadog, etc). It’s acting as telemetry pipeline ● Collector composed of following components : ○ receivers : receive telemetry data ○ processors : telemetry data additional processing ○ exporters : send telemetry data to final backend ● Collector can be deployed as Agent or Gateway source : https://blog.newrelic.com/product-news/what-is-opentelemetry/
  • 14. Tracing API Concepts ● TracerProvider is the entry point of the API. It’s providing access to Tracers ○ TracerProvider register global configuration of exporter, tracing attributes and sampler ● Tracer is the class responsible for creating Spans ● Spans is the API to trace an operation within your code
  • 15. Tracing SDK Concepts ● Sampler , controls the number of traces capture and send to backend ○ Sampling Decision Values [ DROP | RECORD_ONLY | RECORD_AND_SAMPLE ] ○ SDK Built In Samplers [ AlwaysOn | AlwaysOff | TraceIDRatioBased ] ● SpanProcessor , hook for span start and stop invocation ○ SDK Built In Processor [ ExportFormatConverter | Batcher ] ○ Only invoked when isRecording is true ● SpanExporter, defines interfaces for specific backend exporters (ex : Jaeger, OTLP, Lighstep, Datadog)
  • 16. Go Instrumentation - Set Dependencies OpenTelemetry Go Dependencies
  • 17. Go Instrumentation - Create Tracer ● Set SpanExporter using OpenTelemetry Protocol via otlpgrpc ● Set initial SpanAttributes, such as your ServiceName ● Deploy TracerProvider with our established SpanExporter, Sampler and initial SpanAttributes
  • 18. Go Instrumentation - Adding Span ● Create a Tracer and bind it to a TracerProvider ● Bind the Tracer to a Span ● Set additional SpanAttributes. Perhaps you want to trace your http request ● Track an event on your function. Add a SpanEvent to our Span
  • 19. Go Instrumentation - Trace from your HTTP Router ● Create http handler function with http request path as its span context ● Bind this function with your http router
  • 20. Go Instrumentation - Spawn your Tracer ● Create a context and bind it to your Tracer ● Bind your http handler function to your http router. This will create your root span
  • 21. Go Instrumentation - Span Result on Jaeger
  • 22. Go Instrumentation - OpenTelemetry @ MAPAN ● Wrap OpenTelemetry into our Observability Library ● Wrap our Observability Library into our HTTP Server Library ● Simple Observability Bootstraping via server start options
  • 23. Demo
  • 24. Instrumentation Demo ● Demo Repository in Golang https://github.com/tonnyadhi/distributed-tracing-example ● Contains two services ○ Weather Service, fetch weather report from backend and print it in JSON ○ OWM Service, fetch weather report from OpenWeathermap, simplify it and Sent it to Weather Service ● Distributed Tracing is set between two services using OpenTelemetry HTTP Traces ● Span are sent to OpenTelemetry Collector. The collector will export the span to Jaeger and Sentry