ObservabilityOptions class
Configuration for the LaunchDarkly observability plugin. Field set mirrors
LaunchDarkly.Observability.ObservabilityOptions in the .NET bridge.
This type is platform-agnostic on purpose: it carries no transport details
(no pigeon wire types), so it can be passed to either the native (mobile)
or web implementation. The native wire conversion lives in
platform/io/native_options_codec.dart.
Constructors
-
ObservabilityOptions({bool isEnabled = true, String serviceName = defaultServiceName, String serviceVersion = defaultServiceVersion, String? otlpEndpoint, String? backendUrl, String? contextFriendlyName, Map<
String, Object?> ? attributes, Map<String, String> customHeaders = const {}, Duration sessionBackgroundTimeout = const Duration(minutes: 15), ObservabilityLogLevel logsApiLevel = ObservabilityLogLevel.info, TracesOptions traces = const TracesOptions(), bool metricsEnabled = true, AnalyticsOptions analytics = const AnalyticsOptions(), InstrumentationOptions instrumentation = const InstrumentationOptions()}) -
const
Properties
- analytics → AnalyticsOptions
-
Analytics telemetry configuration. Mirrors Android
ObservabilityOptions.analytics. Native-only.final -
attributes
→ Map<
String, Object?> ? -
final
- backendUrl → String
-
final
- contextFriendlyName → String?
-
final
-
customHeaders
→ Map<
String, String> -
Extra HTTP headers added to OTLP exports (e.g. for proxies or auth).
Mirrors Android/iOS
customHeaders. Native-only.final - hashCode → int
-
The hash code for this object.
no setterinherited
- instrumentation → InstrumentationOptions
-
final
- isEnabled → bool
-
final
- logsApiLevel → ObservabilityLogLevel
-
Minimum severity of logs forwarded to the OpenTelemetry logs pipeline.
Use ObservabilityLogLevel.none to disable logs. Mirrors Android/iOS
logsApiLevel. Native-only. Defaults to ObservabilityLogLevel.info.final - metricsEnabled → bool
-
Whether to export metrics. Mirrors Android
metricsApiand iOSmetricsApi. Native-only. Defaults totrue.final - otlpEndpoint → String
-
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- serviceName → String
-
final
- serviceVersion → String
-
final
- sessionBackgroundTimeout → Duration
-
How long the app may stay in the background before the current session is
ended. Mirrors Android/iOS
sessionBackgroundTimeout. Native-only. Defaults to 15 minutes.final - traces → TracesOptions
-
Controls automatic trace generation. Mirrors Android
tracesApiand iOStracesApi. Native-only.final
Methods
-
copyWith(
{bool? isEnabled, String? serviceName, String? serviceVersion, String? otlpEndpoint, String? backendUrl, String? contextFriendlyName, Map< String, Object?> ? attributes, Map<String, String> ? customHeaders, Duration? sessionBackgroundTimeout, ObservabilityLogLevel? logsApiLevel, TracesOptions? traces, bool? metricsEnabled, AnalyticsOptions? analytics, InstrumentationOptions? instrumentation}) → ObservabilityOptions -
Returns a copy with the given fields replaced. Only non-null arguments
override; existing values (including
attributes) are otherwise preserved. -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited
Constants
- defaultBackendUrl → const String
- defaultOtlpEndpoint → const String
- defaultServiceName → const String
- defaultServiceVersion → const String