SlideShare a Scribd company logo
Best Practices for
Observability with
OpenTelemetry
Rui Liu
liurui@cn.ibm.com
OpenTelemetry conceptions
01
OpenTelemetry Collector
03
Automatic & manual instrumentation
02
Content
Deployment considerations
04
OpenTelemetry conceptions
Part 01
A survey showing that more and more system owners tend to use
OpenTelemetry to collect data
What is OpenTelemetry (OTel)
OpenTelemetry is an open-source project and unified standard for service instrumentation, or a
way of measuring performance. Sponsored by the CNCF, it replaces OpenTracing and OpenCensus.
+ OpenCensus
Traces Metrics Logs
API for each language
SDK for each language
Infrastructure Collector, “agent” for auto-instrumentation…
Interop formats OTLP, W3C trace-context…
OpenTelemetry (OTel) Architecture
the industry standard to collector telemetry data for observability vendors
Client
API
SDK
Exporter
Collector
Receivers
OTLP
Prometheus
Jaeger
… …
Processors
Filling
Sampling
Enriching
…
…
Exporters
OTLP
Prometheus
Jaeger
… …
Instana
Dynatrace
Datadog
… …
Prometheus
Jaeger
… …
Observability vendors
What does OTel mean to end users or system
owners
• Standard and compatibility
• Avoid vendor lock-in and easy migration
• Can enable different vendors work together
• A standard way to enhance the observability of
their systems
What does OTel mean to Observability vendors
• Easier to get telemetry data from open
community and customers
• Easier to lose customers if their observability
backend is not competitive enough
• It is not likely for OTel to replace all APM agents
but it will become the most popular way for
apps and micro-services to become observable.
Notes
• OTel code is still a
little complex so that It
is not likely for all apps
to have built-in OTel
support in near future.
Conceptions of 3 signal types of OpenTelemetry
Note: New signal of Profiling data is now under design…
● Context: W3C trace-context, B3, etc.
● Tracer: get context
● Spans: “call” in a trace
○ Kind: client/server, producer/consumer, internal
○ Attributes: key/value pairs
○ Events: named strings
○ Links: useful for batch operations
● Sampler: always, probabilistic, etc.
● Span processor: simple, batch, etc.
● Exporter: OTLP, Jaeger, etc.
Traces
● Meter: used to record a measurement
● Metric: a measurement
○ Kind: Counter, UpDownCounter, Gauge, Histogram, Summary
○ Label: key/value pair
○ Data point
● Exporter: OTLP, Prometheus, etc.
Metrics
● Use Collector or Appenders for integration.
● Log model:
○ LogRecord: time, severity, name, body, attributes, TraceId, SpanId…
Logs
● Immutable Attributes
● Detecting resource information from the environment
● Specifying resource information via an environment
variable
○ OTEL_RESOURCE_ATTRIBUTES
Resources
Semantic conventions
Note: OpenTelemetry has adopted ECS (OpenTelemetry Semantic Convention) to be part of its own Semantic Conventions.
● https://opentelemetry.io/docs/reference/specification/trace/s
emantic_conventions/
● Examples:
○ peer.service
○ messaging.system
Traces
● https://opentelemetry.io/docs/reference/specification/metric
s/semantic_conventions/
● Examples:
○ system.cpu.time
○ system.cpu.utilization
○ system.memory.usage
○ …
Metrics
● https://opentelemetry.io/docs/reference/specification/logs/s
emantic_conventions/
● Examples:
○ log.file.name
Logs
● https://opentelemetry.io/docs/reference/specification/resou
rce/semantic_conventions/
● Examples:
○ service.name
○ host.id
Resources
Automatic & manual instrumentation
Part 02
Solutions of automatic instrumentation for different languages
Language Support? Solution
Java Yes Java Agent
Python Yes Python agent
.Net Yes .NET Profiler
Javacript Yes Preloaded module
GoLang Yes(Beta) eBPF
PHP Yes(At least PHP 8.0) the OpenTelemetry PHP extension
Ruby minor global code changes use the opentelemetry-instrumentation-all package
C++ N/A Manu-instrumentation, vcpkg
Rust N/A Manu-instrumentation
Note: OpenTelemetry Operator supports convenient auto-instrumentation installation in Kubernetes
environments.
Example of Java auto-instrumentation
Example-1 for Java
export JAVA_OPTS="-javaagent:/opt/dev/otel/res/opentelemetry-
javaagent.jar"
export OTEL_TRACES_EXPORTER=logging
export OTEL_METRICS_EXPORTER=logging
export OTEL_LOGS_EXPORTER=logging
Example-2 for Java
export JAVA_OPTS="-javaagent:/opt/dev/otel/res/opentelemetry-javaagent.jar"
export OTEL_TRACES_EXPORTER=otlp
export OTEL_METRICS_EXPORTER=none
export OTEL_LOGS_EXPORTER=none
export OTEL_EXPORTER_OTLP_TRACES_ENDPOINT="https://otlp-orange-
saas.instana.io:4317"
export OTEL_SERVICE_NAME=lr1service
export OTEL_EXPORTER_OTLP_PROTOCOL=grpc
export OTEL_EXPORTER_OTLP_HEADERS="x-instana-key=xxxxxxxxx,x-instana-
host=dk-liurui"
Example of Java manual-instrumentation
Initialization Instrumentation for traces
OpenTelemetry Collector
Part 03
Configuration of OTel Collector
❖ Key Components of OTel Collector:
➢ Receivers
➢ Processors
➢ Exporters
➢ Connector (new)
❖ Types of collector:
➢ Core Collector
➢ Contrib Collector
➢ Custom Collector
❖ Releases and deployments
➢ Binary
➢ Container based
Another example of collector configuration
Best practice to use OpenTelemetry Collector
❖ Key points:
➢ Collectors can be chained
➢ Receiver instance can be shared
➢ Processor instance cannot be shared
➢ Exporter instance can be shared
➢ Use Connector can build complex stream flows
within a single Collector.
❖ Some popular components of Collector:
➢ Receivers ~ 91
otlp, filelog, hostmetric, prometheus, jaeger…
➢ Processors ~ 25
batch, filter, resourcedetection, spanmetrics,
transform, probabilisticsampler…
➢ Exporters ~ 49
otlp, otlphttp, prometheus, jaeger, logging, file…
➢ Connectors ~ 5
forward, spanmetrics, count
Deployment considerations
Part 04
Deployments of OpenTelemetry
• With Binary OpenTelemetry Collector – for example for the usage of host metrics receiver…
• With Container based OpenTelemetry Collector – optionally using docker compose.
• Enable OpenTelemetry in Kubernetes
• Deploy OpenTelemetry Collector with built-in Kubernetes components (deployments or daemonset,
service, configmap…), optionally using Helm chart.
• Using OpenTelemetry Operator
• Have built-in OpenTelemetry Collector
• Support auto-instrumentation (inject sidecar into workloads with predefined annotation) for Java, Python, .Net,
NodeJS, GoLang…
An example of deployment using OTel operator
Thanks.

More Related Content

What's hot

Opentelemetry - From frontend to backend
Opentelemetry - From frontend to backendOpentelemetry - From frontend to backend
Opentelemetry - From frontend to backend
Sebastian Poxhofer
 
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
 
Introduction to Open Telemetry as Observability Library
Introduction to Open  Telemetry as Observability LibraryIntroduction to Open  Telemetry as Observability Library
Introduction to Open Telemetry as Observability Library
Tonny Adhi Sabastian
 
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
 
OpenTelemetry For Operators
OpenTelemetry For OperatorsOpenTelemetry For Operators
OpenTelemetry For Operators
Kevin Brockhoff
 
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
 
OpenTelemetry Introduction
OpenTelemetry Introduction OpenTelemetry Introduction
OpenTelemetry Introduction
DimitrisFinas1
 
Observability
ObservabilityObservability
Observability
Diego Pacheco
 
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
 
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
 
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...
Tonny Adhi Sabastian
 
OpenTelemetry For Developers
OpenTelemetry For DevelopersOpenTelemetry For Developers
OpenTelemetry For Developers
Kevin Brockhoff
 
Observability, Distributed Tracing, and Open Source: The Missing Primer
Observability, Distributed Tracing, and Open Source: The Missing PrimerObservability, Distributed Tracing, and Open Source: The Missing Primer
Observability, Distributed Tracing, and Open Source: The Missing Primer
VMware Tanzu
 
Application Performance Monitoring with OpenTelemetry
Application Performance Monitoring with OpenTelemetryApplication Performance Monitoring with OpenTelemetry
Application Performance Monitoring with OpenTelemetry
Jan Mikeš
 
stackconf 2023 | Practical introduction to OpenTelemetry tracing by Nicolas F...
stackconf 2023 | Practical introduction to OpenTelemetry tracing by Nicolas F...stackconf 2023 | Practical introduction to OpenTelemetry tracing by Nicolas F...
stackconf 2023 | Practical introduction to OpenTelemetry tracing by Nicolas F...
NETWAYS
 
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
Chandresh Pancholi
 
Prometheus 101
Prometheus 101Prometheus 101
Prometheus 101
Paul Podolny
 
Introduction to Grafana Loki
Introduction to Grafana LokiIntroduction to Grafana Loki
Introduction to Grafana Loki
Julien Pivotto
 
Go Observability (in practice)
Go Observability (in practice)Go Observability (in practice)
Go Observability (in practice)
Eran Levy
 
