Skip to main content

Auto-Instrumentation

Auto-instrumentation provides zero-code observability by automatically capturing traces, metrics, and logs from your application and its dependencies. This is the fastest way to get started with OpenTelemetry.

When to Use Auto-Instrumentation

Use CaseRecommendation
Quick proof-of-concept✅ Auto-instrumentation
Standard HTTP/database operations✅ Auto-instrumentation
Business-specific metrics❌ Use custom instrumentation
Fine-grained span control❌ Use custom instrumentation
Legacy framework not supported❌ Use custom instrumentation

Frameworks by Language

Python

FrameworkGuideWhat's Instrumented
DjangoDjangoHTTP requests, ORM queries, middleware, templates, Celery tasks
FlaskFlaskHTTP requests, Jinja2 templates, SQLAlchemy
FastAPIFastAPIHTTP requests, async handlers, Pydantic validation
CeleryCeleryTask execution, retries, worker lifecycle

Node.js

FrameworkGuideWhat's Instrumented
ExpressExpressHTTP requests, middleware, routing
FastifyFastifyHTTP requests, hooks, plugins, PostgreSQL, BullMQ
NestJSNestJSControllers, services, guards, interceptors
Next.jsNext.jsSSR, API routes, middleware, React components
Node.js (generic)Node.jsHTTP, filesystem, child processes
ReactReactClient-side rendering, user interactions

Java / JVM

FrameworkGuideWhat's Instrumented
Spring BootSpring BootREST controllers, JPA, JDBC, messaging
Spring Boot (alt)AlternativesMicrometer, manual agent setup
QuarkusQuarkusREST endpoints, Hibernate, Kafka

Ruby

FrameworkGuideWhat's Instrumented
Rails 6+RailsControllers, ActiveRecord, ActionCable, Sidekiq
Rails 5.xRails LegacyControllers, ActiveRecord (older SDK)

Go

FrameworkGuideWhat's Instrumented
Go (net/http)GoHTTP handlers, database/sql, gRPC
AxumAxumHandlers, middleware, tower layers

PHP

FrameworkGuideWhat's Instrumented
LaravelLaravelHTTP requests, Eloquent, queues, caching

.NET

FrameworkGuideWhat's Instrumented
ASP.NET Core.NETHTTP requests, EF Core, HttpClient

Elixir

FrameworkGuideWhat's Instrumented
PhoenixPhoenixControllers, Ecto, LiveView, PubSub

How Auto-Instrumentation Works

Auto-instrumentation architecture diagramAuto-instrumentation architecture diagram

Next Steps

  1. Choose your framework from the tables above
  2. Follow the guide to add auto-instrumentation
  3. Add custom instrumentation for business-specific telemetry
Was this page helpful?