You are on page 1of 28

WHY

DISTRIBUTED
TRACING
MATTERS?
Ronak Banka
ABOUT ME

• Platform Engineering Practice Lead, Temus

• Ex VMware, Pivotal Labs, Rakuten, Ericsson

• Evangelize about Importance of Culture and Empathy in Technology

• Avid Traveler and Travel Hacker

Connect with me on Linkedin


AGENDA

01
WHY 02
WHAT IS 03
DISTRIBUTED DISTRIBUT HOW TRACING
TRACING? ED WORKS & DEMO
TRACING?
WHY DISTRIBUTED
TRACING?
LACK OF VISIBILITY!
WHY HAPPENED?

• Users are Scaling at a Rapid Speed.

• Engineering Organizations are Scaling to Ship Business Value Faster

• Monoliths are getting transformed to Microservices


MICROSERVICES ARCHITECTURE CAN GET
VERY COMPLEX!
With More Complexity, comes more Failure Scenarios!
BUT We have Monitoring in Place!!

WHY Do we even need Tracing based Observability?


Monitoring is about what we Already Know, Observability is
about Answering questions!
How to Answer Some of these Questions?
● If a request failed, where did the errors happen?

● If there is latency in the app, where are the bottlenecks?

● When Processing a request, which all other services are involved and what they did?

● Performance Behaviors

● Root Cause Analysis in case of an Incident?


Distributed Tracing can Answer these Questions!!
WHAT IS DISTRIBUTED
TRACING?
Distributed tracing refers to methods of observing requests as
they propagate through distributed systems

It is also a diagnostic technique that reveals how a set of


services coordinate to handle individual user requests.
CONCEPTS OF TRACING?

• Trace represents an end-to-end request; made up of single or multiple spans

• Span represents work done by a single-service with time intervals and associated metadata;

the building blocks of a trace

• Tags metadata to help contextualize a span


HOW ARE TRACES
CONNECTED?

● Trace Identifier:
trace_id is generated in
the root span and is
immutable.

● Parent Identifier:
span_id of the parent
span that spawned the
current operation

Source: https://blog.sentry.io/distributed-tracing-101-for-full-stack-developers/
CORE FEATURES OF DISTRIBUTED
TRACING
TRACE PROPAGATION SPAN CREATION

PERFORMANCE
TRACE VISUALIZATION
ANALYSIS

ERROR ANALYSIS ROOT CAUSE ANALYSIS

SCALABILITY DEPENDENCY ANALYSIS

CONTEXTUAL LOGGING INTEGRATIONS


APPLICATION
TRACING?
Various Tracing Tools
HOW TO START TRACING APPLICATION
RUNNING ON AWS?

● Using AWS X-Ray Service and SDKs

● Using Open telemetry SDKs with AWS X-Ray or a 3rd


Party Software like Jaeger
WHAT IS AWS X-RAY?

● Collects data about requests and responses


● Provides profiling
● Insight into performance of downstream AWS resources
● Exception collection
WHAT CAN YOU TRACE?
● Lambda and API Gateway: Easy to enable.
● AWS Services: X-Ray SDK automatically instruments all AWS SDKs when module is
added to class path.
● SQL: If you are using PostgreSQL or MySQL, you can also add in a JDBC interceptor
to trace SQL calls.
● HTTP calls: X-Ray SDK supports a proxy to Apache HTTP Components.
● Incoming requests: Tomcat and Spring filters.
● Custom segments: Using X-Ray SDK and X-Ray daemon if not a natively supported
service.
SERVICE MAP
TRACES
DEMO
TIME!
THANKS!

You might also like