Instrumentation()
Overview
All Respan instrumentation plugins implement a simple protocol with name, activate(), and deactivate(). This lets you build plugins for any vendor SDK and have them work with Respan().
Protocol
Building a custom plugin
A plugin typically:
- Registers a hook or processor with the vendor SDK in
activate(). - On each SDK event, converts it to a
ReadableSpanusingbuild_readable_span(). - Injects the span into the OTEL pipeline using
inject_span().
Minimal example
Key functions
Required attributes
For spans to be processed and displayed correctly by the Respan backend: