diff --git a/dd-sdk-android-core/api/apiSurface b/dd-sdk-android-core/api/apiSurface index a154fffe35..2354f1a90a 100644 --- a/dd-sdk-android-core/api/apiSurface +++ b/dd-sdk-android-core/api/apiSurface @@ -44,7 +44,7 @@ interface com.datadog.android.api.InternalLogger fun log(Level, List, () -> String, Throwable? = null, Boolean = false, Map? = null) fun logMetric(() -> String, Map, Float) fun startPerformanceMeasure(String, com.datadog.android.core.metrics.TelemetryMetricType, Float, String): com.datadog.android.core.metrics.PerformanceMetric? - fun logApiUsage(com.datadog.android.internal.telemetry.InternalTelemetryEvent.ApiUsage, Float = 15f) + fun logApiUsage(com.datadog.android.internal.telemetry.InternalTelemetryEvent.ApiUsage, Float = DEFAULT_API_USAGE_TELEMETRY_SAMPLING_RATE) companion object val UNBOUND: InternalLogger interface com.datadog.android.api.SdkCore diff --git a/dd-sdk-android-core/src/main/kotlin/com/datadog/android/api/InternalLogger.kt b/dd-sdk-android-core/src/main/kotlin/com/datadog/android/api/InternalLogger.kt index aa848f1a72..c2dfc717f6 100644 --- a/dd-sdk-android-core/src/main/kotlin/com/datadog/android/api/InternalLogger.kt +++ b/dd-sdk-android-core/src/main/kotlin/com/datadog/android/api/InternalLogger.kt @@ -142,11 +142,13 @@ interface InternalLogger { @InternalApi fun logApiUsage( apiUsageEvent: InternalTelemetryEvent.ApiUsage, - samplingRate: Float = 15f + samplingRate: Float = DEFAULT_API_USAGE_TELEMETRY_SAMPLING_RATE ) companion object { + private const val DEFAULT_API_USAGE_TELEMETRY_SAMPLING_RATE = 15f + /** * Logger for the cases when SDK instance is not yet available. Try to use the logger * provided by [FeatureSdkCore.internalLogger] instead if possible.