Wrap any function with OpenTelemetry tracing to automatically track its execution
traced()
function wraps any function with OpenTelemetry tracing to automatically track its execution. It creates a span for each function call, records input arguments and return values, and captures any exceptions that occur during execution.
init()
. If you have an existing OpenTelemetry setup or need custom configuration, see the manual setup guide.GentraceSpanProcessor
when you call init()
, which simplifies the process of converting baggage values to span attributes, ensuring proper trace routing to Gentrace. For manual configuration details, see the OpenTelemetry setup guide.
traced()
function provides automatic instrumentation for any function in your codebase. It: