-
-
Notifications
You must be signed in to change notification settings - Fork 213
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
Align configuration binding precedence with Microsoft priorities #3143
Comments
As far as I can tell the SDK tries to locate |
I wonder if we need to be doing anything special for these in the The only thing that might need to be wired up manually in the Would need to play around with this a bit. |
We just went back and forth break-fixing the overwriting rules. The DSN, environment, and release now use the same mechanism. |
Problem Summary
For users who want to configure Sentry via environment variables we have a problem, which stems from a discrepency between the precedence of configuration providers used by Microsoft and Sentry.
In ASP.NET Core Microsoft is using (from highest to lowest):
Sentry is using:
So people rolling out applications instrumented with Sentry will presently have to use one set of conventions in their CI/CD for all of the MS Stuff (e.g. set default behaviour in appsettings.json but override on a per machine basis in environment variables) and a completely different set of conventions for Sentry.
Suggested change
We should change the priority for configuration provider sources when configuring Sentry to align with the Microsoft way.
This would be a very disruptive change so we'd need to do it in a major version bump and communicate it very carefully.
Workaround
Currently, if people want to set some default behaviour for Sentry that can be overriden with Environment variables, they need to use this workaround:
The text was updated successfully, but these errors were encountered: