Skip to content

Commit

Permalink
Adding credential load telemetry (#1325)
Browse files Browse the repository at this point in the history
  • Loading branch information
kiiadi authored Oct 6, 2020
1 parent 786fa13 commit d0ff883
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
1 change: 1 addition & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,4 @@ resources/endpoints.json
third-party/**
CHANGELOG.md
src/shared/telemetry/service-2.json
.changes
5 changes: 4 additions & 1 deletion src/credentials/providers/credentialsProviderManager.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@

import { CredentialsProvider } from './credentialsProvider'
import { CredentialsProviderFactory } from './credentialsProviderFactory'
import { recordAwsLoadCredentials } from '../../shared/telemetry/telemetry'
import { asString, CredentialsProviderId } from './credentialsProviderId'

/**
Expand All @@ -20,7 +21,9 @@ export class CredentialsProviderManager {
for (const factory of this.providerFactories) {
await factory.refresh()

providers = providers.concat(factory.listProviders())
const refreshed = factory.listProviders()
recordAwsLoadCredentials({ credentialSourceId: factory.getCredentialType(), value: refreshed.length })
providers = providers.concat(refreshed)
}

return providers
Expand Down

0 comments on commit d0ff883

Please sign in to comment.