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
This topic explains how to configure the observability plugin for server-side SDKs. The observability plugin collects and sends observability data to LaunchDarkly, so you can review error monitoring, logs, traces, and more from within the LaunchDarkly UI. To get started with the observability plugin, read the observability reference guide for your SDK. Use the docs site navigation on the left, or find your SDK under Observability SDKs. Details about each SDK’s configuration are available in the SDK-specific sections below: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
You can configure the observability plugin for the .NET (server-side) SDK through a mix of environment variables, OpenTelemetry configuration options, and plugin configuration options.Use the For a complete list of configuration options, read
ObservabilityPlugin.ObservabilityPluginBuilder to set the options. In many cases, you can use an OpenTelemetry-specific environment variable instead, if you prefer. For example, if you want to set a custom OTLP endpoint, you can either set OtlpEndpoint in your ObservabilityPlugin.ObservabilityPluginBuilder, or you can set the OTEL_EXPORTER_OTLP_ENDPOINT environment variable.Here’s how:ObservabilityPlugin.ObservabilityPluginBuilder.Go
Expand Go code sample
Expand Go code sample
Node.js (server-side)
Expand Node.js (server-side) code sample
Expand Node.js (server-side) code sample
You can configure the observability plugin for the Node.js (server-side) SDK through a mix of environment variables, OpenTelemetry configuration options, and plugin configuration options.For a complete list of configuration options, read
Environment variables
The environment variables specify where to enable instrumentation:-
LAUNCHDARKLY_OTEL_NODE_ENABLE_FILESYSTEM_INSTRUMENTATIONenables file system instrumentation. It defaults tofalse. -
LAUNCHDARKLY_OTEL_NODE_ENABLE_OUTGOING_HTTP_INSTRUMENTATIONenables outgoing HTTP instrumentation. It defaults totrue. It only affects outgoing HTTP requests instrumented by@opentelemetry/instrumentation-http.
Open
Telemetry configuration optionsIf you are already using OpenTelemetry configuration options for Node in your application, you can continue to use them.When you use the observability plugin, the@opentelemetry/instrumentation-fs instrumentation behaves as follows:-
The instrumentation will only be enabled if
LAUNCHDARKLY_OTEL_NODE_ENABLE_FILESYSTEM_INSTRUMENTATIONistrue. -
The instruction is unaffected by the
OTEL_NODE_ENABLED_INSTRUMENTATIONSandOTEL_NODE_DISABLED_INSTRUMENTATIONSOpenTelemetry environment variables.
Plugin configuration options
To specify the observability plugin configuration options, use theNodeOptions interface to set the options.Here’s how:NodeOptions.Python
Expand Python code sample
Expand Python code sample
You can configure the observability plugin for the Python SDK through a mix of environment variables, OpenTelemetry configuration options, and plugin configuration options.Use the For a complete list of configuration options, read
ObservabilityConfig class to set the options. In many cases, you can use an OpenTelemetry-specific environment variable instead, if you prefer. For example, if you want to set a custom OTLP endpoint, you can either set otlp_endpoint in your ObservabilityConfig, or you can set the OTEL_EXPORTER_OTLP_ENDPOINT environment variable.Here’s how:ObservabilityConfig.Ruby
Expand Ruby code sample
Expand Ruby code sample
You can configure options for the Ruby observability plugin when you initialize the SDK, or using environment variables.For a complete list of configuration options, read Plugin Options.
Plugin configuration options
The plugin constructor accepts optional keyword arguments for configuration.Here’s how:Environment variables
The environment variables specify where to enable instrumentation:-
LAUNCHDARKLY_SDK_KEYprovides the LaunchDarkly SDK key. This key is automatically extracted from the client during initialization. -
OTEL_EXPORTER_OTLP_ENDPOINTprovides a custom OTLP endpoint. -
OTEL_SERVICE_NAMEprovides the service name, if not specified in plugin options.
The environment associated with your SDK key is automatically determined by the backend, so you don’t need to configure it separately.