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 provides different functions depending on what kind of data you want to record. The recorded data is available as an$ld:telemetry:metric event. To learn more, read Metrics autogenerated from observability events.
You can view all metrics sent to LaunchDarkly under Metrics in the LaunchDarkly user interface. To learn more, read Metrics.
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
When you record a metric with the observability plugin, it must include a To learn more, read
name and value. Optionally, it can also include attributes and a timestamp. To construct the attributes, use Attributes from the @opentelemetry/api.Here are the options for recording metrics:Observe.Android
Expand Android code sample
Expand Android code sample
When you record a metric with the observability plugin, it must include a To learn more, read
name and value. Optionally, it can also include attributes and a timestamp. To construct the attributes, use Attributes from the @opentelemetry/api.Here are the options for recording metrics:LDObserve.Java
ScriptExpand JavaScript code sample
Expand JavaScript code sample
React Native
Expand React Native code sample
Expand React Native code sample
When you record a metric with the observability plugin, it must include a To learn more, read
name and value. Optionally, it can also include attributes and a timestamp. To construct the attributes, use Attributes from the @opentelemetry/api.Here are the options for recording metrics:Observe.React Web
To record metrics with the React Web SDK, follow the example for JavaScript.Vue
To record metrics 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
Go
Expand Go code sample
Expand Go code sample
To record a metric, pass the Go To learn more, read
context.Context, as well as the name, value, and optional attributes of the metric to the appropriate Record* function. For example, you might want to record the value for a point-in-time measurement, such as the current CPU utilization percentage, or for a counter, such as the number of cache hits. The optional attributes may include any attributes from the OpenTelemetry specification.Metrics with the same name and attributes are aggregated using the OpenTelemetry SDK. To learn more, read the OTel documentation on the Metrics Data Model.Here are the options for recording metrics:RecordMetric, RecordCount, and RecordHistogram.Node.js (server-side)
Expand Node.js (server-side) code sample
Expand Node.js (server-side) code sample
To record a metric, first create the metric within your application. The Here are the options for recording metrics:To learn more, read
Metric interface includes a name, value, and optional tags. For example, you might create a metric for a point-in-time measurement, such as the current CPU utilization percentage, or for a counter, such as the number of cache hits.Values with the same metric name and attributes are aggregated using the OpenTelemetry SDK. To learn more, read the OTel documentation on the Metrics Data Model.Observe.Python
Expand Python code sample
Expand Python code sample
To record a metric, pass the name, value, and optional attributes to the appropriate To learn more, read
record_* function. For example, you might want to record the value for a point-in-time measurement, such as the current CPU utilization percentage, or for a counter, such as the number of cache hits. The optional attributes may include any attributes from the OpenTelemetry specification.Metrics with the same name and attributes are aggregated using the OpenTelemetry SDK. To learn more, read the OTel documentation on the Metrics Data Model.Here are the options for recording metrics:ldobserve.