Skip to content

Add logging buffering - #5635

Merged
evgenyfedorov2 merged 55 commits into
dotnet:mainfrom
evgenyfedorov2:evgenyfedorov2/log_buffering
Apr 9, 2025
Merged

Add logging buffering#5635
evgenyfedorov2 merged 55 commits into
dotnet:mainfrom
evgenyfedorov2:evgenyfedorov2/log_buffering

Conversation

@evgenyfedorov2

@evgenyfedorov2evgenyfedorov2 commented Nov 13, 2024

Copy link
Copy Markdown
Member

Related to the #5123 proposal, this PR is focused on the logging buffering only. See also the sampling part #5574.

Microsoft Reviewers: Open in CodeFlow

Comment threadsrc/Libraries/Microsoft.Extensions.Telemetry/Logging/ExtendedLogger.cs Outdated
Comment threadsrc/Libraries/Microsoft.Extensions.Telemetry/Logging/ExtendedLogger.cs Outdated
Comment threadsrc/Libraries/Microsoft.Extensions.Telemetry/Logging/ExtendedLogger.cs Outdated
@evgenyfedorov2
evgenyfedorov2force-pushed the evgenyfedorov2/log_buffering branch 2 times, most recently from e40b7b6 to 9d61d12CompareDecember 12, 2024 16:30
@evgenyfedorov2
evgenyfedorov2force-pushed the evgenyfedorov2/log_buffering branch from 9d61d12 to 2f1a335CompareDecember 12, 2024 17:36
Comment threadsrc/Libraries/Microsoft.Extensions.Telemetry/Buffering/BufferFilterRule.cs Outdated
Address PR comments
Add .NET 8 support
Add ExceptionJsonConverter
@evgenyfedorov2
evgenyfedorov2force-pushed the evgenyfedorov2/log_buffering branch from 883334d to 022f00cCompareDecember 16, 2024 14:23
@evgenyfedorov2
evgenyfedorov2force-pushed the evgenyfedorov2/log_buffering branch from 022f00c to a371d9cCompareDecember 16, 2024 14:51
@dotnet-comment-bot

Copy link
Copy Markdown
Collaborator

‼️Found issues‼️

ProjectCoverage TypeExpectedActual
Microsoft.AspNetCore.Diagnostics.MiddlewareLine10096.03 🔻
Microsoft.AspNetCore.Diagnostics.MiddlewareBranch10098.51 🔻
Microsoft.Extensions.TelemetryLine9386.2 🔻
Microsoft.Extensions.TelemetryBranch9384.59 🔻
Microsoft.Extensions.Diagnostics.TestingLine9985.78 🔻
Microsoft.Extensions.Diagnostics.TestingBranch9979.57 🔻

🎉 Good job! The coverage increased 🎉
Update MinCodeCoverage in the project files.

ProjectExpectedActual
Microsoft.Extensions.Diagnostics.Probes7076
Microsoft.Extensions.Caching.Hybrid7586
Microsoft.Extensions.AI.OpenAI7277

Full code coverage report: https://dev.azure.com/dnceng-public/public/_build/results?buildId=896358&view=codecoverage-tab

Comment threadsrc/Libraries/Microsoft.Extensions.Telemetry/Logging/ExtendedLogger.cs Outdated
Comment threadsrc/Libraries/Microsoft.Extensions.Telemetry/Buffering/GlobalBuffer.cs Outdated
Comment threadsrc/Libraries/Microsoft.Extensions.Telemetry/Buffering/ILoggingBuffer.cs Outdated
Comment threadsrc/Libraries/Microsoft.Extensions.Telemetry/Buffering/GlobalBuffer.cs Outdated
Comment threadsrc/Libraries/Microsoft.Extensions.Telemetry/ILoggerFilterRule.cs Outdated
Comment threadsrc/Libraries/Microsoft.Extensions.Telemetry/Buffering/BufferSink.cs Outdated
Comment threadsrc/Shared/ExceptionJsonConverter/ExceptionJsonConverter.cs Outdated
Comment threadsrc/Shared/ExceptionJsonConverter/ExceptionJsonConverter.cs Outdated
Comment threadsrc/Libraries/Microsoft.Extensions.Telemetry/Buffering/PooledLogRecord.cs Outdated
@evgenyfedorov2
evgenyfedorov2force-pushed the evgenyfedorov2/log_buffering branch from e16928a to f6a2decCompareMarch 26, 2025 16:29
@evgenyfedorov2
evgenyfedorov2force-pushed the evgenyfedorov2/log_buffering branch 4 times, most recently from f01cbff to edcd424CompareMarch 27, 2025 16:24
@evgenyfedorov2
evgenyfedorov2force-pushed the evgenyfedorov2/log_buffering branch from edcd424 to 6e92aecCompareMarch 27, 2025 17:10
@evgenyfedorov2
evgenyfedorov2 enabled auto-merge (squash) April 2, 2025 13:18
@evgenyfedorov2

Copy link
Copy Markdown
MemberAuthor

@dariusclay, could you please help review this on behalf of the telemetry area? Thanks!

@evgenyfedorov2

Copy link
Copy Markdown
MemberAuthor

@RussKie could you review this for the parts related to dotnet/dotnet-extensions-infra parts, please?

@RussKieRussKie left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approving the infra side, but noting possible implementation issues.

@RussKie
RussKie disabled auto-merge April 8, 2025 23:51
@RussKieRussKie added the waiting-author-feedback 📭 The author of this issue needs to respond in order for us to continue investigating this issue. label Apr 8, 2025
@dotnet-policy-servicedotnet-policy-serviceBot removed the waiting-author-feedback 📭 The author of this issue needs to respond in order for us to continue investigating this issue. label Apr 9, 2025

namespace Microsoft.Extensions.Diagnostics.Buffering;

internal sealed class StringifyComprarer : IEqualityComparer<KeyValuePair<string, object?>>

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should have been StringifyComparer, not StringifyComprarer. It's not public though.

@github-actionsgithub-actionsBot locked and limited conversation to collaborators May 9, 2025
Sign up for freeto subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants

@evgenyfedorov2@dotnet-comment-bot@tarekgh@KalleOlaviNiemitalo@RussKie@noahfalk@geeknoid