SlideShare uma empresa Scribd logo
1 de 25
Baixar para ler offline
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

Mais conteúdo relacionado

Mais procurados

Observability For You and Me with OpenTelemetry
Observability For You and Me with OpenTelemetryObservability For You and Me with OpenTelemetry
Observability For You and Me with OpenTelemetry
Eric D. Schabell
 

Mais procurados (20)

OSMC 2022 | OpenTelemetry 101 by Dotan Horovit s.pdf
OSMC 2022 | OpenTelemetry 101 by Dotan Horovit s.pdfOSMC 2022 | OpenTelemetry 101 by Dotan Horovit s.pdf
OSMC 2022 | OpenTelemetry 101 by Dotan Horovit s.pdf
 
Adopting Open Telemetry as Distributed Tracer on your Microservices at Kubern...
Adopting Open Telemetry as Distributed Tracer on your Microservices at Kubern...Adopting Open Telemetry as Distributed Tracer on your Microservices at Kubern...
Adopting Open Telemetry as Distributed Tracer on your Microservices at Kubern...
 
Opentelemetry - From frontend to backend
Opentelemetry - From frontend to backendOpentelemetry - From frontend to backend
Opentelemetry - From frontend to backend
 
OpenTelemetry: From front- to backend (2022)
OpenTelemetry: From front- to backend (2022)OpenTelemetry: From front- to backend (2022)
OpenTelemetry: From front- to backend (2022)
 
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
 
Observability For You and Me with OpenTelemetry
Observability For You and Me with OpenTelemetryObservability For You and Me with OpenTelemetry
Observability For You and Me with OpenTelemetry
 
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
 
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
 
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
 
MeetUp Monitoring with Prometheus and Grafana (September 2018)
MeetUp Monitoring with Prometheus and Grafana (September 2018)MeetUp Monitoring with Prometheus and Grafana (September 2018)
MeetUp Monitoring with Prometheus and Grafana (September 2018)
 
KCD-OpenTelemetry.pdf
KCD-OpenTelemetry.pdfKCD-OpenTelemetry.pdf
KCD-OpenTelemetry.pdf
 
Grafana introduction
Grafana introductionGrafana introduction
Grafana introduction
 
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
 
Distributed tracing using open tracing & jaeger 2
Distributed tracing using open tracing & jaeger 2Distributed tracing using open tracing & jaeger 2
Distributed tracing using open tracing & jaeger 2
 
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 With Prometheus
Monitoring With PrometheusMonitoring With Prometheus
Monitoring With Prometheus
 
Server monitoring using grafana and prometheus
Server monitoring using grafana and prometheusServer monitoring using grafana and prometheus
Server monitoring using grafana and prometheus
 
Cloud Monitoring tool Grafana
Cloud Monitoring  tool Grafana Cloud Monitoring  tool Grafana
Cloud Monitoring tool Grafana
 
Prometheus 101
Prometheus 101Prometheus 101
Prometheus 101
 
Prometheus: What is is, what is new, what is coming
Prometheus: What is is, what is new, what is comingPrometheus: What is is, what is new, what is coming
Prometheus: What is is, what is new, what is coming
 

Semelhante a Introduction to Open Telemetry as Observability Library

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
 

Semelhante a 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
 
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
 
Manage Microservices Chaos and Complexity with Observability
Manage Microservices Chaos and Complexity with ObservabilityManage Microservices Chaos and Complexity with Observability
Manage Microservices Chaos and Complexity with Observability
 

Mais de Tonny Adhi Sabastian

RaspberryPi-KopiDarat-IDPython-Oktober2013
RaspberryPi-KopiDarat-IDPython-Oktober2013RaspberryPi-KopiDarat-IDPython-Oktober2013
RaspberryPi-KopiDarat-IDPython-Oktober2013
Tonny Adhi Sabastian
 

Mais de 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
 

Último

%+27788225528 love spells in Colorado Springs Psychic Readings, Attraction sp...
%+27788225528 love spells in Colorado Springs Psychic Readings, Attraction sp...%+27788225528 love spells in Colorado Springs Psychic Readings, Attraction sp...
%+27788225528 love spells in Colorado Springs Psychic Readings, Attraction sp...
masabamasaba
 
%+27788225528 love spells in Knoxville Psychic Readings, Attraction spells,Br...
%+27788225528 love spells in Knoxville Psychic Readings, Attraction spells,Br...%+27788225528 love spells in Knoxville Psychic Readings, Attraction spells,Br...
%+27788225528 love spells in Knoxville Psychic Readings, Attraction spells,Br...
masabamasaba
 
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
Health
 
Abortion Pill Prices Tembisa [(+27832195400*)] 🏥 Women's Abortion Clinic in T...
Abortion Pill Prices Tembisa [(+27832195400*)] 🏥 Women's Abortion Clinic in T...Abortion Pill Prices Tembisa [(+27832195400*)] 🏥 Women's Abortion Clinic in T...
Abortion Pill Prices Tembisa [(+27832195400*)] 🏥 Women's Abortion Clinic in T...
Medical / Health Care (+971588192166) Mifepristone and Misoprostol tablets 200mg
 
The title is not connected to what is inside
The title is not connected to what is insideThe title is not connected to what is inside
The title is not connected to what is inside
shinachiaurasa2
 
