Auto-Instrumentation
Auto-instrumentation gets traces and RED metrics into the views on this page without you touching your application code. The KloudMate Agent discovers each service and instruments it for you, so you turn tracing on per service instead of editing and redeploying every app.
You pick one of two modes for each service:
- eBPF captures Rate, Errors, and Duration (RED) metrics and trace spans from the Linux kernel. It works for any language, including Go, and needs no restart.
- SDK attaches the matching OpenTelemetry (OTel) agent in-process for deeper distributed traces, with spans for your frameworks, database calls, and outbound requests. It needs a one-time restart, so you turn it on one service at a time.
The two share one trace. When a service runs on SDK, the agent stops eBPF from tracing that service’s own requests, so you get the richer application spans while eBPF keeps tracing the services around it, all connected.
eBPF or SDK
Section titled “eBPF or SDK”eBPF gives broad, no-touch coverage at network and system boundaries. SDKs give deep, in-process detail. Most setups use both: eBPF everywhere, SDK on the services where you need application-level context.
| eBPF | SDK auto-instrumentation | |
|---|---|---|
| Code changes | None. | None — the agent attaches the OTel agent for you. |
| Application restarts | None. | One restart per service, with your consent. |
| Language support | Any language, including Go, Rust, and C++. | Java, Node.js, Python, .NET, and PHP. |
| Overhead | Low; runs in kernel space. | Higher, with richer library instrumentation. |
| What you see | RED metrics, the service map, and spans at request boundaries. | Deep spans: frameworks, database queries, and outbound calls. |
What eBPF cannot do
Section titled “What eBPF cannot do”eBPF works at network boundaries and system calls, so it does not see inside your application:
- Business logic: it cannot read custom values like
user_idorcart_value, or trace a specific function path. - In-process detail: it does not produce internal function timing the way an SDK does.
For those, add manual instrumentation or move the service to SDK mode.
Set it up
Section titled “Set it up”Auto-instrumentation runs through the KloudMate Agent. Install the agent, then instrument services from the Application APM experience:
Without the agent
Section titled “Without the agent”If you run where you can’t install a host agent — serverless, or a managed platform — instrument the app yourself and send the traces straight to KloudMate’s cloud endpoint. Run your language’s OpenTelemetry agent or SDK and point it at otel.kloudmate.com with your API key:
Replace YOUR_API_KEY with your KloudMate API key. The step-by-step OpenTelemetry guides walk through this for each language, and Manual Instrumentation covers doing it in code.
Related paths
Section titled “Related paths”- Manual Instrumentation for custom spans, business-logic attributes, and application metrics.
- APM Views and Trace Explorer to see the data once it flows.