Recording traces
Overview
This topic explains how to record traces through the SDK observability plugin.
You can view all traces sent to LaunchDarkly under Traces in the LaunchDarkly user interface. To learn more, read Traces.
Details about each SDK’s configuration are available in the SDK-specific sections below:
Client-side SDKs
This feature is available in the observability plugin for the following client-side SDKs:
JavaScript
Expand JavaScript code sample
The observability plugin provides two options for starting new spans:
startSpan()
ends the span automatically after the callback function completes, whether it returns normally or throws an errorstartManualSpan()
ends the span when you callspan.end()
To start a new span:
To learn more, read startSpan
and startManualSpan
.
React Web
To start new spans with the React Web SDK, follow the example for JavaScript.
Vue
To start new spans with the React Web SDK, follow the example for JavaScript.