Skip to content
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

LogRecord pipeline addition #5124

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

CodeBlanch
Copy link

The existing EventLogsPipeline routes log messages retrieved using Microsoft-Extensions-Logging through an ILogger shim. There isn't anything necessarily wrong with this, but it adds a lot of extra work and memory pressure to the monitoring host. There also really isn't a way to add data such as Timestamp, TraceId, SpanId, etc., without having to hack ILogger.

Working through a prototype of a dotnet-monitor which exports OpenTelemetry format (OTLP) we (@samsp-msft @wiktork and @rajkumar-rangaraj) felt it was better to treat logging as we do the other pipelines and have a simple DTO to store all the log information (independent of ILogger) consumers can use to process logs.

What this PR does is add a new interface into EventLogsPipeline (ILogRecordLogger) which can be used to opt-into this new pipeline behavior.

Once consumers have been updated we should be able to remove the old one. But they exist side-by-side for now so nothing currently reliant on the internals breaks.

@CodeBlanch CodeBlanch requested a review from a team as a code owner December 20, 2024 22:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant