-
-
Notifications
You must be signed in to change notification settings - Fork 207
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
Regression in changing the case of environment #1267
Comments
Hi Manuel, thank you for opening the Issue. EDIT: I suppose that you are setting AdjustStandardEnvironmentNameCasing to false inside of UseSentryCallback? if so, as a workaround for now, could you try setting AdjustStandardEnvironmentNameCasing to false inside of AppSettings? "Sentry": {
"AdjustStandardEnvironmentNameCasing": false
} Ideally, the problem will be solved in a future release. |
I can confirm that setting the property in the appsettings file fixes the issue. I am currently setting it in:
|
Indeed, the property is being ignored once set inside of UseSentry, in the meantime, use the |
A simpler solution would be for Sentry not to care about environment casing: getsentry/sentry#6568 |
What if we make this property to sentry-dotnet/src/Sentry.AspNetCore/SentryAspNetCoreOptions.cs Lines 46 to 54 in 2639611
This way we remove the pitfall. |
We can try the making it |
we could add a static |
on second thoughts. given the root fix is getsentry/sentry#6568. lets obsolete |
I'm not a fan of obsoleting that. Not everyone uses app config files, and the problem is indicative of a larger issue. The root cause appears to be that |
Environment
How do you use Sentry? Sentry.AspNetCore
Which SDK and version?
3.9.4
Steps to Reproduce
There seems to be a regression for this issue: #999
In particular, I noticed this morning that I get the environment lower-cased even if I set the option "AdjustStandardEnvironmentNameCasing" to false.
It might be due to the changes in this file: https://github.com/ajbeaven/sentry-dotnet/blob/53323f0ea6b788a06aeb2cecf693fdf23e1b71a1/src/Sentry.AspNetCore/SentryAspNetCoreOptionsSetup.cs which seems to be different from the version that actually fixed the issue: https://github.com/getsentry/sentry-dotnet/pull/1057/filesEDIT My bad, there doesn't seem to be any change in the files above.
Expected Result
Environment not lowercased
Actual Result
Environment lowercased (from Staging to staging)
The text was updated successfully, but these errors were encountered: