Use domain name only for telemetry metadata addresses to reduce OpenTelemetry cardinality#3327
Use domain name only for telemetry metadata addresses to reduce OpenTelemetry cardinality#3327
Conversation
Co-authored-by: westin-m <127992899+westin-m@users.noreply.github.com>
Co-authored-by: westin-m <127992899+westin-m@users.noreply.github.com>
|
@copilot there are test failures that look to be caused by AppContext switch interference. Please address this |
…attribute Co-authored-by: westin-m <127992899+westin-m@users.noreply.github.com>
Fixed the AppContext switch test interference by adding the |
…tps://github.com/AzureAD/azure-activedirectory-identitymodel-extensions-for-dotnet into copilot/fix-d17fdc27-51d2-412f-bc68-4eb999a2a2e3
There was a problem hiding this comment.
This test kept failing when ran alongside the new ones introduced by this PR. Putting them in the same collection was the most minimal and only effective solution I found.
This comment was marked as outdated.
This comment was marked as outdated.
SummarySummary
CoverageMicrosoft.IdentityModel.JsonWebTokens - 80.3%
|
SummarySummary
CoverageMicrosoft.IdentityModel.JsonWebTokens - 80.3%
|
SummarySummary
CoverageMicrosoft.IdentityModel.JsonWebTokens - 80.3%
|
| return metadataAddress; | ||
|
|
||
|
|
||
| if (Uri.TryCreate(metadataAddress, UriKind.Absolute, out Uri result)) |
There was a problem hiding this comment.
Metadata address is static per configuration manager. We can cache and avoid perf hit and allocations on the hot path.
Implementation Complete ✅
Successfully implemented the telemetry domain extraction feature and addressed all feedback:
Feedback Addressed:
@GeoK's Performance Comment: Removed the www. prefix stripping operation to improve hot path performance (already addressed in commit e36a9b9)
@westin-m's Test Interference: Fixed AppContext switch interference by adding
[ResetAppContextSwitches]attribute to the test class for proper test isolationKey Features:
The implementation reduces OpenTelemetry cardinality while maintaining backward compatibility and performance.
Original prompt
💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.