-
Notifications
You must be signed in to change notification settings - Fork 749
telemetry(auth): debounce aws_loadCredentials and add debugging information
#6499
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
Conversation
|
|
Is everyone spam calling this one? Can we create a build and run it locally for a day to see if we can fix it before the next release? |
|
From the telemetry, it seems that there are many users spamming this one, but not everyone. Messed around with the toolkit for a while and wasn't able to determine source or notice any clear correlations with other metrics in telemetry. It does emit 4x on startup, and multiple times when the source of the credentials are changed. However, I can keep digging. Its possible adding the decorator in more places could be valuable. |
| } | ||
| const telemType = credentialsProviderToTelemetryType(providerType) | ||
| telemetry.aws_loadCredentials.emit({ credentialSourceId: telemType, value: refreshed.length }) | ||
| const emitWithDebounce = cancellableDebounce( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think this will work as you intend. I think you need to move this cancellableDebounce() call to a class parameter since this creates a new instance each time
| private readonly providerFactories: CredentialsProviderFactory[] = [] | ||
| private readonly providers: CredentialsProvider[] = [] | ||
|
|
||
| @withTelemetryContext({ name: 'getAllCredentialsProvider', class: credentialsProviderManagerClassName, emit: true }) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
And this emits every call, possible chance this will be noisy. But it should hopefully not break anything before we remove it
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah I added a techdebt test to ensure we remove this.
|
Despite code freeze I think we should merge this one as well. Otherwise we will need to wait another week to further debug this problem |
…ormation (aws#6499) ## Problem This metric is currently being spammed in telemetry at unusual volume. It is suspected that this is connected to this change: https://github.com/aws/aws-toolkit-vscode/pull/5979/files, but the connection is not yet clear. ## Solution - use the `withTelemetryContext` decorator to emit a `function_call` metric to capture additional information. This metric should allow us to determine what is calling this function so much. Added techdebt test to remove this debugging information before the following release. - debounce the current emit line that is causing the high volume emission. ## Future Work - `debounce` reimplements a special case of `debounceWithCancel`, these can be redone to reduce code and improve reliability. --- - Treat all work as PUBLIC. Private `feature/x` branches will not be squash-merged at release time. - Your code changes must meet the guidelines in [CONTRIBUTING.md](https://github.com/aws/aws-toolkit-vscode/blob/master/CONTRIBUTING.md#guidelines). - License: I confirm that my contribution is made under the terms of the Apache 2.0 license.
Problem
This metric is currently being spammed in telemetry at unusual volume. It is suspected that this is connected to this change: https://github.com/aws/aws-toolkit-vscode/pull/5979/files, but the connection is not yet clear.
Solution
withTelemetryContextdecorator to emit afunction_callmetric to capture additional information. This metric should allow us to determine what is calling this function so much. Added techdebt test to remove this debugging information before the following release.Future Work
debouncereimplements a special case ofdebounceWithCancel, these can be redone to reduce code and improve reliability.feature/xbranches will not be squash-merged at release time.