Skip to content

Conversation

@chungjac
Copy link
Contributor

@chungjac chungjac commented Nov 18, 2025

Problem

need to emit createToken metric from client

Solution

add createToken metric

Testing

jb

@chungjac chungjac force-pushed the createToken branch 3 times, most recently from 452e51c to ae0e895 Compare November 20, 2025 02:04
@chungjac chungjac marked this pull request as ready for review November 21, 2025 01:06
@chungjac chungjac requested a review from a team as a code owner November 21, 2025 01:06
it.clientSecret(registration.clientSecret)
it.grantType(DEVICE_GRANT_TYPE)
it.deviceCode(authorization.deviceCode)
val startTime = clock.instant()
Copy link
Contributor

Choose a reason for hiding this comment

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

let's use OTel for new metrics

Telemetry.auth.ssoTokenOperation { metric ->
    try {
        client.createToken {...}
        metric.grantType(...)
        // duration should be automatically calculated
    } catch (e: Exception) {
        metric.httpStatusCode(...)
        // reason/reasonDesc should be automatically populated but confirm
        throw e
    }
}

@rli rli merged commit 839abe2 into aws:main Nov 21, 2025
13 of 16 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants