Migrating from Raven to Sentry (Javascript)


#1

Hi,

I’m struggling to set the release in new Javascript.

According with the doc I should use .init({release}) however, the release is known only through an API call, so the init cannot be done at very beginning.

Can I init Sentry twice ?

PS: I’m trying to find the alternative to raven.setRelease


#2

In this case, it might be the easiest to define the beforeSend callback and set it directly on the event.
We do not have a setRelease function because we thought the release should be clear from the beginning.

Can you explain why you do not have the release from the beginning?


#3

I rely on releases (and so I check when a new one is available) through API calls, this fixes for me a lot of problems related to caching as well