Serilog: Add Processor via appSettings.json #5249
Replies: 3 comments 8 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 |
Beta Was this translation helpful? Give feedback.
-
|
@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: |
Beta Was this translation helpful? Give feedback.
-
|
@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? |
Beta Was this translation helpful? Give feedback.

Uh oh!
There was an error while loading. Please reload this page.
-
I have the following processor:
When I attempt to add it to
WriteToafter appSettings.json is read, I get an error:Is there a known/better way of adding processors via appSettings.json? Thank you for any guidance you can provide. 🙏
Beta Was this translation helpful? Give feedback.
All reactions