Monitoring Kubernetes with Prometheus
Monitoring Kubernetes with PrometheusMonitoring Kubernetes with Prometheus
Monitoring Kubernetes with Prometheus
Grafana Labs
 

What's hot (20)

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)
 
Introduction to Open Telemetry as Observability Library
Introduction to Open  Telemetry as Observability LibraryIntroduction to Open  Telemetry as Observability Library
Introduction to Open Telemetry as Observability Library
 
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
 
OpenTelemetry For Operators
OpenTelemetry For OperatorsOpenTelemetry For Operators
OpenTelemetry For Operators
 
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
 
OpenTelemetry Introduction
OpenTelemetry Introduction OpenTelemetry Introduction
OpenTelemetry Introduction
 
Observability
ObservabilityObservability
Observability
 
Kubernetes Observability with Prometheus by Example
Kubernetes Observability with Prometheus by ExampleKubernetes Observability with Prometheus by Example
Kubernetes Observability with Prometheus by Example
 
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...
 
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 For Developers
OpenTelemetry For DevelopersOpenTelemetry For Developers
OpenTelemetry For Developers
 
Observability, Distributed Tracing, and Open Source: The Missing Primer
Observability, Distributed Tracing, and Open Source: The Missing PrimerObservability, Distributed Tracing, and Open Source: The Missing Primer
Observability, Distributed Tracing, and Open Source: The Missing Primer
 
Application Performance Monitoring with OpenTelemetry
Application Performance Monitoring with OpenTelemetryApplication Performance Monitoring with OpenTelemetry
Application Performance Monitoring with OpenTelemetry
 
stackconf 2023 | Practical introduction to OpenTelemetry tracing by Nicolas F...
stackconf 2023 | Practical introduction to OpenTelemetry tracing by Nicolas F...stackconf 2023 | Practical introduction to OpenTelemetry tracing by Nicolas F...
stackconf 2023 | Practical introduction to OpenTelemetry tracing by Nicolas F...
 
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
 
Prometheus 101
Prometheus 101Prometheus 101
Prometheus 101
 
Introduction to Grafana Loki
Introduction to Grafana LokiIntroduction to Grafana Loki
Introduction to Grafana Loki
 
Go Observability (in practice)
Go Observability (in practice)Go Observability (in practice)
Go Observability (in practice)
 
Monitoring Kubernetes with Prometheus
Monitoring Kubernetes with PrometheusMonitoring Kubernetes with Prometheus
Monitoring Kubernetes with Prometheus
 

Similar to KCD-OpenTelemetry.pdf

Opencensus with prometheus and kubernetes
Opencensus with prometheus and kubernetesOpencensus with prometheus and kubernetes
Opencensus with prometheus and kubernetes
Jinwoong Kim
 
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
 
OpenTelemetry 101 FTW
OpenTelemetry 101 FTWOpenTelemetry 101 FTW
OpenTelemetry 101 FTW
NGINX, Inc.
 
Docker Monitoring Webinar
Docker Monitoring  WebinarDocker Monitoring  Webinar
Docker Monitoring Webinar
Sematext Group, Inc.
 
OpenTelemetry: The future (present) of Observability
OpenTelemetry: The future (present) of ObservabilityOpenTelemetry: The future (present) of Observability
OpenTelemetry: The future (present) of Observability
Gustavo Corrêa Alves
 
OpenCensus with Prometheus and Kubernetes
OpenCensus with Prometheus and KubernetesOpenCensus with Prometheus and Kubernetes
OpenCensus with Prometheus and Kubernetes
Jinwoong Kim
 
CodeChecker summary 21062021
CodeChecker summary 21062021CodeChecker summary 21062021
CodeChecker summary 21062021
Olivera Milenkovic
 
Implementing Observability for Kubernetes.pdf
Implementing Observability for Kubernetes.pdfImplementing Observability for Kubernetes.pdf
Implementing Observability for Kubernetes.pdf
Jose Manuel Ortega Candel
 
Swift profiling middleware and tools
Swift profiling middleware and toolsSwift profiling middleware and tools
Swift profiling middleware and tools
zhang hua
 
Measuring P99 Latency in Event-Driven Architectures with OpenTelemetry
Measuring P99 Latency in Event-Driven Architectures with OpenTelemetryMeasuring P99 Latency in Event-Driven Architectures with OpenTelemetry
Measuring P99 Latency in Event-Driven Architectures with OpenTelemetry
ScyllaDB
 
Building a data pipeline to ingest data into Hadoop in minutes using Streamse...
Building a data pipeline to ingest data into Hadoop in minutes using Streamse...Building a data pipeline to ingest data into Hadoop in minutes using Streamse...
Building a data pipeline to ingest data into Hadoop in minutes using Streamse...
Guglielmo Iozzia
 
