Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enviroment tag is not filled #20

Open
staticdev opened this issue Jun 24, 2019 · 4 comments
Open

Enviroment tag is not filled #20

staticdev opened this issue Jun 24, 2019 · 4 comments
Labels

Comments

@staticdev
Copy link

Default sentry dehavior fill environment tag with ASPNETCORE_ENVIRONMENT variable. But with I use Serilog, this tag comes empty.

@olsh
Copy link
Member

olsh commented Jun 25, 2019

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

@staticdev
Copy link
Author

@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.

@PureKrome
Copy link

@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"
                            }
                        }
                    ]
                }
            }
        ]
    },

@staticdev
Copy link
Author

staticdev commented Aug 9, 2019

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.

@olsh olsh added the wontfix label Feb 17, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Development

No branches or pull requests

3 participants