Zero-code Agents and Automatic Instrumentation: OTCA practice questions
Zero-code instrumentation adds OpenTelemetry to an application without editing its source. It is usually installed as an agent or something agent-like, and the mechanism depends on the language: bytecode manipulation in Java, monkey patching in Python, and eBPF for some Go and polyglot setups.
By Ibrahim Yesilay · Published · Updated
Independent community practice, not affiliated with or endorsed by CNCF or The Linux Foundation.
What Zero-code Agents and Automatic Instrumentation covers in OTCA
Zero-code instrumentation adds OpenTelemetry to an application without editing its source. It is usually installed as an agent or something agent-like, and the mechanism depends on the language: bytecode manipulation in Java, monkey patching in Python, and eBPF for some Go and polyglot setups. Agents typically instrument the libraries an application uses, such as inbound requests, outbound HTTP calls, database clients and message queues. The application's own business logic is not instrumented automatically; for that you add code-based instrumentation on top.
Agents are configured mostly through the standard OTEL_ environment variables, plus language-specific options. A service name is the minimum useful setting, and exporters, propagators and resources can be configured the same way.
For Java, you download opentelemetry-javaagent.jar and add -javaagent:path/to/opentelemetry-javaagent.jar to the JVM arguments, either directly or through JAVA_TOOL_OPTIONS. Settings can be passed as system properties such as -Dotel.service.name or as environment variables. A single library is turned off with OTEL_INSTRUMENTATION_[NAME]_ENABLED=false, OTEL_INSTRUMENTATION_COMMON_DEFAULT_ENABLED=false turns off all default instrumentation, and OTEL_JAVAAGENT_ENABLED=false disables the agent entirely.
For Python, installing opentelemetry-distro brings the API, the SDK and two tools. The opentelemetry-bootstrap -a install command looks at installed packages and adds matching instrumentation libraries, and opentelemetry-instrument python myapp.py runs the app with the agent. Command-line flags map to environment variables by uppercasing them and adding the OTEL_ prefix. OTEL_PYTHON_DISABLED_INSTRUMENTATIONS lists entry point names to skip.
For Node.js, you install @opentelemetry/api and @opentelemetry/auto-instrumentations-node and start the app with node --require @opentelemetry/auto-instrumentations-node/register, or put that flag in NODE_OPTIONS. OTEL_NODE_ENABLED_INSTRUMENTATIONS and OTEL_NODE_DISABLED_INSTRUMENTATIONS narrow the set; the enabled list is applied first and the disabled list is then removed from it.
The .NET automatic instrumentation is installed with a script or PowerShell module. On .NET Framework it must run as a CLR profiler; on modern .NET the profiler is only needed for bytecode instrumentation, and DOTNET_STARTUP_HOOKS is required without it. Individual libraries are switched off with OTEL_DOTNET_AUTO_[SIGNAL]_[NAME]_INSTRUMENTATION_ENABLED=false.
Go offers two official approaches. OpenTelemetry eBPF Instrumentation (OBI) observes processes from outside, works across many languages, and needs Linux, BTF and elevated privileges. Go compile-time instrumentation (otelc) weaves instrumentation in during go build and needs no special runtime privileges.
On Kubernetes, the OpenTelemetry Operator injects agents for .NET, Java, Node.js, Python and Go. You create an Instrumentation resource with the exporter endpoint, propagators and sampler, then opt workloads in with annotations such as instrumentation.opentelemetry.io/inject-java: "true" in the pod template. The Instrumentation resource must exist before the pods are created, and Go additionally needs the target executable path and a privileged eBPF sidecar.
Key points
- Zero-code agents instrument libraries at the edges of an application, not its own business logic.
- The Java agent is attached with -javaagent:path/to/opentelemetry-javaagent.jar and configured with system properties or OTEL_ variables.
- Python uses opentelemetry-bootstrap -a install to add instrumentations and opentelemetry-instrument to run the app.
- Node.js loads @opentelemetry/auto-instrumentations-node/register through --require or NODE_OPTIONS.
- The Operator injects agents based on pod-template annotations that point to an Instrumentation resource created beforehand.
Three sample questions
21 OTCA questions on Zero-code Agents and Automatic Instrumentation, 21 with explanations. How practice works
Question 1
- A.Transform Processors in the OpenTelemetry Collector
- B.Exporters configured for trace data
- C.Log Receivers in the OpenTelemetry Collector
- D.Autoinstrumentation and OpenTelemetry SDK
Correct answer: D
Sources: OpenTelemetry docs: Logs, OpenTelemetry docs: Zero-code instrumentation
Question 2
- A.java -jar opentelemetry-javaagent.jar -jar myapp.jar
- B.java -javaagent:path/to/opentelemetry-javaagent.jar -jar myapp.jar
- C.java -cp path/to/opentelemetry-javaagent.jar -Dotel.service.name=svc -jar myapp.jar
- D.java -Dotel.javaagent.enabled=true -Dotel.service.name=svc -jar myapp.jar
Correct answer: B
Sources: OpenTelemetry docs: Java agent getting started, OpenTelemetry docs: Java agent
Question 3
- A.OTEL_JAVAAGENT_ENABLED=false
- B.OTEL_INSTRUMENTATION_COMMON_DEFAULT_ENABLED=false
- C.OTEL_INSTRUMENTATION_KAFKA_ENABLED=false
- D.OTEL_PYTHON_DISABLED_INSTRUMENTATIONS=kafka
Correct answer: C
Sources: OpenTelemetry docs: Java agent, suppressing specific instrumentation, OpenTelemetry docs: Operator, injecting auto-instrumentation
Practice this topic
Focus mode keeps every question on Zero-code Agents and Automatic Instrumentation until you leave it. 10 free guest answers, then a free account; no credit card.
Or open OTCA practice across all topics.
Sources
The explanation above was checked against these official documents.
- OpenTelemetry docs: Zero-code instrumentation concept (checked 2026-10-28)
- OpenTelemetry docs: Java agent getting started (checked 2026-10-28)
- OpenTelemetry docs: Java agent, suppressing specific instrumentation (checked 2026-10-28)
- OpenTelemetry docs: Python zero-code instrumentation (checked 2026-10-28)
- OpenTelemetry docs: Python agent configuration (checked 2026-10-28)
- OpenTelemetry docs: JavaScript zero-code instrumentation (checked 2026-10-28)
- OpenTelemetry docs: Node.js zero-code configuration (checked 2026-10-28)
- OpenTelemetry docs: .NET automatic instrumentation configuration (checked 2026-10-28)
- OpenTelemetry docs: Choosing zero-code auto instrumentation for Go (checked 2026-10-28)
- OpenTelemetry docs: Go Instrumentation Auto SDK (checked 2026-10-28)
- OpenTelemetry docs: Operator, injecting auto-instrumentation (checked 2026-10-28)
Frequently asked questions
Can I still add custom spans when using an agent?
Yes. Agents cover library calls, and you can use the OpenTelemetry API in your own code to add spans and metrics; for Go eBPF setups, the Auto SDK connects manual spans to the eBPF spans.
Why did the Operator not instrument my pods?
Check that the Instrumentation resource existed before the pods started, that the annotation matches the language, and that it sits in spec.template.metadata.annotations of the Deployment.