Logitoring - log-driven monitoring and the Rocket science
Logitoring - log-driven monitoring and the Rocket scienceLogitoring - log-driven monitoring and the Rocket science
Logitoring - log-driven monitoring and the Rocket science
EDS Systems
 
Building an Observability Platform in 389 Difficult Steps
Building an Observability Platform in 389 Difficult StepsBuilding an Observability Platform in 389 Difficult Steps
Building an Observability Platform in 389 Difficult Steps
DigitalOcean
 
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
NGINX, Inc.
 
Herding cats & catching fire: Workday's telemetry & middleware
Herding cats & catching fire: Workday's telemetry & middlewareHerding cats & catching fire: Workday's telemetry & middleware
Herding cats & catching fire: Workday's telemetry & middleware
Sensu Inc.
 
Lcu14 101- coresight overview
Lcu14 101- coresight overviewLcu14 101- coresight overview
Lcu14 101- coresight overview
Linaro
 
Kapacitor - Real Time Data Processing Engine
Kapacitor - Real Time Data Processing EngineKapacitor - Real Time Data Processing Engine
Kapacitor - Real Time Data Processing Engine
Prashant Vats
 
Tech Talk: ONOS- A Distributed SDN Network Operating System
Tech Talk: ONOS- A Distributed SDN Network Operating SystemTech Talk: ONOS- A Distributed SDN Network Operating System
Tech Talk: ONOS- A Distributed SDN Network Operating System
nvirters
 
ORTE - OCERA Real Time ethernet
ORTE - OCERA Real Time ethernetORTE - OCERA Real Time ethernet
ORTE - OCERA Real Time ethernet
Alexandre Chatiron
 
Improving monitoring systems Interoperability with OpenMetrics
Improving monitoring systems Interoperability with OpenMetricsImproving monitoring systems Interoperability with OpenMetrics
Improving monitoring systems Interoperability with OpenMetrics
Chan Shik Lim
 

Similar to KCD-OpenTelemetry.pdf (20)

Opencensus with prometheus and kubernetes
Opencensus with prometheus and kubernetesOpencensus with prometheus and kubernetes
Opencensus with prometheus and kubernetes
 
Tracing-for-fun-and-profit.pptx
Tracing-for-fun-and-profit.pptxTracing-for-fun-and-profit.pptx
Tracing-for-fun-and-profit.pptx
 
OpenTelemetry 101 FTW
OpenTelemetry 101 FTWOpenTelemetry 101 FTW
OpenTelemetry 101 FTW
 
Docker Monitoring Webinar
Docker Monitoring  WebinarDocker Monitoring  Webinar
Docker Monitoring Webinar
 
OpenTelemetry: The future (present) of Observability
OpenTelemetry: The future (present) of ObservabilityOpenTelemetry: The future (present) of Observability
OpenTelemetry: The future (present) of Observability
 
OpenCensus with Prometheus and Kubernetes
OpenCensus with Prometheus and KubernetesOpenCensus with Prometheus and Kubernetes
OpenCensus with Prometheus and Kubernetes
 
CodeChecker summary 21062021
CodeChecker summary 21062021CodeChecker summary 21062021
CodeChecker summary 21062021
 
Implementing Observability for Kubernetes.pdf
Implementing Observability for Kubernetes.pdfImplementing Observability for Kubernetes.pdf
Implementing Observability for Kubernetes.pdf
 
Swift profiling middleware and tools
Swift profiling middleware and toolsSwift profiling middleware and tools
Swift profiling middleware and tools
 
Measuring P99 Latency in Event-Driven Architectures with OpenTelemetry
Measuring P99 Latency in Event-Driven Architectures with OpenTelemetryMeasuring P99 Latency in Event-Driven Architectures with OpenTelemetry
Measuring P99 Latency in Event-Driven Architectures with OpenTelemetry
 
Building a data pipeline to ingest data into Hadoop in minutes using Streamse...
Building a data pipeline to ingest data into Hadoop in minutes using Streamse...Building a data pipeline to ingest data into Hadoop in minutes using Streamse...
Building a data pipeline to ingest data into Hadoop in minutes using Streamse...
 
Logitoring - log-driven monitoring and the Rocket science
Logitoring - log-driven monitoring and the Rocket scienceLogitoring - log-driven monitoring and the Rocket science
Logitoring - log-driven monitoring and the Rocket science
 
Building an Observability Platform in 389 Difficult Steps
Building an Observability Platform in 389 Difficult StepsBuilding an Observability Platform in 389 Difficult Steps
Building an Observability Platform in 389 Difficult Steps
 
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
 
Herding cats & catching fire: Workday's telemetry & middleware
Herding cats & catching fire: Workday's telemetry & middlewareHerding cats & catching fire: Workday's telemetry & middleware
Herding cats & catching fire: Workday's telemetry & middleware
 
Lcu14 101- coresight overview
Lcu14 101- coresight overviewLcu14 101- coresight overview
Lcu14 101- coresight overview
 
Kapacitor - Real Time Data Processing Engine
Kapacitor - Real Time Data Processing EngineKapacitor - Real Time Data Processing Engine
Kapacitor - Real Time Data Processing Engine
 
Tech Talk: ONOS- A Distributed SDN Network Operating System
Tech Talk: ONOS- A Distributed SDN Network Operating SystemTech Talk: ONOS- A Distributed SDN Network Operating System
Tech Talk: ONOS- A Distributed SDN Network Operating System
 
ORTE - OCERA Real Time ethernet
ORTE - OCERA Real Time ethernetORTE - OCERA Real Time ethernet
ORTE - OCERA Real Time ethernet
 
Improving monitoring systems Interoperability with OpenMetrics
Improving monitoring systems Interoperability with OpenMetricsImproving monitoring systems Interoperability with OpenMetrics
Improving monitoring systems Interoperability with OpenMetrics
 

Recently uploaded

Hyperledger Besu 빨리 따라하기 (Private Networks)
Hyperledger Besu 빨리 따라하기 (Private Networks)Hyperledger Besu 빨리 따라하기 (Private Networks)
Hyperledger Besu 빨리 따라하기 (Private Networks)
wonyong hwang
 
DECODING JAVA THREAD DUMPS: MASTER THE ART OF ANALYSIS
DECODING JAVA THREAD DUMPS: MASTER THE ART OF ANALYSISDECODING JAVA THREAD DUMPS: MASTER THE ART OF ANALYSIS
DECODING JAVA THREAD DUMPS: MASTER THE ART OF ANALYSIS
Tier1 app
 
Going AOT: Everything you need to know about GraalVM for Java applications
Going AOT: Everything you need to know about GraalVM for Java applicationsGoing AOT: Everything you need to know about GraalVM for Java applications
Going AOT: Everything you need to know about GraalVM for Java applications
Alina Yurenko
 
Flutter vs. React Native: A Detailed Comparison for App Development in 2024
Flutter vs. React Native: A Detailed Comparison for App Development in 2024Flutter vs. React Native: A Detailed Comparison for App Development in 2024
Flutter vs. React Native: A Detailed Comparison for App Development in 2024
dhavalvaghelanectarb
 
Boost Your Savings with These Money Management Apps
Boost Your Savings with These Money Management AppsBoost Your Savings with These Money Management Apps
Boost Your Savings with These Money Management Apps
Jhone kinadey
 
TheFutureIsDynamic-BoxLang-CFCamp2024.pdf
TheFutureIsDynamic-BoxLang-CFCamp2024.pdfTheFutureIsDynamic-BoxLang-CFCamp2024.pdf
TheFutureIsDynamic-BoxLang-CFCamp2024.pdf
Ortus Solutions, Corp
 
Safelyio Toolbox Talk Softwate & App (How To Digitize Safety Meetings)
Safelyio Toolbox Talk Softwate & App (How To Digitize Safety Meetings)Safelyio Toolbox Talk Softwate & App (How To Digitize Safety Meetings)
Safelyio Toolbox Talk Softwate & App (How To Digitize Safety Meetings)
safelyiotech
 
一比一原版(sdsu毕业证书)圣地亚哥州立大学毕业证如何办理
一比一原版(sdsu毕业证书)圣地亚哥州立大学毕业证如何办理一比一原版(sdsu毕业证书)圣地亚哥州立大学毕业证如何办理
一比一原版(sdsu毕业证书)圣地亚哥州立大学毕业证如何办理
kgyxske
 
Secure-by-Design Using Hardware and Software Protection for FDA Compliance
Secure-by-Design Using Hardware and Software Protection for FDA ComplianceSecure-by-Design Using Hardware and Software Protection for FDA Compliance
Secure-by-Design Using Hardware and Software Protection for FDA Compliance
ICS
 
42 Ways to Generate Real Estate Leads - Sellxpert
42 Ways to Generate Real Estate Leads - Sellxpert42 Ways to Generate Real Estate Leads - Sellxpert
42 Ways to Generate Real Estate Leads - Sellxpert
vaishalijagtap12
 
The Power of Visual Regression Testing_ Why It Is Critical for Enterprise App...
The Power of Visual Regression Testing_ Why It Is Critical for Enterprise App...The Power of Visual Regression Testing_ Why It Is Critical for Enterprise App...
The Power of Visual Regression Testing_ Why It Is Critical for Enterprise App...
kalichargn70th171
 
