SlideShare a Scribd company logo
Observability in Java:
Getting Started with
OpenTelemetry
Katy Farmer, Developer Advocate & Ted Young, Director of Open Source Development
1
2
Hi! I’m Katy.
Katy Farmer
Developer Relations Manager
3
Hi! I’m Ted.
Ted Young
Director of Open Source Development
Yes
No
No but considering it
Poll:
Do you currently use
distributed tracing?
What Is
Observability?
5
6
7
● the ability to navigate from effect to cause
Observability (n)
For example…
Spike in errors → misconfiguration
Increased latency → new customer behavior
User complaints → upstream service deployed
8
How Did We
Get Here?
What Changed For Developers?
9
What Changed?
10
SCALE!
11
SCALE!
12
What is a
Deep System?
e.g., mobile, react, client APis
e.g., ingress controller
e.g., custom microservices
e.g., managed services
like DynamoDB
Independently
Managed
Layers
Too many tools and tool training
Service dependency visibility
Performance incidents
Deployments
Poll:
What is your biggest pain point
for monitoring performance?
14
Say hi to OpenTelemetry
OpenTelemetry provides a single set
of APIs, libraries, agents, and collector
services to capture distributed traces
and metrics from your application.
https://opentelemetry.io/
15
Context Propagation
Follow the transaction
● At scale, it is impossible to find the
relevant data. Too much noise.
● To investigate an issue, events and
metrics must first be contextualized.
○ Grouped by transaction
○ Grouped by resource
○ Grounded by product attributes
● Adding this context is a lot of work!
● OpenTelemetry does it for you.
Single Transaction
Context propagation is fundamental!
16
Java Setup
Docs here!
17
18
Requirements
● Java 7+
Steps
● Install OpenTelemetry
● Install Instrumentation Adapters
● Configure the SDK
● Decorate your application code
Java Setup
java -javaagent:path/to/opentelemetry-auto-0.2.0.jar 
-Dota.exporter.jar=path/to/opentelemetry-auto-exporters-otlp-0.2.0.jar 
-Dota.exporter.otlp.endpoint=localhost:55678 
-jar myapp.jar
Java Auto Installation
19
README: https://github.com/open-telemetry/opentelemetry-auto-instr-java
Library Adapters
20
● gRPC
● Hibernate
● HttpURLConnection
● Hystrix
● java.util.logging
● JAX-RS
● JDBC
● Jedis
● Jetty
● JMS
● JSP
● Kafka
● Lettuce
● Akka HTTP
● Apache HttpAsyncClient
● Apache HttpClient
● AWS SDK
● Cassandra Driver
● Couchbase Client
● Dropwizard Views
● Elasticsearch API
● Elasticsearch REST Client
● Finatra
● Geode Client
● Google HTTP Client
● Grizzly
● Log4j
● Logback
● MongoDB Drivers
● Netty
● OkHttp
● Play
● Play WS
● Project Reactor
● RabbitMQ Client
● Ratpack
● RMI
● RxJava
● Servlet
● Spark Web Framework
● Spring Data
● Spring Scheduling
● Spring Servlet MVC
● Spring Webflux
● Spymemcached
● Twilio
Find out what’s currently available by checking the registry: https://opentelemetry.io/registry/
Warning! Lightstep does not use sampling. Leave OpenTelemetry sampling
disabled.
SDK Configuration
21
Propagator Options
● W3C
● B3
● Lightstep (deprecated)
Exporter Options
● Lightstep
● OTLP
● Jaeger
● Console (debug)
Span span =
tracer.spanBuilder("/resource/path").setSpanKind(Span.Kind.CLIENT).startSpan();
span.setAttribute("http.method", "GET");
span.setAttribute("http.url", url.toString());
Map<String, AttributeValue> eventAttributes = new HashMap<>();
eventAttributes.put("key", AttributeValue.stringAttributeValue("value"));
eventAttributes.put("result", AttributeValue.longAttributeValue(0L));
span.addEvent("Event Name", eventAttributes);
Application Code
22
Further instrument your application code using the OpenTelemetry APIs: https://github.com/open-
telemetry/opentelemetry-java/blob/master/QUICKSTART.md
Exploring Trace Data
23
The right
observability solution
● Easily be able to see and understand
your highly distributed environment
● Immediately pinpoint performance
regression
● Enable developers to ship with
confidence
● Enable easy sharing of information
● Keep context
● Won’t miss an insight
24
LightStep:
Observability
with context
● Automatic deployment and
regression detection
● System and service diagrams
● Real-time and historical root cause
analysis
● Correlations
● Custom alerting
● Easy Setup with no vendor lock-in
● No cardinality limitations, really
25
Get Started Today
lightstep.com/play
27

