ApplicationInsights-dotnet
ApplicationInsights-dotnet copied to clipboard
Address #2539 by caching auth token
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.
@TimothyMothra PTAL
@TimothyMothra, PTAL