Documentation Index
Fetch the complete documentation index at: https://launchdarkly-preview.mintlify.app/llms.txt
Use this file to discover all available pages before exploring further.
Overview
The observability plugin automatically sends logs to LaunchDarkly. You can also userecordLog to manually create and send a log record.
You can view all logs sent to LaunchDarkly under Logs in the LaunchDarkly user interface. To learn more, read Logs.
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:iOS
Expand iOS code sample
Expand iOS code sample
Android
Expand Android code sample
Expand Android code sample
Use The attributes argument is optional. To construct it, use
recordLog to manually create and send a log record:Attributes from the @opentelemetry/api.Java
ScriptExpand JavaScript code sample
Expand JavaScript code sample
React Native
Expand React Native code sample
Expand React Native code sample
Use The attributes argument is optional. To construct it, use
recordLog to manually create and send a log record:Attributes from the @opentelemetry/api. To learn more, read recordLog.React Web
To send a log record with the React Web SDK, follow the example for JavaScript.Vue
To send a log record with the Vue SDK, follow the example for JavaScript.Server-side SDKs
This feature is available in the observability plugin for the following server-side SDKs:.NET (server-side)
Expand .NET (server-side) code sample
Expand .NET (server-side) code sample
Use You can optionally pass an array of
RecordLog to manually create and send a log record.Here’s how:attributes, which may include any attributes. We recommend using attributes from the OpenTelemetry specification. To learn more, read RecordLog.Go
Expand Go code sample
Expand Go code sample
Use The Go
RecordLog to manually create and record a log record. The log is recorded with LaunchDarkly, but is not sent to other log handlers.Here’s how:context.Context and log record should be specific to this request. You can optionally pass an array of attributes from the OpenTelemetry specification. To learn more, read RecordLog.Node.js (server-side)
Expand Node.js (server-side) code sample
Expand Node.js (server-side) code sample
Use The
recordLog to manually create and send a log record.Here’s how:recordLog method automatically provides context propagation, so you can leave the secureSessionId and requestId undefined. Alternatively, you have the option to set their values, to assist with the context propagation. You can parse values for secureSessionId and requestId from the incoming request using LDObserve.parseHeaders().Python
Expand Python code sample
Expand Python code sample
Use The message to record and log level should be specific to this request. You can optionally pass an array of additional
record_log to manually create and send a log record. The log is recorded with LaunchDarkly, but is not sent to other log handlers.Here’s how:Attributes, which may include any attributes from the OpenTelemetry specification. To learn more, read record_log.