From dbfb9735643e8201a053cba5bd2a0fe081857ded Mon Sep 17 00:00:00 2001 From: 0marperez Date: Wed, 6 Nov 2024 11:32:03 -0500 Subject: [PATCH] debugging: throw exception to see what metrics are strings --- .../runtime/http/interceptors/BusinessMetricsInterceptor.kt | 1 + 1 file changed, 1 insertion(+) diff --git a/aws-runtime/aws-http/common/src/aws/sdk/kotlin/runtime/http/interceptors/BusinessMetricsInterceptor.kt b/aws-runtime/aws-http/common/src/aws/sdk/kotlin/runtime/http/interceptors/BusinessMetricsInterceptor.kt index 45acf59e5d4..ddfe0ab7808 100644 --- a/aws-runtime/aws-http/common/src/aws/sdk/kotlin/runtime/http/interceptors/BusinessMetricsInterceptor.kt +++ b/aws-runtime/aws-http/common/src/aws/sdk/kotlin/runtime/http/interceptors/BusinessMetricsInterceptor.kt @@ -20,6 +20,7 @@ import aws.smithy.kotlin.runtime.http.request.toBuilder public class BusinessMetricsInterceptor : HttpInterceptor { override suspend fun modifyBeforeTransmit(context: ProtocolRequestInterceptorContext): HttpRequest { context.executionContext.getOrNull(BusinessMetrics)?.let { metrics -> + throw Exception("Metrics: $metrics") val metricsString = formatMetrics(metrics) val currentUserAgentHeader = context.protocolRequest.headers[USER_AGENT] val modifiedRequest = context.protocolRequest.toBuilder()