Operational ease MuleSoft and Salesforce Service Cloud Solution v1.0.pptx
Operational ease MuleSoft and Salesforce Service Cloud Solution v1.0.pptxOperational ease MuleSoft and Salesforce Service Cloud Solution v1.0.pptx
Operational ease MuleSoft and Salesforce Service Cloud Solution v1.0.pptx
sandeepmenon62
 
How GenAI Can Improve Supplier Performance Management.pdf
How GenAI Can Improve Supplier Performance Management.pdfHow GenAI Can Improve Supplier Performance Management.pdf
How GenAI Can Improve Supplier Performance Management.pdf
Zycus
 
Hands-on with Apache Druid: Installation & Data Ingestion Steps
Hands-on with Apache Druid: Installation & Data Ingestion StepsHands-on with Apache Druid: Installation & Data Ingestion Steps
Hands-on with Apache Druid: Installation & Data Ingestion Steps
servicesNitor
 
🏎️Tech Transformation: DevOps Insights from the Experts 👩‍💻
🏎️Tech Transformation: DevOps Insights from the Experts 👩‍💻🏎️Tech Transformation: DevOps Insights from the Experts 👩‍💻
🏎️Tech Transformation: DevOps Insights from the Experts 👩‍💻
campbellclarkson
 
The Role of DevOps in Digital Transformation.pdf
The Role of DevOps in Digital Transformation.pdfThe Role of DevOps in Digital Transformation.pdf
The Role of DevOps in Digital Transformation.pdf
mohitd6
 
Refactoring legacy systems using events commands and bubble contexts
Refactoring legacy systems using events commands and bubble contextsRefactoring legacy systems using events commands and bubble contexts
Refactoring legacy systems using events commands and bubble contexts
Michał Kurzeja
 
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
 
Penify - Let AI do the Documentation, you write the Code.
Penify - Let AI do the Documentation, you write the Code.Penify - Let AI do the Documentation, you write the Code.
Penify - Let AI do the Documentation, you write the Code.
KrishnaveniMohan1
 
Building API data products on top of your real-time data infrastructure
Building API data products on top of your real-time data infrastructureBuilding API data products on top of your real-time data infrastructure
Building API data products on top of your real-time data infrastructure
confluent
 

Recently uploaded (20)

Hyperledger Besu 빨리 따라하기 (Private Networks)
Hyperledger Besu 빨리 따라하기 (Private Networks)Hyperledger Besu 빨리 따라하기 (Private Networks)
Hyperledger Besu 빨리 따라하기 (Private Networks)
 
DECODING JAVA THREAD DUMPS: MASTER THE ART OF ANALYSIS
DECODING JAVA THREAD DUMPS: MASTER THE ART OF ANALYSISDECODING JAVA THREAD DUMPS: MASTER THE ART OF ANALYSIS
DECODING JAVA THREAD DUMPS: MASTER THE ART OF ANALYSIS
 
Going AOT: Everything you need to know about GraalVM for Java applications
Going AOT: Everything you need to know about GraalVM for Java applicationsGoing AOT: Everything you need to know about GraalVM for Java applications
Going AOT: Everything you need to know about GraalVM for Java applications
 
Flutter vs. React Native: A Detailed Comparison for App Development in 2024
Flutter vs. React Native: A Detailed Comparison for App Development in 2024Flutter vs. React Native: A Detailed Comparison for App Development in 2024
Flutter vs. React Native: A Detailed Comparison for App Development in 2024
 
Boost Your Savings with These Money Management Apps
Boost Your Savings with These Money Management AppsBoost Your Savings with These Money Management Apps
Boost Your Savings with These Money Management Apps
 
TheFutureIsDynamic-BoxLang-CFCamp2024.pdf
TheFutureIsDynamic-BoxLang-CFCamp2024.pdfTheFutureIsDynamic-BoxLang-CFCamp2024.pdf
TheFutureIsDynamic-BoxLang-CFCamp2024.pdf
 
Safelyio Toolbox Talk Softwate & App (How To Digitize Safety Meetings)
Safelyio Toolbox Talk Softwate & App (How To Digitize Safety Meetings)Safelyio Toolbox Talk Softwate & App (How To Digitize Safety Meetings)
Safelyio Toolbox Talk Softwate & App (How To Digitize Safety Meetings)
 
一比一原版(sdsu毕业证书)圣地亚哥州立大学毕业证如何办理
一比一原版(sdsu毕业证书)圣地亚哥州立大学毕业证如何办理一比一原版(sdsu毕业证书)圣地亚哥州立大学毕业证如何办理
一比一原版(sdsu毕业证书)圣地亚哥州立大学毕业证如何办理
 
Secure-by-Design Using Hardware and Software Protection for FDA Compliance
Secure-by-Design Using Hardware and Software Protection for FDA ComplianceSecure-by-Design Using Hardware and Software Protection for FDA Compliance
Secure-by-Design Using Hardware and Software Protection for FDA Compliance
 
42 Ways to Generate Real Estate Leads - Sellxpert
42 Ways to Generate Real Estate Leads - Sellxpert42 Ways to Generate Real Estate Leads - Sellxpert
42 Ways to Generate Real Estate Leads - Sellxpert
 
The Power of Visual Regression Testing_ Why It Is Critical for Enterprise App...
The Power of Visual Regression Testing_ Why It Is Critical for Enterprise App...The Power of Visual Regression Testing_ Why It Is Critical for Enterprise App...
The Power of Visual Regression Testing_ Why It Is Critical for Enterprise App...
 
Operational ease MuleSoft and Salesforce Service Cloud Solution v1.0.pptx
Operational ease MuleSoft and Salesforce Service Cloud Solution v1.0.pptxOperational ease MuleSoft and Salesforce Service Cloud Solution v1.0.pptx
Operational ease MuleSoft and Salesforce Service Cloud Solution v1.0.pptx
 
How GenAI Can Improve Supplier Performance Management.pdf
How GenAI Can Improve Supplier Performance Management.pdfHow GenAI Can Improve Supplier Performance Management.pdf
How GenAI Can Improve Supplier Performance Management.pdf
 
Hands-on with Apache Druid: Installation & Data Ingestion Steps
Hands-on with Apache Druid: Installation & Data Ingestion StepsHands-on with Apache Druid: Installation & Data Ingestion Steps
Hands-on with Apache Druid: Installation & Data Ingestion Steps
 
🏎️Tech Transformation: DevOps Insights from the Experts 👩‍💻
🏎️Tech Transformation: DevOps Insights from the Experts 👩‍💻🏎️Tech Transformation: DevOps Insights from the Experts 👩‍💻
🏎️Tech Transformation: DevOps Insights from the Experts 👩‍💻
 
The Role of DevOps in Digital Transformation.pdf
The Role of DevOps in Digital Transformation.pdfThe Role of DevOps in Digital Transformation.pdf
The Role of DevOps in Digital Transformation.pdf
 
Refactoring legacy systems using events commands and bubble contexts
Refactoring legacy systems using events commands and bubble contextsRefactoring legacy systems using events commands and bubble contexts
Refactoring legacy systems using events commands and bubble contexts
 
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.
 
Penify - Let AI do the Documentation, you write the Code.
Penify - Let AI do the Documentation, you write the Code.Penify - Let AI do the Documentation, you write the Code.
Penify - Let AI do the Documentation, you write the Code.
 
Building API data products on top of your real-time data infrastructure
Building API data products on top of your real-time data infrastructureBuilding API data products on top of your real-time data infrastructure
Building API data products on top of your real-time data infrastructure
 

