getScheme() === 'sentry') { // utopia/logger DSN (`sentry://PROJECT_ID:KEY@HOST/`) -> standard Sentry DSN (`https://KEY@HOST/PROJECT_ID`). $sentryDsn = 'https://' . ($dsn->getPassword() ?? '') . '@' . $dsn->getHost() . '/' . ($dsn->getUser() ?? ''); $isProduction = System::getEnv('_APP_ENV', 'development') === 'production'; Span::addExporter( new Exporter\Sentry( dsn: $sentryDsn, environment: $isProduction ? 'production' : 'staging', release: System::getEnv('_APP_VERSION', 'UNKNOWN'), serverName: System::getEnv('_APP_LOGGING_SERVICE_IDENTIFIER', \gethostname()), ), sampler: static fn (Span $span): bool => $span->getError() !== null, ); } } catch (Throwable $error) { Console::warning('Failed to register Realtime Sentry span exporter: ' . $error->getMessage()); }