ObservabilityPolicy

data class ObservabilityPolicy(val tracingEnabled: Boolean = false, val otlpEndpoint: String? = null, val structuredLoggingEnabled: Boolean = false, val loggingSinks: List<LoggingSinkConfig> = listOf(LoggingSinkConfig.Logcat()), val correlationEnabled: Boolean = true, val metricsEnabled: Boolean = false, val metricsExportIntervalMs: Long, val debugFeaturesEnabled: Boolean = false, val networkLoggingEnabled: Boolean = false, val traceSampleRate: Double = 0.1)

Policy for SDK observability features including logging, tracing, and metrics.

Security (ISO 27001 A.12.4): All observability features are opt-in with secure defaults to prevent accidental data leakage. Remote transmission requires explicit endpoint configuration.

Privacy (GDPR Art. 5): No PII is collected by default. Remote logging and tracing require explicit opt-in with appropriate legal basis.

Since

0.4.0

Constructors

Link copied to clipboard
constructor(tracingEnabled: Boolean = false, otlpEndpoint: String? = null, structuredLoggingEnabled: Boolean = false, loggingSinks: List<LoggingSinkConfig> = listOf(LoggingSinkConfig.Logcat()), correlationEnabled: Boolean = true, metricsEnabled: Boolean = false, metricsExportIntervalMs: Long, debugFeaturesEnabled: Boolean = false, networkLoggingEnabled: Boolean = false, traceSampleRate: Double = 0.1)

Types

Link copied to clipboard
object Companion

Properties

Link copied to clipboard

Enable correlation ID propagation across operations

Link copied to clipboard

Enable debug features (debug builds only)

Link copied to clipboard

Configured logging sinks (default: Logcat only)

Link copied to clipboard

Enable metrics collection for monitoring

Link copied to clipboard

Metrics export interval in milliseconds

Link copied to clipboard

Enable network request/response logging (debug only)

Link copied to clipboard

OTLP/HTTP endpoint for trace export (null = disabled)

Link copied to clipboard

Enable multi-sink structured logging

Link copied to clipboard

Sampling rate for traces (0.0 to 1.0)

Link copied to clipboard

Enable OpenTelemetry-compatible distributed tracing