File tree Expand file tree Collapse file tree 1 file changed +2
-13
lines changed
runtime/protocol/http-client/common/src/aws/smithy/kotlin/runtime/http/operation Expand file tree Collapse file tree 1 file changed +2
-13
lines changed Original file line number Diff line number Diff line change @@ -14,7 +14,6 @@ import aws.smithy.kotlin.runtime.client.endpoints.authOptions
1414import aws.smithy.kotlin.runtime.client.logMode
1515import aws.smithy.kotlin.runtime.collections.attributesOf
1616import aws.smithy.kotlin.runtime.collections.emptyAttributes
17- import aws.smithy.kotlin.runtime.collections.get
1817import aws.smithy.kotlin.runtime.collections.merge
1918import aws.smithy.kotlin.runtime.http.*
2019import aws.smithy.kotlin.runtime.http.auth.SignHttpRequest
@@ -419,15 +418,5 @@ private class InterceptorTransmitMiddleware<I, O>(
419418/* *
420419 * Emits an [Identity]'s attributes [BusinessMetrics] into an [ExecutionContext]
421420 */
422- private fun emitIdentityBusinessMetrics (identity : Identity , context : ExecutionContext ) {
423- val identityAttributes = identity.attributes
424-
425- if (identityAttributes.contains(BusinessMetrics )) {
426- identityAttributes[BusinessMetrics ]
427- .toList()
428- .reversed()
429- .forEach { metric ->
430- context.emitBusinessMetric(metric)
431- }
432- }
433- }
421+ private fun emitIdentityBusinessMetrics (identity : Identity , context : ExecutionContext ) =
422+ identity.attributes.getOrNull(BusinessMetrics )?.toList()?.reversed()?.forEach(context::emitBusinessMetric)
You can’t perform that action at this time.
0 commit comments