custom configuration-time properties for serilog? #2312
-
Splunk's serilog sink allows setting a "source", which we set to "WeatherApi", "BlogPostApi", etc. so we can store logs from all our services in one splunk index, but still easily focus on just one at a time when we're tracking down a problem. Am I missing something or is there no easy way to do the equivalent in the seq sink? We could even use something like the CustomFields property and set it at configuration time. The only other solution I'm thinking of is just pushing some unique hardcoded log context at app startup, but that doesn't seem as nice, nor does it fit in well with our existing model. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 2 replies
-
Hi Mo, The best solution for this with Seq is to give each source a unique API key. Then, in the API key configuration on the Seq side, apply a property This has a few advantages -
Docs on API keys are in https://docs.datalust.co/docs/api-keys. If you decide to go the other way and configure it client-side, the Hope this helps, |
Beta Was this translation helpful? Give feedback.
Hi Mo,
The best solution for this with Seq is to give each source a unique API key. Then, in the API key configuration on the Seq side, apply a property
Source = ...
to identify the events that are ingested using that API key. You can attach multiple properties to each key, so this is also whereEnvironment
etc. would normally be applied, if you need them.This has a few advantages -
Docs on API ke…