-
Notifications
You must be signed in to change notification settings - Fork 841
Deprecate AddServiceLogEnricher method with its overloads, introduce replacements #6529
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
Deprecate AddServiceLogEnricher method with its overloads, introduce replacements #6529
Conversation
bbc09ed to
ed2d9bc
Compare
ed2d9bc to
79e5bec
Compare
|
@joperezr please review for |
It is adding obsolete attributes to some APIs which is a breaking change though. Should we delay that till next major version bump? |
|
to be merged for 10.0.0 release only |
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.
Pull Request Overview
This PR renames the "Service Log Enricher" API to "Application Log Enricher" to better reflect its functionality. The existing AddServiceLogEnricher() methods are marked as obsolete with redirects to the new AddApplicationLogEnricher() methods, ensuring backward compatibility during the transition period.
Key changes:
- New
AddApplicationLogEnricher()methods marked as experimental APIs - Obsoleted the old
AddServiceLogEnricher()methods with diagnostic ID EXTOBS0002 - Updated all test files, documentation, and internal references to use the new naming
Reviewed Changes
Copilot reviewed 11 out of 11 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| ApplicationEnricherServiceCollectionExtensions.cs | Added new AddApplicationLogEnricher() methods and obsoleted old AddServiceLogEnricher() methods with forwarding implementations |
| DiagnosticIds.cs | Added EXTOBS0002 diagnostic ID and obsolete message for the telemetry API transition |
| ApplicationLogEnricherOptions.cs | Updated XML documentation from "service" to "application" log enricher |
| README.md | Updated documentation examples to use new AddApplicationLogEnricher() method names |
| list-of-diagnostics.md | Added documentation entry for EXTOBS0002 obsolete diagnostic |
| ApplicationEnricherExtensionsTests.cs | Updated tests to use new AddApplicationLogEnricher() method names |
| ApplicationEnricherOptionsTests.cs | Renamed test method to reflect new naming convention |
| ApplicationLogEnricherTests.cs | Renamed variables and test methods for consistency with new naming |
| ServiceEnricherExtensionsTests.cs | New test file for obsolete API validation |
| Microsoft.Extensions.Telemetry.Tests.csproj | Added NoWarn for CS0436 and InjectObsoleteAttributeOnLegacy configuration |
| Microsoft.Extensions.Telemetry.csproj | Added NoWarn for CS0436 and InjectObsoleteAttributeOnLegacy configuration |
.../Microsoft.Extensions.Telemetry/Enrichment/ApplicationEnricherServiceCollectionExtensions.cs
Outdated
Show resolved
Hide resolved
.../Microsoft.Extensions.Telemetry/Enrichment/ApplicationEnricherServiceCollectionExtensions.cs
Outdated
Show resolved
Hide resolved
…ationEnricherServiceCollectionExtensions.cs Co-authored-by: Copilot <[email protected]>
…ationEnricherServiceCollectionExtensions.cs Co-authored-by: Copilot <[email protected]>
|
@joperezr could you please review, approve, merge? |
.../Microsoft.Extensions.Telemetry/Enrichment/ApplicationEnricherServiceCollectionExtensions.cs
Show resolved
Hide resolved
.../Microsoft.Extensions.Telemetry/Enrichment/ApplicationEnricherServiceCollectionExtensions.cs
Show resolved
Hide resolved
.../Microsoft.Extensions.Telemetry/Enrichment/ApplicationEnricherServiceCollectionExtensions.cs
Outdated
Show resolved
Hide resolved
|
/azp run extensions-ci |
|
Azure Pipelines successfully started running 1 pipeline(s). |
src/Libraries/Microsoft.Extensions.Telemetry/Microsoft.Extensions.Telemetry.csproj
Show resolved
Hide resolved
joperezr
left a comment
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.
Minor NIT but looks good otherwise.
|
I queued a rebuild given we added net10 TFM to the repo, so just to make sure that these new tests work there as well |
Resolves #6532