initialize_sentry#

safir.sentry.initialize_sentry(release, **additional_kwargs)#

Initialize Sentry with env var values and the safir before_send handler.

Most Safir apps should provide certain Sentry parameters. This method will validate and pass those parameters, as well as any additional parameters, to the Sentry SDK init function. It also adds before_send_handler so that SlackException values can be used.

Parameters:
  • release (str) – The version of this application that should be sent with every Sentry event. For most Safir applications, you should pass the value in <package>.__version__.

  • additional_kwargs (dict[str, Any])

Return type:

None