Choose an approach that gives the application team control over the operations that matter while keeping emitted telemetry consistent with OpenTelemetry conventions.
Code-owned instrumentation
Use the language’s OpenTelemetry API and SDK to create spans in application code. This is the most direct option when the team owns the code and needs precise boundaries around business operations, asynchronous work, or domain-specific steps.
See Code-Based (Manual) Instrumentation for the implementation sequence.
Hybrid instrumentation
In this guide, hybrid instrumentation means combining OpenTelemetry instrumentation packages that the application team explicitly includes and configures with custom spans around application-owned business logic. Keep one span owner for each operation boundary; duplicate instrumentation creates noisy or misleading traces.
See Hybrid Instrumentation for how to combine these sources coherently.
Selection checks
- Confirm the language, SDK, framework package, and versions are compatible with the application.
- Prefer established semantic conventions for standard protocols and libraries.
- Add custom spans only where they clarify application behavior not already represented.
- Check service identity, propagation, sampling, and data sensitivity before rollout.