Serilog: Add Processor via appSettings.json #5249
|
I have the following processor: When I attempt to add it to Is there a known/better way of adding processors via appSettings.json? Thank you for any guidance you can provide. 🙏 |
Replies: 3 comments 11 replies
|
Hey @Mike-E-angelo , there's an example of adding a custom processor in code in our samples: sentry-dotnet/samples/Sentry.Samples.AspNetCore.Mvc/Program.cs Lines 75 to 76 in 7111fb5 |
|
@Mike-E-angelo there are two different overloads of the serilog integration.
When using ASP.NET Core, the Sentry SDK will be initialised via the WebHost extensions (e.g. here) so you do not want to initialise it when setting up the Serilog sink. You should only initialise Serilog with a DSN if you're using Serilog in a command line application or a Background service or something (i.e. if you haven't already initialised Sentry via one of the other integrations). This is a constant point of confusion in the SDK today, which I think we should change: |
|
@Mike-E-angelo so that we're on the same page, could you create an issue with a minimal reproducible example of the problem you're seeing? |

@Mike-E-angelo so that we're on the same page, could you create an issue with a minimal reproducible example of the problem you're seeing?