When the sentry server is down

When the sentry is down for any reason, are the messages and logs that are sent from the application to the sentry when the sentry is down recoverable after activating the sentry or not?

This probably depends on what your Sentry architecture looks like, and which service went offline. For example, if you use Sentry 10+, then you should have a Relay service and if that goes offline, then I don’t believe messages not received are recoverable.

On the other hand, if Relay is available, but the backend Sentry web server hosting the /api/store endpoint goes offline, I believe Relay will retry those events.

If some other component goes offline, again depending on your architecture, you may not lose any data. For example, we have had the following services individually go offline in the past without losing data - workers, RabbitMQ, Postgres, Clickhouse, Snuba, Forwarder, Cron, Cleanup, Zookeeper, Kafka. Without Relay, you can’t afford to have /api/store be unavailable.

Full disclosure, I am still running 9.1.2 with a bunch of experimental 10 flags enabled so I don’t have any personal Relay experience. AFAIK the Sentry clients “fire-and-forget” without retries. I do not know whether this can be configured, but it can certainly be added by providing your own transport mechanism if it isn’t already there. However, I would advise against this as the most common reason for the event request failing will probably be quota violations (rate limiting) and in this case you definitely do not want to continue sending events.