Search code examples
.netazuresentry

Sentry Release tracking on azure


I'm trying to track releases in sentry for a .net5 web-api hosted on azure and it is not quite working.

In the appsettings.json I have a sentry section with a release variable defined.

"Sentry": {
"Release": "1.0.2"
... }

and as part of my build process I add an application setting in azure enter image description here

But when an error is logged in prod, sentry is reporting using the value in appsettings and not the override.

enter image description here

I was expecting the azure set value to override the default config but it does not seem to be case. Am I wrong? or am I doing something wrong?


Solution

  • Convert Sentry.Release to Sentry__Release in App Settings.

    For App Service on Linux or Web App for Containers, if you have nested json key structure in your name like ApplicationInsights:InstrumentationKey you will need to have ApplicationInsights__InstrumentationKey as key name. So notice that any : should be replaced by __ (i.e. double underscore).

    Check out Azure — Configure Application settings and Connection strings in Azure App Services for more information.