-
Notifications
You must be signed in to change notification settings - Fork 63
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
Support BeginScope #2251
Comments
|
Thank you for your bug report, @dingmeng-xue and @Shilpapagare. Could both of you please clarify what logging provider you are using along with Microsoft.Extensions.Logging? |
@nr-ahemsath I am using Serilog; |
@nr-ahemsath , Serilog or console |
@dingmeng-xue and @Shilpapagare: thank you for responding. Right now, the agent handles the data passed as arguments to When configured using Serilog as the underlying logging provider, and the context data forwarding featured enabled, the following code:
results in log data being sent to New Relic that looks like:
The Unfortunately, when using the built-in console logger for Microsoft.Extensions.Logging, there does appear to be a bug in the agent where the scope data is not being picked up correctly. I will be creating that as a separate issue and will reference it here. As far as a timeline for a fix, we can't say anything until we've done some initial investigation as to the root cause. |
@dingmeng-xue @Shilpapagare Good news, the bug that was preventing context data capture from working when using the built-in console logger with Microsoft.Extensions.Logging has been fixed (thank you @lowell-trimble !!) so this issue should be resolved now. Please let us know if you're still having an issue. |
Is your feature request related to a problem? Please describe.
We expect newrelic-dotnet-agent can support scope information
Feature Description
.NET logger supports BeginScope
For instance, below is my code which is part of sample WeatherForecast sample app. I only logger related 2 lines.
and enable scope of logging in appsettings.json
When I execute it locally, I can see console output including scope message
However, I cannot see scope message on logs page in newrelic portal.
Priority
Must Have
The text was updated successfully, but these errors were encountered: