ApplicationInsights-dotnet icon indicating copy to clipboard operation
ApplicationInsights-dotnet copied to clipboard

Address #2539 by caching auth token

Open pharring opened this issue 2 years ago • 2 comments

Fix Issue #2539.

Changes

Cache the Authentication Token provided by CredentialEnvelope to improve performance and eliminate a continuous trace loop.

Introduce a CachedReflectionCredentialEnvelope class, derived from ReflectionCredentialEnvelope and use it when constructing the credential envelope in TelemetryConfiguration. The cached version will check if the cached auth token still has enough remaining lifetime (at least 5 minutes, by default) to be re-used.

Checklist

  • [x] I ran Unit Tests locally.
  • [x] CHANGELOG.md updated with one line description of the fix, and a link to the original issue if available.

pharring avatar Dec 07 '22 21:12 pharring

@TimothyMothra PTAL

pharring avatar Feb 13 '23 17:02 pharring

@TimothyMothra, PTAL

pharring avatar Jun 17 '23 01:06 pharring