Auto-Instrumentation Techniques
Learn how to use OpenTelemetry's auto-instrumentation features to quickly add observability to existing applications with minimal code changes.
Intro to Auto-Instrumentation
Welcome to Auto-Instrumentation Techniques! This lesson is all about adding observability to your applications without touching their code.
Think of it as a magic trick: your app starts reporting logs, metrics, and traces, but you didn't write a single line of extra code for it. This is incredibly powerful for existing or legacy systems.
How Auto-Instrumentation Works
So, how does this magic happen? Auto-instrumentation typically uses specialized agents or profilers that attach to your application at runtime.
- Bytecode Manipulation: For languages like Java, agents can modify the application's bytecode as it loads, injecting OpenTelemetry's tracing and metric collection logic.
- Library Wrapping: For other languages, it might involve dynamically wrapping common libraries (like HTTP clients or database drivers) to intercept their calls.
All lessons in this course
- Auto-Instrumentation Techniques
- Manual Instrumentation Best Practices
- Context Propagation and Baggage
- Span Attributes, Events, and Status