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

internal: true up internal metrics collection for post-SRA middleware #2642

Merged
merged 2 commits into from
May 15, 2024

Conversation

lucix-aws
Copy link
Contributor

  • correct timings for computation of endpoint resolution, signing, and identity retrieval metrics
  • remove old timings from deprecated sigv4 middleware (not strictly necessary but it removes the package dependency)
  • some of these files appear to have not been touched by gofmt previously - there are some incidental changes therein

@lucix-aws lucix-aws requested a review from a team as a code owner May 14, 2024 18:27
ResolveEndpointStartTime time.Time
ResolveEndpointEndTime time.Time
EndpointResolutionDuration time.Duration
GetIdentityStart, GetIdentityEnd time.Time
Copy link
Contributor

Choose a reason for hiding this comment

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

Should this be GetIdentityStartTime to follow the other MetricData members convention?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I elected to not since I felt it was obvious in the types, but I can change it. Note this API (all of this) is behind a private/"don't use, will break" disclaimer as well.

Copy link
Contributor

Choose a reason for hiding this comment

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

I'd go with consistency rather than make it obvious with the types

@@ -144,8 +145,6 @@ type AttemptMetrics struct {
ConnRequestedTime time.Time
ConnObtainedTime time.Time
ConcurrencyAcquireDuration time.Duration
CredentialFetchStartTime time.Time
Copy link
Contributor

Choose a reason for hiding this comment

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

I need a bit more context as to why are we removing these

Copy link
Contributor Author

Choose a reason for hiding this comment

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

It's no longer a per-attempt metric with the SRA auth refactor - credential (abstractly referred to now as identity) retrieval happened as part of the signing process in the now-deprecated sigv4 middleware, as part of an attempt lifecycle. Now it's its own middleware (GetIdentity) separate from signing and before the retry middleware i.e. before the attempt loop starts.

Long-term I think we do want to pull the start of the retry loop further back but that's out of scope for now.

@lucix-aws lucix-aws merged commit 05fcf66 into main May 15, 2024
13 checks passed
@lucix-aws lucix-aws deleted the feat-metricstrueup branch May 15, 2024 16:26
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.

2 participants