More Related Content

PPTX
OpenTelemetry For Architects
PDF
Opentelemetry - From frontend to backend
PPTX
OpenTelemetry For Operators
PPTX
OpenTelemetry For Developers
PPTX
THE STATE OF OPENTELEMETRY, DOTAN HOROVITS, Logz.io
PDF
Observability, Distributed Tracing, and Open Source: The Missing Primer
PDF
OpenTelemetry Introduction
PDF
The Patterns of Distributed Logging and Containers
OpenTelemetry For Architects
Opentelemetry - From frontend to backend
OpenTelemetry For Operators
OpenTelemetry For Developers
THE STATE OF OPENTELEMETRY, DOTAN HOROVITS, Logz.io
Observability, Distributed Tracing, and Open Source: The Missing Primer
OpenTelemetry Introduction
The Patterns of Distributed Logging and Containers

What's hot (20)

PDF
Monitoring Kubernetes with Prometheus
PDF
Building a Streaming Microservice Architecture: with Apache Spark Structured ...
PPTX
Adopting OpenTelemetry
PPTX
Room 2 - 4 - Juncheng Anthony Lin - Redhat - A Practical Approach to Traditio...
PDF
Deep Dive into Building Streaming Applications with Apache Pulsar
PDF
Getting Started Monitoring with Prometheus and Grafana
PDF
Grafana introduction
PDF
OSMC 2022 | OpenTelemetry 101 by Dotan Horovit s.pdf
PPTX
Monitoring With Prometheus
PPTX
Prometheus and Grafana
PDF
Cloud-Native Observability
PDF
Open shift 4 infra deep dive
PDF
Embracing Observability in CI/CD with OpenTelemetry
PPTX
Grafana
PDF
Introducing the Apache Flink Kubernetes Operator
PDF
Handle Large Messages In Apache Kafka
PDF
Kubernetes Networking
PDF
Meetup OpenTelemetry Intro
PDF
Kubernetes Basics
PDF
Elastic Observability keynote
Monitoring Kubernetes with Prometheus
Building a Streaming Microservice Architecture: with Apache Spark Structured ...
Adopting OpenTelemetry
Room 2 - 4 - Juncheng Anthony Lin - Redhat - A Practical Approach to Traditio...
Deep Dive into Building Streaming Applications with Apache Pulsar
Getting Started Monitoring with Prometheus and Grafana
Grafana introduction
OSMC 2022 | OpenTelemetry 101 by Dotan Horovit s.pdf
Monitoring With Prometheus
Prometheus and Grafana
Cloud-Native Observability
Open shift 4 infra deep dive
Embracing Observability in CI/CD with OpenTelemetry
Grafana
Introducing the Apache Flink Kubernetes Operator
Handle Large Messages In Apache Kafka
Kubernetes Networking
Meetup OpenTelemetry Intro
Kubernetes Basics
Elastic Observability keynote
Ad

Similar to Observability in Java: Getting Started with OpenTelemetry (20)

PPTX
PDF
Demi Ben-Ari - Monitoring Big Data Systems Done "The Simple Way" - Codemotion...
PDF
Monitoring Big Data Systems Done "The Simple Way" - Codemotion Milan 2017 - D...
PDF
Dropwizard
PDF
Monitoring Big Data Systems "Done the simple way" - Demi Ben-Ari - Codemotion...
PDF
Monitoring Big Data Systems Done "The Simple Way" - Demi Ben-Ari - Codemotion...
PDF
Docker. Does it matter for Java developer ?
PDF
Thinking DevOps in the era of the Cloud - Demi Ben-Ari
PDF
Day1 before getting_started
PDF
Node.js Course 2 of 2 - Advanced techniques
PDF
Real time web
PDF
Monitoring Big Data Systems Done "The Simple Way" - Codemotion Berlin 2017
PPTX
OWASP ZAP Workshop for QA Testers
PDF
DevOpsDays Taipei 2019 - Mastering IaC the DevOps Way
PPTX
Your journey into the serverless world
PDF
Dropwizard
PDF
Gatling - Bordeaux JUG
ODP
Cloud Native Java Development Patterns
PDF
PPTX
Comparison between zookeeper, etcd 3 and other distributed coordination systems
Demi Ben-Ari - Monitoring Big Data Systems Done "The Simple Way" - Codemotion...
Monitoring Big Data Systems Done "The Simple Way" - Codemotion Milan 2017 - D...
Dropwizard
Monitoring Big Data Systems "Done the simple way" - Demi Ben-Ari - Codemotion...
Monitoring Big Data Systems Done "The Simple Way" - Demi Ben-Ari - Codemotion...
Docker. Does it matter for Java developer ?
Thinking DevOps in the era of the Cloud - Demi Ben-Ari
Day1 before getting_started
Node.js Course 2 of 2 - Advanced techniques
Real time web
Monitoring Big Data Systems Done "The Simple Way" - Codemotion Berlin 2017
OWASP ZAP Workshop for QA Testers
DevOpsDays Taipei 2019 - Mastering IaC the DevOps Way
Your journey into the serverless world
Dropwizard
Gatling - Bordeaux JUG
Cloud Native Java Development Patterns
Comparison between zookeeper, etcd 3 and other distributed coordination systems
Ad

More from DevOps.com (20)

PDF
Modernizing on IBM Z Made Easier With Open Source Software
PPTX
Comparing Microsoft SQL Server 2019 Performance Across Various Kubernetes Pla...
PPTX
Comparing Microsoft SQL Server 2019 Performance Across Various Kubernetes Pla...
PDF
Next Generation Vulnerability Assessment Using Datadog and Snyk
PPTX
Vulnerability Discovery in the Cloud
PDF
2021 Open Source Governance: Top Ten Trends and Predictions
PDF
A New Year’s Ransomware Resolution
PPTX
Getting Started with Runtime Security on Azure Kubernetes Service (AKS)
PDF
Don't Panic! Effective Incident Response
PDF
Creating a Culture of Chaos: Chaos Engineering Is Not Just Tools, It's Culture
PDF
Role Based Access Controls (RBAC) for SSH and Kubernetes Access with Teleport
PDF
Monitoring Serverless Applications with Datadog
PDF
Deliver your App Anywhere … Publicly or Privately
PPTX
Securing medical apps in the age of covid final
PDF
How to Build a Healthy On-Call Culture
PPTX
The Evolving Role of the Developer in 2021
PDF
Service Mesh: Two Big Words But Do You Need It?
PPTX
Secure Data Sharing in OpenShift Environments
PPTX
How to Govern Identities and Access in Cloud Infrastructure: AppsFlyer Case S...
PDF
Elevate Your Enterprise Python and R AI, ML Software Strategy with Anaconda T...
Modernizing on IBM Z Made Easier With Open Source Software
Comparing Microsoft SQL Server 2019 Performance Across Various Kubernetes Pla...
Comparing Microsoft SQL Server 2019 Performance Across Various Kubernetes Pla...
Next Generation Vulnerability Assessment Using Datadog and Snyk
Vulnerability Discovery in the Cloud
2021 Open Source Governance: Top Ten Trends and Predictions
A New Year’s Ransomware Resolution
Getting Started with Runtime Security on Azure Kubernetes Service (AKS)
Don't Panic! Effective Incident Response
Creating a Culture of Chaos: Chaos Engineering Is Not Just Tools, It's Culture
Role Based Access Controls (RBAC) for SSH and Kubernetes Access with Teleport
Monitoring Serverless Applications with Datadog
Deliver your App Anywhere … Publicly or Privately
Securing medical apps in the age of covid final
How to Build a Healthy On-Call Culture
The Evolving Role of the Developer in 2021
Service Mesh: Two Big Words But Do You Need It?
Secure Data Sharing in OpenShift Environments
How to Govern Identities and Access in Cloud Infrastructure: AppsFlyer Case S...
Elevate Your Enterprise Python and R AI, ML Software Strategy with Anaconda T...

Recently uploaded (20)

PDF
Accuracy of neural networks in brain wave diagnosis of schizophrenia
PDF
Build a system with the filesystem maintained by OSTree @ COSCUP 2025
PPTX
MYSQL Presentation for SQL database connectivity
PPTX
SOPHOS-XG Firewall Administrator PPT.pptx
PPT
“AI and Expert System Decision Support & Business Intelligence Systems”
PDF
TokAI - TikTok AI Agent : The First AI Application That Analyzes 10,000+ Vira...
PDF
Agricultural_Statistics_at_a_Glance_2022_0.pdf
PDF
Machine learning based COVID-19 study performance prediction
PDF
Reach Out and Touch Someone: Haptics and Empathic Computing
PPTX
Spectroscopy.pptx food analysis technology
PDF
Architecting across the Boundaries of two Complex Domains - Healthcare & Tech...
PDF
Advanced methodologies resolving dimensionality complications for autism neur...
PDF
Blue Purple Modern Animated Computer Science Presentation.pdf.pdf
PDF
Electronic commerce courselecture one. Pdf
PDF
Unlocking AI with Model Context Protocol (MCP)
PDF
Video forgery: An extensive analysis of inter-and intra-frame manipulation al...
PPTX
Digital-Transformation-Roadmap-for-Companies.pptx
PDF
Optimiser vos workloads AI/ML sur Amazon EC2 et AWS Graviton
PDF
7 ChatGPT Prompts to Help You Define Your Ideal Customer Profile.pdf
PDF
Profit Center Accounting in SAP S/4HANA, S4F28 Col11
Accuracy of neural networks in brain wave diagnosis of schizophrenia
Build a system with the filesystem maintained by OSTree @ COSCUP 2025
MYSQL Presentation for SQL database connectivity
SOPHOS-XG Firewall Administrator PPT.pptx
“AI and Expert System Decision Support & Business Intelligence Systems”
TokAI - TikTok AI Agent : The First AI Application That Analyzes 10,000+ Vira...
Agricultural_Statistics_at_a_Glance_2022_0.pdf
Machine learning based COVID-19 study performance prediction
Reach Out and Touch Someone: Haptics and Empathic Computing
Spectroscopy.pptx food analysis technology
Architecting across the Boundaries of two Complex Domains - Healthcare & Tech...
Advanced methodologies resolving dimensionality complications for autism neur...
Blue Purple Modern Animated Computer Science Presentation.pdf.pdf
Electronic commerce courselecture one. Pdf
Unlocking AI with Model Context Protocol (MCP)
Video forgery: An extensive analysis of inter-and intra-frame manipulation al...
Digital-Transformation-Roadmap-for-Companies.pptx
Optimiser vos workloads AI/ML sur Amazon EC2 et AWS Graviton
7 ChatGPT Prompts to Help You Define Your Ideal Customer Profile.pdf
Profit Center Accounting in SAP S/4HANA, S4F28 Col11

