Changing the hostname of Sentry server : how to change the DSN keys?


for some reason we have to change the hostname of our Sentry Server. So i moved from https://my-old-hostname to https://my-new-hostname

In fact i use a reverse proxy so it’s rather easy to do and i can access to my Sentry throught both hostname.

But i don’t know why the DSN keys doesn’t works with the new hostname.
For my projects i had for example:

But my application can only push events on the old DSN and also on this https://newHash@my-old-hostname but as you can see, the hostname is not the good one…

What did i miss ?

Thanks a lot for help

@Rebolon I suspect you have done reverse proxy config at https://my-old-hostname.
Is this correct assumption? If yes, then your https://my-new-hostname/ may not be resolve and hence https://newHash@my-new-hostname is unreachable.
Otherwise, if https://my-new-hostname can be resolved over internet/your network then it should have worked.

You probably didn’t update your system.url-prefix config as documented here:

@sagar.s https://my-new-hostname can be resolved (as the old one) finely

@BYK thanks i checked this but i already did the changes. Maybe the changes has not been used by containers. Must i do docker-compose down && docker-composer up -d ? or anything else ?

@Rebolon If it’s config changes then docker-compose restart should suffice

1 Like

If you are using a recent version of the on-premise repo (March 13th or more recent), simply restarting the containers as @sagar.s suggested should be enough. If not you need to run

docker-compose down && docker-compose build && docker-compose up -d

for them to use the new config.

I tryed both restart but my version must be older than March 13th so i also tried the dow/build/up -d

I generate a new key for one project, and i run a test script, but it still only work with old hostname.
Is there a way to get logs or may i need to check my reverse proxy (if i can access Sentry app, then event should also access it ?)

In fact:

  • testing with Javascript SDK works on both hostname => so no problem with reverse proxy
  • testing with PHP SDK only works with old hostname

Is there any kind of filtering possible (i’ve checkd the filtering in settings of the project but i didn’t see anything suspect)

For more logging on Sentry, you can read this:
I’d also check your reverse proxy logs to see what’s going on.

Not sure what you are referring to with filters here or how is that relevant to your issue.

Last week, it stopped working again. So, we decided to fully re-install it.
This topic is now closed.