Description
Some targets (e.g. wasm32-wasip1
) don't support threads.
By default, the SDK is compiled with session release health features: sentry-core/src/sessions.rs
.
We should create a feature flag that enables/disables these features so that the SDK can be compiled for those targets by disabling the flag (similar to how a user can opt to create a custom transport and use none of the existing ones).
The feature should be enabled by default to respect existing behavior.
Features implemented in sentry-core/src/sessions.rs
are exposed in the start_session
function in sentry-core/src/hub.rs
and sentry-core/src/api.rs
. The API is also used in sentry/src/init.rs
to enable session tracking by default. These usages should also be gated behind the new feature flag.