serilog-sinks-sentry
serilog-sinks-sentry copied to clipboard
Enviroment tag is not filled
Default sentry dehavior fill environment tag with ASPNETCORE_ENVIRONMENT variable. But with I use Serilog, this tag comes empty.
The sink uses the legacy Sentry library which is not Core-aware https://github.com/getsentry/raven-csharp I'd recommend using the official Sentry sink for ASP.NET Core projects https://www.nuget.org/packages/Sentry.Serilog
@olsh Thanks for the info. That infomation is not clear from what is in the README of this project. Maybe it's worth adding that.
@staticdev You know you can also manually set that value. E.g.
"Serilog": {
"Using": [ "Serilog.Sinks.Async", "Sentry.Serilog" ],
"MinimumLevel": {
"Default": "Warning",
"Override": {
"Sentry": "Error"
}
},
"WriteTo": [
{
"Name": "Async",
"Args": {
"configure": [
{
"Name": "Console"
},
{
"Name": "Sentry",
"Args": {
"Dsn": "<snip>",
"AttachStacktrace": "true",
"Environment": "Production"
}
}
]
}
}
]
},
Yes @PureKrome but that is not what I want. I want to ge the already defined variables, not define new ones. Sentry official library does this by default.