Class Options
-
- All Implemented Interfaces:
public final class OptionsConfiguration options for the Observability plugin.
-
-
Field Summary
Fields Modifier and Type Field Description private final StringserviceNameprivate final StringserviceVersionprivate final StringotlpEndpointprivate final StringbackendUrlprivate final AttributesresourceAttributesprivate final Map<String, String>customHeadersprivate final DurationsessionBackgroundTimeoutprivate final Booleandebugprivate final BooleandisableErrorTrackingprivate final BooleandisableLogsprivate final BooleandisableTracesprivate final BooleandisableMetricsprivate final LDLogAdapterlogAdapterprivate final StringloggerName
-
Constructor Summary
Constructors Constructor Description Options(String serviceName, String serviceVersion, String otlpEndpoint, String backendUrl, Attributes resourceAttributes, Map<String, String> customHeaders, Duration sessionBackgroundTimeout, Boolean debug, Boolean disableErrorTracking, Boolean disableLogs, Boolean disableTraces, Boolean disableMetrics, LDLogAdapter logAdapter, String loggerName)
-
Method Summary
Modifier and Type Method Description final StringgetServiceName()The service name for the application. final StringgetServiceVersion()The version of the service. final StringgetOtlpEndpoint()The OTLP exporter endpoint. final StringgetBackendUrl()The backend URL for non-OTLP operations. final AttributesgetResourceAttributes()Additional resource attributes to include in telemetry data. final Map<String, String>getCustomHeaders()Custom headers to include with OTLP exports. final DurationgetSessionBackgroundTimeout()Session timeout if app is backgrounded. final BooleangetDebug()Enables verbose telemetry logging if true as well as other debug functionality. final BooleangetDisableErrorTracking()Disables error tracking if true. final BooleangetDisableLogs()Disables logs if true. final BooleangetDisableTraces()Disables traces if true. final BooleangetDisableMetrics()Disables metrics if true. final LDLogAdaptergetLogAdapter()The log adapter to use. final StringgetLoggerName()The name of the logger to use. -
-
Constructor Detail
-
Options
Options(String serviceName, String serviceVersion, String otlpEndpoint, String backendUrl, Attributes resourceAttributes, Map<String, String> customHeaders, Duration sessionBackgroundTimeout, Boolean debug, Boolean disableErrorTracking, Boolean disableLogs, Boolean disableTraces, Boolean disableMetrics, LDLogAdapter logAdapter, String loggerName)
-
-
Method Detail
-
getServiceName
final String getServiceName()
The service name for the application. Defaults to the app package name if not set.
-
getServiceVersion
final String getServiceVersion()
The version of the service. Defaults to the app version if not set.
-
getOtlpEndpoint
final String getOtlpEndpoint()
The OTLP exporter endpoint. Defaults to LaunchDarkly endpoint.
-
getBackendUrl
final String getBackendUrl()
The backend URL for non-OTLP operations. Defaults to LaunchDarkly url.
-
getResourceAttributes
final Attributes getResourceAttributes()
Additional resource attributes to include in telemetry data.
-
getCustomHeaders
final Map<String, String> getCustomHeaders()
Custom headers to include with OTLP exports.
-
getSessionBackgroundTimeout
final Duration getSessionBackgroundTimeout()
Session timeout if app is backgrounded. Defaults to 15 minutes.
-
getDebug
final Boolean getDebug()
Enables verbose telemetry logging if true as well as other debug functionality. Defaults to false.
-
getDisableErrorTracking
final Boolean getDisableErrorTracking()
Disables error tracking if true. Defaults to false.
-
getDisableLogs
final Boolean getDisableLogs()
Disables logs if true. Defaults to false.
-
getDisableTraces
final Boolean getDisableTraces()
Disables traces if true. Defaults to false.
-
getDisableMetrics
final Boolean getDisableMetrics()
Disables metrics if true. Defaults to false.
-
getLogAdapter
final LDLogAdapter getLogAdapter()
The log adapter to use. Defaults to using the LaunchDarkly SDK's LDTimberLogging.adapter(). Use LDAndroidLogging.adapter() to use the Android logging adapter.
-
getLoggerName
final String getLoggerName()
The name of the logger to use. Defaults to "LaunchDarklyObservabilityPlugin".
-
-
-
-