Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

misc: credentials business metrics #1442

Merged
merged 20 commits into from
Nov 4, 2024
Merged
Show file tree
Hide file tree
Changes from 15 commits
Commits
Show all changes
20 commits
Select commit Hold shift + click to select a range
faee8bb
misc: emit credentials business metrics
0marperez Oct 14, 2024
a50e692
Profile credentials business metrics tests
0marperez Oct 15, 2024
8d61e07
Bug fixes around business metrics
0marperez Oct 15, 2024
18c80e7
Added business metrics to default chain credentials provider tests
0marperez Oct 16, 2024
8244764
Self review
0marperez Oct 16, 2024
9c3967c
Allow running protocol tests with snapshot smithy kotlin versions
0marperez Oct 16, 2024
92e091e
Revert previous commit
0marperez Oct 16, 2024
a4e5eca
Naming changes
0marperez Oct 17, 2024
1a51409
Fix CODE_CREDENTIALS metric to only emit when static credntials provi…
0marperez Oct 17, 2024
d7ba2b9
Refactor CREDENTIALS_ENV_VARS_STS_WEB_ID_TOKEN business metrics out o…
0marperez Oct 17, 2024
668ed18
Move credential business metric emission to credentials return time
0marperez Oct 24, 2024
1bdaa80
Remove duplicate test coverage & newline in LazilyInitializedCredenti…
0marperez Oct 28, 2024
03ca91f
Refactor ProfileCredentialsProvider, unused function param, and reada…
0marperez Oct 28, 2024
6a7b812
Move credentials business metrics to credentials attributes
0marperez Oct 31, 2024
02db28d
Add JvmName import that didn't cause build failures when missing loca…
0marperez Oct 31, 2024
b74a50b
Remove breaking changes from smithy kotlin
0marperez Oct 31, 2024
864dc65
Set<String> -> Set<BusinessMetric> business metrics
0marperez Nov 1, 2024
82c7a3f
Self review
0marperez Nov 1, 2024
573facd
Self review & refactoring
0marperez Nov 1, 2024
85b78d7
PR feedback
0marperez Nov 4, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions aws-runtime/aws-config/api/aws-config.api
Original file line number Diff line number Diff line change
Expand Up @@ -98,8 +98,8 @@ public final class aws/sdk/kotlin/runtime/auth/credentials/InvalidSsoTokenExcept
}

public final class aws/sdk/kotlin/runtime/auth/credentials/LazilyInitializedCredentialsProvider : aws/smithy/kotlin/runtime/auth/awscredentials/CredentialsProvider {
public fun <init> (Ljava/lang/String;Lkotlin/jvm/functions/Function0;)V
public synthetic fun <init> (Ljava/lang/String;Lkotlin/jvm/functions/Function0;ILkotlin/jvm/internal/DefaultConstructorMarker;)V
public fun <init> (Ljava/lang/String;Laws/smithy/kotlin/runtime/businessmetrics/BusinessMetric;Lkotlin/jvm/functions/Function0;)V
public synthetic fun <init> (Ljava/lang/String;Laws/smithy/kotlin/runtime/businessmetrics/BusinessMetric;Lkotlin/jvm/functions/Function0;ILkotlin/jvm/internal/DefaultConstructorMarker;)V
public fun resolve (Laws/smithy/kotlin/runtime/collections/Attributes;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;
public fun toString ()Ljava/lang/String;
}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Correctness: Backwards-incompatible changes

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ package aws.sdk.kotlin.runtime.auth.credentials

import aws.sdk.kotlin.runtime.config.AwsSdkSetting
import aws.sdk.kotlin.runtime.config.imds.ImdsClient
import aws.sdk.kotlin.runtime.http.interceptors.businessmetrics.AwsBusinessMetric
import aws.smithy.kotlin.runtime.auth.awscredentials.*
import aws.smithy.kotlin.runtime.collections.Attributes
import aws.smithy.kotlin.runtime.http.engine.DefaultHttpEngine
Expand Down Expand Up @@ -52,7 +53,10 @@ public class DefaultChainCredentialsProvider constructor(
private val chain = CredentialsProviderChain(
SystemPropertyCredentialsProvider(platformProvider::getProperty),
EnvironmentCredentialsProvider(platformProvider::getenv),
LazilyInitializedCredentialsProvider("EnvironmentStsWebIdentityCredentialsProvider") {
LazilyInitializedCredentialsProvider(
"EnvironmentStsWebIdentityCredentialsProvider",
AwsBusinessMetric.Credentials.CREDENTIALS_ENV_VARS_STS_WEB_ID_TOKEN,
) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Question: Why should the LazilyInitializedCredentialsProvider care about its underlying delegate's metric? Can't StsWebIdentityCredentialsProvider record the metric itself?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That was originally what I had, you can see it here. There's some conversation you can follow

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This doesn't really address my initial concern of the business metrics seeming to be hacked into the credentials provider implementation. I agree with Ian, LazilyInitializedCredentialsProvider should not have to know about business metrics

// STS web identity provider can be constructed from either the profile OR 100% from the environment
StsWebIdentityCredentialsProvider.fromEnvironment(
platformProvider = platformProvider,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@ package aws.sdk.kotlin.runtime.auth.credentials

import aws.sdk.kotlin.runtime.auth.credentials.internal.credentials
import aws.sdk.kotlin.runtime.config.AwsSdkSetting
import aws.sdk.kotlin.runtime.http.interceptors.businessmetrics.AwsBusinessMetric
import aws.sdk.kotlin.runtime.http.interceptors.businessmetrics.emitBusinessMetric
import aws.smithy.kotlin.runtime.ErrorMetadata
import aws.smithy.kotlin.runtime.auth.awscredentials.*
import aws.smithy.kotlin.runtime.client.endpoints.Endpoint
Expand Down Expand Up @@ -76,6 +78,7 @@ public class EcsCredentialsProvider(

override suspend fun resolve(attributes: Attributes): Credentials {
val logger = coroutineContext.logger<EcsCredentialsProvider>()

val authToken = loadAuthToken()
val relativeUri = AwsSdkSetting.AwsContainerCredentialsRelativeUri.resolve(platformProvider)
val fullUri = AwsSdkSetting.AwsContainerCredentialsFullUri.resolve(platformProvider)
Expand Down Expand Up @@ -110,7 +113,7 @@ public class EcsCredentialsProvider(

logger.debug { "obtained credentials from container metadata service; expiration=${creds.expiration?.format(TimestampFormat.ISO_8601)}" }

return creds
return creds.emitBusinessMetric(AwsBusinessMetric.Credentials.CREDENTIALS_HTTP)
}

private suspend fun loadAuthToken(): String? {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@ package aws.sdk.kotlin.runtime.auth.credentials

import aws.sdk.kotlin.runtime.auth.credentials.internal.credentials
import aws.sdk.kotlin.runtime.config.AwsSdkSetting
import aws.sdk.kotlin.runtime.http.interceptors.businessmetrics.AwsBusinessMetric
import aws.sdk.kotlin.runtime.http.interceptors.businessmetrics.emitBusinessMetric
import aws.smithy.kotlin.runtime.auth.awscredentials.Credentials
import aws.smithy.kotlin.runtime.auth.awscredentials.CredentialsProvider
import aws.smithy.kotlin.runtime.auth.awscredentials.simpleClassName
Expand Down Expand Up @@ -36,13 +38,14 @@ public class EnvironmentCredentialsProvider(
coroutineContext.trace<EnvironmentCredentialsProvider> {
"Attempting to load credentials from env vars $ACCESS_KEY_ID/$SECRET_ACCESS_KEY/$SESSION_TOKEN"
}

return credentials(
accessKeyId = requireEnv(ACCESS_KEY_ID),
secretAccessKey = requireEnv(SECRET_ACCESS_KEY),
sessionToken = getEnv(SESSION_TOKEN),
providerName = PROVIDER_NAME,
accountId = getEnv(ACCOUNT_ID),
)
).emitBusinessMetric(AwsBusinessMetric.Credentials.CREDENTIALS_ENV_VARS)
}

override fun toString(): String = this.simpleClassName
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@ import aws.sdk.kotlin.runtime.config.AwsSdkSetting
import aws.sdk.kotlin.runtime.config.imds.EC2MetadataError
import aws.sdk.kotlin.runtime.config.imds.ImdsClient
import aws.sdk.kotlin.runtime.config.imds.InstanceMetadataProvider
import aws.sdk.kotlin.runtime.http.interceptors.businessmetrics.AwsBusinessMetric
import aws.sdk.kotlin.runtime.http.interceptors.businessmetrics.emitBusinessMetric
import aws.smithy.kotlin.runtime.auth.awscredentials.*
import aws.smithy.kotlin.runtime.collections.Attributes
import aws.smithy.kotlin.runtime.config.resolve
Expand Down Expand Up @@ -106,7 +108,7 @@ public class ImdsCredentialsProvider(
resp.sessionToken,
resp.expiration,
PROVIDER_NAME,
)
).emitBusinessMetric(AwsBusinessMetric.Credentials.CREDENTIALS_IMDS)

creds.also {
mu.withLock { previousCredentials = it }
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
package aws.sdk.kotlin.runtime.auth.credentials

import aws.sdk.kotlin.runtime.http.interceptors.businessmetrics.emitBusinessMetric
import aws.smithy.kotlin.runtime.auth.awscredentials.Credentials
import aws.smithy.kotlin.runtime.auth.awscredentials.CredentialsProvider
import aws.smithy.kotlin.runtime.businessmetrics.BusinessMetric
import aws.smithy.kotlin.runtime.collections.Attributes

/**
Expand All @@ -10,15 +12,21 @@ import aws.smithy.kotlin.runtime.collections.Attributes
* or should be deferred until credentials are actually needed.
*
* @param providerName The name of the credentials provider that is being wrapped. Will default to "LazilyInitializedCredentialsProvider".
* @param businessMetric The provider's business metric to emit when credentials are resolved.
* @param initializer A lambda function that provides the actual [CredentialsProvider] to be initialized lazily.
*/
public class LazilyInitializedCredentialsProvider(
private val providerName: String = "LazilyInitializedCredentialsProvider",
private val businessMetric: BusinessMetric? = null,
initializer: () -> CredentialsProvider,
) : CredentialsProvider {
private val provider = lazy(initializer)

override suspend fun resolve(attributes: Attributes): Credentials = provider.value.resolve(attributes)
override suspend fun resolve(attributes: Attributes): Credentials {
val credentials = provider.value.resolve(attributes)
if (businessMetric == null) return credentials
return credentials.emitBusinessMetric(businessMetric)
}

override fun toString(): String = providerName
}
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,9 @@
package aws.sdk.kotlin.runtime.auth.credentials

import aws.sdk.kotlin.runtime.auth.credentials.internal.credentials
import aws.smithy.kotlin.runtime.auth.awscredentials.Credentials
import aws.smithy.kotlin.runtime.auth.awscredentials.CredentialsProvider
import aws.smithy.kotlin.runtime.auth.awscredentials.CredentialsProviderException
import aws.smithy.kotlin.runtime.auth.awscredentials.simpleClassName
import aws.sdk.kotlin.runtime.http.interceptors.businessmetrics.AwsBusinessMetric
import aws.sdk.kotlin.runtime.http.interceptors.businessmetrics.emitBusinessMetric
import aws.smithy.kotlin.runtime.auth.awscredentials.*
import aws.smithy.kotlin.runtime.collections.Attributes
import aws.smithy.kotlin.runtime.serde.json.JsonDeserializer
import aws.smithy.kotlin.runtime.telemetry.logging.logger
Expand Down Expand Up @@ -68,14 +67,16 @@ public class ProcessCredentialsProvider(
val deserializer = JsonDeserializer(payload)

return when (val resp = deserializeJsonProcessCredentials(deserializer)) {
is JsonCredentialsResponse.SessionCredentials -> credentials(
resp.accessKeyId,
resp.secretAccessKey,
resp.sessionToken,
resp.expiration ?: Instant.MAX_VALUE,
PROVIDER_NAME,
resp.accountId,
)
is JsonCredentialsResponse.SessionCredentials -> {
credentials(
resp.accessKeyId,
resp.secretAccessKey,
resp.sessionToken,
resp.expiration ?: Instant.MAX_VALUE,
PROVIDER_NAME,
resp.accountId,
).emitBusinessMetric(AwsBusinessMetric.Credentials.CREDENTIALS_PROCESS)
}
else -> throw CredentialsProviderException("Credentials response was not of expected format")
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,16 +9,17 @@ import aws.sdk.kotlin.runtime.InternalSdkApi
import aws.sdk.kotlin.runtime.auth.credentials.profile.LeafProvider
import aws.sdk.kotlin.runtime.auth.credentials.profile.ProfileChain
import aws.sdk.kotlin.runtime.auth.credentials.profile.RoleArn
import aws.sdk.kotlin.runtime.auth.credentials.profile.RoleArnSource
import aws.sdk.kotlin.runtime.client.AwsClientOption
import aws.sdk.kotlin.runtime.config.AwsSdkSetting
import aws.sdk.kotlin.runtime.config.imds.ImdsClient
import aws.sdk.kotlin.runtime.config.profile.AwsConfigurationSource
import aws.sdk.kotlin.runtime.config.profile.loadAwsSharedConfig
import aws.sdk.kotlin.runtime.http.interceptors.businessmetrics.AwsBusinessMetric
import aws.sdk.kotlin.runtime.http.interceptors.businessmetrics.emitBusinessMetrics
import aws.sdk.kotlin.runtime.region.resolveRegion
import aws.smithy.kotlin.runtime.auth.awscredentials.CloseableCredentialsProvider
import aws.smithy.kotlin.runtime.auth.awscredentials.Credentials
import aws.smithy.kotlin.runtime.auth.awscredentials.CredentialsProvider
import aws.smithy.kotlin.runtime.auth.awscredentials.simpleClassName
import aws.smithy.kotlin.runtime.auth.awscredentials.*
import aws.smithy.kotlin.runtime.businessmetrics.BusinessMetrics
import aws.smithy.kotlin.runtime.collections.Attributes
import aws.smithy.kotlin.runtime.http.engine.HttpClientEngine
import aws.smithy.kotlin.runtime.io.closeIfCloseable
Expand Down Expand Up @@ -86,6 +87,7 @@ public class ProfileCredentialsProvider @InternalSdkApi constructor(
public val httpClient: HttpClientEngine? = null,
public val configurationSource: AwsConfigurationSource? = null,
) : CloseableCredentialsProvider {
private val credentialsBusinessMetrics: MutableSet<String> = mutableSetOf()

public constructor(
profileName: String? = null,
Expand Down Expand Up @@ -131,12 +133,21 @@ public class ProfileCredentialsProvider @InternalSdkApi constructor(

chain.roles.forEach { roleArn ->
logger.debug { "Assuming role `${roleArn.roleArn}`" }
if (roleArn.source == RoleArnSource.SOURCE_PROFILE) {
credentialsBusinessMetrics.add(AwsBusinessMetric.Credentials.CREDENTIALS_PROFILE_SOURCE_PROFILE.identifier)
}

val assumeProvider = roleArn.toCredentialsProvider(creds, region)

creds.attributes.getOrNull(BusinessMetrics)?.forEach { metric ->
credentialsBusinessMetrics.add(metric)
}

creds = assumeProvider.resolve(attributes)
}

logger.debug { "Obtained credentials from profile; expiration=${creds.expiration?.format(TimestampFormat.ISO_8601)}" }
return creds
return creds.emitBusinessMetrics(credentialsBusinessMetrics)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

note: We're calling emitBusinessMetrics on a creds which might already have business metrics applied, which would result in duplication if you weren't using a MutableSet (which you might not want to be, based on my other comment above)

}

override fun close() {
Expand All @@ -147,10 +158,13 @@ public class ProfileCredentialsProvider @InternalSdkApi constructor(

private suspend fun LeafProvider.toCredentialsProvider(region: LazyAsyncValue<String?>): CredentialsProvider =
when (this) {
is LeafProvider.NamedSource -> namedProviders[name]
?: throw ProviderConfigurationException("unknown credentials source: $name")
is LeafProvider.NamedSource -> namedProviders[name].also {
credentialsBusinessMetrics.add(AwsBusinessMetric.Credentials.CREDENTIALS_PROFILE_NAMED_PROVIDER.identifier)
} ?: throw ProviderConfigurationException("unknown credentials source: $name")

is LeafProvider.AccessKey -> StaticCredentialsProvider(credentials)
is LeafProvider.AccessKey -> StaticCredentialsProvider(credentials).also {
credentialsBusinessMetrics.add(AwsBusinessMetric.Credentials.CREDENTIALS_PROFILE.identifier)
}

is LeafProvider.WebIdentityTokenRole -> StsWebIdentityCredentialsProvider(
roleArn,
Expand All @@ -159,7 +173,9 @@ public class ProfileCredentialsProvider @InternalSdkApi constructor(
roleSessionName = sessionName,
platformProvider = platformProvider,
httpClient = httpClient,
)
).also {
credentialsBusinessMetrics.add(AwsBusinessMetric.Credentials.CREDENTIALS_PROFILE_STS_WEB_ID_TOKEN.identifier)
}

is LeafProvider.SsoSession -> SsoCredentialsProvider(
accountId = ssoAccountId,
Expand All @@ -169,7 +185,9 @@ public class ProfileCredentialsProvider @InternalSdkApi constructor(
ssoSessionName = ssoSessionName,
httpClient = httpClient,
platformProvider = platformProvider,
)
).also {
credentialsBusinessMetrics.add(AwsBusinessMetric.Credentials.CREDENTIALS_PROFILE_SSO.identifier)
}

is LeafProvider.LegacySso -> SsoCredentialsProvider(
accountId = ssoAccountId,
Expand All @@ -178,9 +196,13 @@ public class ProfileCredentialsProvider @InternalSdkApi constructor(
ssoRegion = ssoRegion,
httpClient = httpClient,
platformProvider = platformProvider,
)
).also {
credentialsBusinessMetrics.add(AwsBusinessMetric.Credentials.CREDENTIALS_PROFILE_SSO_LEGACY.identifier)
}

is LeafProvider.Process -> ProcessCredentialsProvider(command)
is LeafProvider.Process -> ProcessCredentialsProvider(command).also {
credentialsBusinessMetrics.add(AwsBusinessMetric.Credentials.CREDENTIALS_PROFILE_PROCESS.identifier)
}
}

private suspend fun RoleArn.toCredentialsProvider(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,14 +8,12 @@ package aws.sdk.kotlin.runtime.auth.credentials
import aws.sdk.kotlin.runtime.auth.credentials.internal.credentials
import aws.sdk.kotlin.runtime.auth.credentials.internal.sso.SsoClient
import aws.sdk.kotlin.runtime.auth.credentials.internal.sso.getRoleCredentials
import aws.smithy.kotlin.runtime.auth.awscredentials.Credentials
import aws.smithy.kotlin.runtime.auth.awscredentials.CredentialsProvider
import aws.smithy.kotlin.runtime.auth.awscredentials.CredentialsProviderException
import aws.smithy.kotlin.runtime.auth.awscredentials.simpleClassName
import aws.sdk.kotlin.runtime.http.interceptors.businessmetrics.AwsBusinessMetric
import aws.sdk.kotlin.runtime.http.interceptors.businessmetrics.emitBusinessMetric
import aws.smithy.kotlin.runtime.auth.awscredentials.*
import aws.smithy.kotlin.runtime.client.SdkClientOption
import aws.smithy.kotlin.runtime.collections.Attributes
import aws.smithy.kotlin.runtime.http.engine.HttpClientEngine
import aws.smithy.kotlin.runtime.serde.json.*
import aws.smithy.kotlin.runtime.telemetry.logging.logger
import aws.smithy.kotlin.runtime.telemetry.telemetryProvider
import aws.smithy.kotlin.runtime.time.Clock
Expand Down Expand Up @@ -121,14 +119,20 @@ public class SsoCredentialsProvider public constructor(

val roleCredentials = resp.roleCredentials ?: throw CredentialsProviderException("Expected SSO roleCredentials to not be null")

return credentials(
val creds = credentials(
accessKeyId = checkNotNull(roleCredentials.accessKeyId) { "Expected accessKeyId in SSO roleCredentials response" },
secretAccessKey = checkNotNull(roleCredentials.secretAccessKey) { "Expected secretAccessKey in SSO roleCredentials response" },
sessionToken = roleCredentials.sessionToken,
expiration = Instant.fromEpochMilliseconds(roleCredentials.expiration),
PROVIDER_NAME,
accountId = accountId,
)

return if (ssoTokenProvider != null) {
creds.emitBusinessMetric(AwsBusinessMetric.Credentials.CREDENTIALS_SSO)
} else {
creds.emitBusinessMetric(AwsBusinessMetric.Credentials.CREDENTIALS_SSO_LEGACY)
}
}

// non sso-session legacy token flow
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@ import aws.sdk.kotlin.runtime.auth.credentials.internal.sts.model.PolicyDescript
import aws.sdk.kotlin.runtime.auth.credentials.internal.sts.model.RegionDisabledException
import aws.sdk.kotlin.runtime.auth.credentials.internal.sts.model.Tag
import aws.sdk.kotlin.runtime.config.AwsSdkSetting
import aws.sdk.kotlin.runtime.http.interceptors.businessmetrics.AwsBusinessMetric
import aws.sdk.kotlin.runtime.http.interceptors.businessmetrics.emitBusinessMetric
import aws.smithy.kotlin.runtime.auth.awscredentials.*
import aws.smithy.kotlin.runtime.client.SdkClientOption
import aws.smithy.kotlin.runtime.collections.Attributes
Expand Down Expand Up @@ -146,7 +148,7 @@ public class StsAssumeRoleCredentialsProvider(
expiration = roleCredentials.expiration,
providerName = PROVIDER_NAME,
accountId = accountId,
)
).emitBusinessMetric(AwsBusinessMetric.Credentials.CREDENTIALS_STS_ASSUME_ROLE)
}

override fun toString(): String = this.simpleClassName
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@ import aws.sdk.kotlin.runtime.auth.credentials.internal.sts.StsClient
import aws.sdk.kotlin.runtime.auth.credentials.internal.sts.assumeRoleWithWebIdentity
import aws.sdk.kotlin.runtime.auth.credentials.internal.sts.model.PolicyDescriptorType
import aws.sdk.kotlin.runtime.config.AwsSdkSetting
import aws.sdk.kotlin.runtime.http.interceptors.businessmetrics.AwsBusinessMetric
import aws.sdk.kotlin.runtime.http.interceptors.businessmetrics.emitBusinessMetric
import aws.smithy.kotlin.runtime.auth.awscredentials.*
import aws.smithy.kotlin.runtime.client.SdkClientOption
import aws.smithy.kotlin.runtime.collections.Attributes
Expand Down Expand Up @@ -104,6 +106,7 @@ public class StsWebIdentityCredentialsProvider(
override suspend fun resolve(attributes: Attributes): Credentials {
val logger = coroutineContext.logger<StsAssumeRoleCredentialsProvider>()
logger.debug { "retrieving assumed credentials via web identity" }

val provider = this
val params = provider.webIdentityParameters

Expand Down Expand Up @@ -149,7 +152,7 @@ public class StsWebIdentityCredentialsProvider(
expiration = roleCredentials.expiration,
providerName = PROVIDER_NAME,
accountId = accountId,
)
).emitBusinessMetric(AwsBusinessMetric.Credentials.CREDENTIALS_STS_ASSUME_ROLE_WEB_ID)
}

override fun toString(): String = this.simpleClassName
Expand Down
Loading
Loading