KCD-OpenTelemetry.pdf

  • 1. Best Practices for Observability with OpenTelemetry Rui Liu liurui@cn.ibm.com
  • 2. OpenTelemetry conceptions 01 OpenTelemetry Collector 03 Automatic & manual instrumentation 02 Content Deployment considerations 04
  • 4. A survey showing that more and more system owners tend to use OpenTelemetry to collect data
  • 5. What is OpenTelemetry (OTel) OpenTelemetry is an open-source project and unified standard for service instrumentation, or a way of measuring performance. Sponsored by the CNCF, it replaces OpenTracing and OpenCensus. + OpenCensus Traces Metrics Logs API for each language SDK for each language Infrastructure Collector, “agent” for auto-instrumentation… Interop formats OTLP, W3C trace-context…
  • 6. OpenTelemetry (OTel) Architecture the industry standard to collector telemetry data for observability vendors Client API SDK Exporter Collector Receivers OTLP Prometheus Jaeger … … Processors Filling Sampling Enriching … … Exporters OTLP Prometheus Jaeger … … Instana Dynatrace Datadog … … Prometheus Jaeger … … Observability vendors What does OTel mean to end users or system owners • Standard and compatibility • Avoid vendor lock-in and easy migration • Can enable different vendors work together • A standard way to enhance the observability of their systems What does OTel mean to Observability vendors • Easier to get telemetry data from open community and customers • Easier to lose customers if their observability backend is not competitive enough • It is not likely for OTel to replace all APM agents but it will become the most popular way for apps and micro-services to become observable. Notes • OTel code is still a little complex so that It is not likely for all apps to have built-in OTel support in near future.
  • 7. Conceptions of 3 signal types of OpenTelemetry Note: New signal of Profiling data is now under design… ● Context: W3C trace-context, B3, etc. ● Tracer: get context ● Spans: “call” in a trace ○ Kind: client/server, producer/consumer, internal ○ Attributes: key/value pairs ○ Events: named strings ○ Links: useful for batch operations ● Sampler: always, probabilistic, etc. ● Span processor: simple, batch, etc. ● Exporter: OTLP, Jaeger, etc. Traces ● Meter: used to record a measurement ● Metric: a measurement ○ Kind: Counter, UpDownCounter, Gauge, Histogram, Summary ○ Label: key/value pair ○ Data point ● Exporter: OTLP, Prometheus, etc. Metrics ● Use Collector or Appenders for integration. ● Log model: ○ LogRecord: time, severity, name, body, attributes, TraceId, SpanId… Logs ● Immutable Attributes ● Detecting resource information from the environment ● Specifying resource information via an environment variable ○ OTEL_RESOURCE_ATTRIBUTES Resources
  • 8. Semantic conventions Note: OpenTelemetry has adopted ECS (OpenTelemetry Semantic Convention) to be part of its own Semantic Conventions. ● https://opentelemetry.io/docs/reference/specification/trace/s emantic_conventions/ ● Examples: ○ peer.service ○ messaging.system Traces ● https://opentelemetry.io/docs/reference/specification/metric s/semantic_conventions/ ● Examples: ○ system.cpu.time ○ system.cpu.utilization ○ system.memory.usage ○ … Metrics ● https://opentelemetry.io/docs/reference/specification/logs/s emantic_conventions/ ● Examples: ○ log.file.name Logs ● https://opentelemetry.io/docs/reference/specification/resou rce/semantic_conventions/ ● Examples: ○ service.name ○ host.id Resources
  • 9. Automatic & manual instrumentation Part 02
  • 10. Solutions of automatic instrumentation for different languages Language Support? Solution Java Yes Java Agent Python Yes Python agent .Net Yes .NET Profiler Javacript Yes Preloaded module GoLang Yes(Beta) eBPF PHP Yes(At least PHP 8.0) the OpenTelemetry PHP extension Ruby minor global code changes use the opentelemetry-instrumentation-all package C++ N/A Manu-instrumentation, vcpkg Rust N/A Manu-instrumentation Note: OpenTelemetry Operator supports convenient auto-instrumentation installation in Kubernetes environments.
  • 11. Example of Java auto-instrumentation Example-1 for Java export JAVA_OPTS="-javaagent:/opt/dev/otel/res/opentelemetry- javaagent.jar" export OTEL_TRACES_EXPORTER=logging export OTEL_METRICS_EXPORTER=logging export OTEL_LOGS_EXPORTER=logging Example-2 for Java export JAVA_OPTS="-javaagent:/opt/dev/otel/res/opentelemetry-javaagent.jar" export OTEL_TRACES_EXPORTER=otlp export OTEL_METRICS_EXPORTER=none export OTEL_LOGS_EXPORTER=none export OTEL_EXPORTER_OTLP_TRACES_ENDPOINT="https://otlp-orange- saas.instana.io:4317" export OTEL_SERVICE_NAME=lr1service export OTEL_EXPORTER_OTLP_PROTOCOL=grpc export OTEL_EXPORTER_OTLP_HEADERS="x-instana-key=xxxxxxxxx,x-instana- host=dk-liurui"
  • 12. Example of Java manual-instrumentation Initialization Instrumentation for traces
  • 14. Configuration of OTel Collector ❖ Key Components of OTel Collector: ➢ Receivers ➢ Processors ➢ Exporters ➢ Connector (new) ❖ Types of collector: ➢ Core Collector ➢ Contrib Collector ➢ Custom Collector ❖ Releases and deployments ➢ Binary ➢ Container based
  • 15. Another example of collector configuration
  • 16. Best practice to use OpenTelemetry Collector ❖ Key points: ➢ Collectors can be chained ➢ Receiver instance can be shared ➢ Processor instance cannot be shared ➢ Exporter instance can be shared ➢ Use Connector can build complex stream flows within a single Collector. ❖ Some popular components of Collector: ➢ Receivers ~ 91 otlp, filelog, hostmetric, prometheus, jaeger… ➢ Processors ~ 25 batch, filter, resourcedetection, spanmetrics, transform, probabilisticsampler… ➢ Exporters ~ 49 otlp, otlphttp, prometheus, jaeger, logging, file… ➢ Connectors ~ 5 forward, spanmetrics, count
  • 18. Deployments of OpenTelemetry • With Binary OpenTelemetry Collector – for example for the usage of host metrics receiver… • With Container based OpenTelemetry Collector – optionally using docker compose. • Enable OpenTelemetry in Kubernetes • Deploy OpenTelemetry Collector with built-in Kubernetes components (deployments or daemonset, service, configmap…), optionally using Helm chart. • Using OpenTelemetry Operator • Have built-in OpenTelemetry Collector • Support auto-instrumentation (inject sidecar into workloads with predefined annotation) for Java, Python, .Net, NodeJS, GoLang…
  • 19. An example of deployment using OTel operator