Class Options
-
- All Implemented Interfaces:
public final class Options
Configuration options for the Observability plugin.
-
-
Field Summary
Fields Modifier and Type Field Description private final String
serviceName
private final String
serviceVersion
private final String
otlpEndpoint
private final String
backendUrl
private final Attributes
resourceAttributes
private final Map<String, String>
customHeaders
private final Duration
sessionBackgroundTimeout
private final Boolean
debug
private final Boolean
disableErrorTracking
private final Boolean
disableLogs
private final Boolean
disableTraces
private final Boolean
disableMetrics
private final LDLogAdapter
logAdapter
private final String
loggerName
-
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 String
getServiceName()
The service name for the application. final String
getServiceVersion()
The version of the service. final String
getOtlpEndpoint()
The OTLP exporter endpoint. final String
getBackendUrl()
The backend URL for non-OTLP operations. final Attributes
getResourceAttributes()
Additional resource attributes to include in telemetry data. final Map<String, String>
getCustomHeaders()
Custom headers to include with OTLP exports. final Duration
getSessionBackgroundTimeout()
Session timeout if app is backgrounded. final Boolean
getDebug()
Enables verbose telemetry logging if true as well as other debug functionality. final Boolean
getDisableErrorTracking()
Disables error tracking if true. final Boolean
getDisableLogs()
Disables logs if true. final Boolean
getDisableTraces()
Disables traces if true. final Boolean
getDisableMetrics()
Disables metrics if true. final LDLogAdapter
getLogAdapter()
The log adapter to use. final String
getLoggerName()
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".
-
-
-
-