%+27788225528 love spells in Atlanta Psychic Readings, Attraction spells,Brin...
%+27788225528 love spells in Atlanta Psychic Readings, Attraction spells,Brin...%+27788225528 love spells in Atlanta Psychic Readings, Attraction spells,Brin...
%+27788225528 love spells in Atlanta Psychic Readings, Attraction spells,Brin...
masabamasaba
 

Último (20)

Announcing Codolex 2.0 from GDK Software
Announcing Codolex 2.0 from GDK SoftwareAnnouncing Codolex 2.0 from GDK Software
Announcing Codolex 2.0 from GDK Software
 
%+27788225528 love spells in Colorado Springs Psychic Readings, Attraction sp...
%+27788225528 love spells in Colorado Springs Psychic Readings, Attraction sp...%+27788225528 love spells in Colorado Springs Psychic Readings, Attraction sp...
%+27788225528 love spells in Colorado Springs Psychic Readings, Attraction sp...
 
Devoxx UK 2024 - Going serverless with Quarkus, GraalVM native images and AWS...
Devoxx UK 2024 - Going serverless with Quarkus, GraalVM native images and AWS...Devoxx UK 2024 - Going serverless with Quarkus, GraalVM native images and AWS...
Devoxx UK 2024 - Going serverless with Quarkus, GraalVM native images and AWS...
 
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
 
%+27788225528 love spells in Knoxville Psychic Readings, Attraction spells,Br...
%+27788225528 love spells in Knoxville Psychic Readings, Attraction spells,Br...%+27788225528 love spells in Knoxville Psychic Readings, Attraction spells,Br...
%+27788225528 love spells in Knoxville Psychic Readings, Attraction spells,Br...
 
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
 
%in kempton park+277-882-255-28 abortion pills for sale in kempton park
%in kempton park+277-882-255-28 abortion pills for sale in kempton park %in kempton park+277-882-255-28 abortion pills for sale in kempton park
%in kempton park+277-882-255-28 abortion pills for sale in kempton park
 
WSO2Con2024 - WSO2's IAM Vision: Identity-Led Digital Transformation
WSO2Con2024 - WSO2's IAM Vision: Identity-Led Digital TransformationWSO2Con2024 - WSO2's IAM Vision: Identity-Led Digital Transformation
WSO2Con2024 - WSO2's IAM Vision: Identity-Led Digital Transformation
 
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
 
Abortion Pill Prices Tembisa [(+27832195400*)] 🏥 Women's Abortion Clinic in T...
Abortion Pill Prices Tembisa [(+27832195400*)] 🏥 Women's Abortion Clinic in T...Abortion Pill Prices Tembisa [(+27832195400*)] 🏥 Women's Abortion Clinic in T...
Abortion Pill Prices Tembisa [(+27832195400*)] 🏥 Women's Abortion Clinic in T...
 
AI & Machine Learning Presentation Template
AI & Machine Learning Presentation TemplateAI & Machine Learning Presentation Template
AI & Machine Learning Presentation Template
 
The title is not connected to what is inside
The title is not connected to what is insideThe title is not connected to what is inside
The title is not connected to what is inside
 
Software Quality Assurance Interview Questions
Software Quality Assurance Interview QuestionsSoftware Quality Assurance Interview Questions
Software Quality Assurance Interview Questions
 
%in Bahrain+277-882-255-28 abortion pills for sale in Bahrain
%in Bahrain+277-882-255-28 abortion pills for sale in Bahrain%in Bahrain+277-882-255-28 abortion pills for sale in Bahrain
%in Bahrain+277-882-255-28 abortion pills for sale in Bahrain
 
tonesoftg
tonesoftgtonesoftg
tonesoftg
 
Define the academic and professional writing..pdf
Define the academic and professional writing..pdfDefine the academic and professional writing..pdf
Define the academic and professional writing..pdf
 
%in ivory park+277-882-255-28 abortion pills for sale in ivory park
%in ivory park+277-882-255-28 abortion pills for sale in ivory park %in ivory park+277-882-255-28 abortion pills for sale in ivory park
%in ivory park+277-882-255-28 abortion pills for sale in ivory park
 
%in Hazyview+277-882-255-28 abortion pills for sale in Hazyview
%in Hazyview+277-882-255-28 abortion pills for sale in Hazyview%in Hazyview+277-882-255-28 abortion pills for sale in Hazyview
%in Hazyview+277-882-255-28 abortion pills for sale in Hazyview
 
OpenChain - The Ramifications of ISO/IEC 5230 and ISO/IEC 18974 for Legal Pro...
OpenChain - The Ramifications of ISO/IEC 5230 and ISO/IEC 18974 for Legal Pro...OpenChain - The Ramifications of ISO/IEC 5230 and ISO/IEC 18974 for Legal Pro...
OpenChain - The Ramifications of ISO/IEC 5230 and ISO/IEC 18974 for Legal Pro...
 
%+27788225528 love spells in Atlanta Psychic Readings, Attraction spells,Brin...
%+27788225528 love spells in Atlanta Psychic Readings, Attraction spells,Brin...%+27788225528 love spells in Atlanta Psychic Readings, Attraction spells,Brin...
%+27788225528 love spells in Atlanta Psychic Readings, Attraction spells,Brin...
 

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