Observability in Java: Getting Started with OpenTelemetry

  • 1. Observability in Java: Getting Started with OpenTelemetry Katy Farmer, Developer Advocate & Ted Young, Director of Open Source Development 1
  • 2. 2 Hi! I’m Katy. Katy Farmer Developer Relations Manager
  • 3. 3 Hi! I’m Ted. Ted Young Director of Open Source Development
  • 4. Yes No No but considering it Poll: Do you currently use distributed tracing?
  • 6. 6
  • 7. 7 ● the ability to navigate from effect to cause Observability (n) For example… Spike in errors → misconfiguration Increased latency → new customer behavior User complaints → upstream service deployed
  • 8. 8 How Did We Get Here? What Changed For Developers?
  • 12. 12 What is a Deep System? e.g., mobile, react, client APis e.g., ingress controller e.g., custom microservices e.g., managed services like DynamoDB Independently Managed Layers
  • 13. Too many tools and tool training Service dependency visibility Performance incidents Deployments Poll: What is your biggest pain point for monitoring performance?
  • 14. 14 Say hi to OpenTelemetry OpenTelemetry provides a single set of APIs, libraries, agents, and collector services to capture distributed traces and metrics from your application. https://opentelemetry.io/
  • 15. 15 Context Propagation Follow the transaction ● At scale, it is impossible to find the relevant data. Too much noise. ● To investigate an issue, events and metrics must first be contextualized. ○ Grouped by transaction ○ Grouped by resource ○ Grounded by product attributes ● Adding this context is a lot of work! ● OpenTelemetry does it for you. Single Transaction
  • 16. Context propagation is fundamental! 16
  • 18. 18 Requirements ● Java 7+ Steps ● Install OpenTelemetry ● Install Instrumentation Adapters ● Configure the SDK ● Decorate your application code Java Setup
  • 19. java -javaagent:path/to/opentelemetry-auto-0.2.0.jar -Dota.exporter.jar=path/to/opentelemetry-auto-exporters-otlp-0.2.0.jar -Dota.exporter.otlp.endpoint=localhost:55678 -jar myapp.jar Java Auto Installation 19 README: https://github.com/open-telemetry/opentelemetry-auto-instr-java
  • 20. Library Adapters 20 ● gRPC ● Hibernate ● HttpURLConnection ● Hystrix ● java.util.logging ● JAX-RS ● JDBC ● Jedis ● Jetty ● JMS ● JSP ● Kafka ● Lettuce ● Akka HTTP ● Apache HttpAsyncClient ● Apache HttpClient ● AWS SDK ● Cassandra Driver ● Couchbase Client ● Dropwizard Views ● Elasticsearch API ● Elasticsearch REST Client ● Finatra ● Geode Client ● Google HTTP Client ● Grizzly ● Log4j ● Logback ● MongoDB Drivers ● Netty ● OkHttp ● Play ● Play WS ● Project Reactor ● RabbitMQ Client ● Ratpack ● RMI ● RxJava ● Servlet ● Spark Web Framework ● Spring Data ● Spring Scheduling ● Spring Servlet MVC ● Spring Webflux ● Spymemcached ● Twilio Find out what’s currently available by checking the registry: https://opentelemetry.io/registry/
  • 21. Warning! Lightstep does not use sampling. Leave OpenTelemetry sampling disabled. SDK Configuration 21 Propagator Options ● W3C ● B3 ● Lightstep (deprecated) Exporter Options ● Lightstep ● OTLP ● Jaeger ● Console (debug)
  • 22. Span span = tracer.spanBuilder("/resource/path").setSpanKind(Span.Kind.CLIENT).startSpan(); span.setAttribute("http.method", "GET"); span.setAttribute("http.url", url.toString()); Map<String, AttributeValue> eventAttributes = new HashMap<>(); eventAttributes.put("key", AttributeValue.stringAttributeValue("value")); eventAttributes.put("result", AttributeValue.longAttributeValue(0L)); span.addEvent("Event Name", eventAttributes); Application Code 22 Further instrument your application code using the OpenTelemetry APIs: https://github.com/open- telemetry/opentelemetry-java/blob/master/QUICKSTART.md
  • 24. The right observability solution ● Easily be able to see and understand your highly distributed environment ● Immediately pinpoint performance regression ● Enable developers to ship with confidence ● Enable easy sharing of information ● Keep context ● Won’t miss an insight 24
  • 25. LightStep: Observability with context ● Automatic deployment and regression detection ● System and service diagrams ● Real-time and historical root cause analysis ● Correlations ● Custom alerting ● Easy Setup with no vendor lock-in ● No cardinality limitations, really 25