Skip to content

APM ILoggerProvider Implementation #894

@SuricateCan

Description

@SuricateCan

Is your feature request related to a problem? Please describe.
In a netcore application, errors can occur outside of a request (HostedService, Scheduled Job, EventBus). When that happens, APM does not transmit the error because it does not know the error occurred in the first place.

Describe the solution you'd like
I'd like to implement an ILoggerProvider (much like Sentry does it) to send these errors to APM. It would, of course, use the LogLevel established in the configuration to decide what to send.

Describe alternatives you've considered
Lots of people recommended using Serilog for logging purposes and enriching it with APM correlation, and I get it. However, I'm not interested in logging for the purpose of logging, using Logstash. I only care about the errors and I think APM should be the one to report it. Right?

Additional context
I'm also inclined to improve the declaration of this and other APM features using the IHostBuilder, hooking into the application much earlier in the startup process, but that is a topic for another issue.

Metadata

Metadata

Assignees

Labels

enhancementNew feature or request

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions