Skip to content

Commit

Permalink
debugging: throw exception to see what metrics are strings
Browse files Browse the repository at this point in the history
  • Loading branch information
0marperez committed Nov 6, 2024
1 parent 7b73088 commit dbfb973
Showing 1 changed file with 1 addition and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ import aws.smithy.kotlin.runtime.http.request.toBuilder
public class BusinessMetricsInterceptor : HttpInterceptor {
override suspend fun modifyBeforeTransmit(context: ProtocolRequestInterceptorContext<Any, HttpRequest>): 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()
Expand Down

0 comments on commit dbfb973

Please sign in to comment.