diff --git a/.github/workflows/workflow-native.yml b/.github/workflows/workflow-native.yml index 00086f82..3d8a3c3d 100644 --- a/.github/workflows/workflow-native.yml +++ b/.github/workflows/workflow-native.yml @@ -25,6 +25,8 @@ jobs: split-pages: name: Prepare pages runs-on: ubuntu-latest + env: + SENTRY_DSN: ${{ secrets.SENTRY_DSN }} outputs: pages: ${{ steps.env.outputs.pages }} steps: @@ -74,6 +76,12 @@ jobs: - name: Setup Rust uses: dtolnay/rust-toolchain@stable + - name: Setup Sentry Reporting + shell: pwsh + run: | + cargo add vleue_sentry --git https://github.com/vleue/vleue_sentry -p bevy_internal + git apply --ignore-whitespace add_sentry.patch + - name: Install Bevy dependencies if: runner.os == 'linux' run: | diff --git a/add_sentry.patch b/add_sentry.patch new file mode 100644 index 00000000..144d625f --- /dev/null +++ b/add_sentry.patch @@ -0,0 +1,16 @@ +diff --git a/crates/bevy_internal/src/default_plugins.rs b/crates/bevy_internal/src/default_plugins.rs +index acfa89d0b6..516a16ca9c 100644 +--- a/crates/bevy_internal/src/default_plugins.rs ++++ b/crates/bevy_internal/src/default_plugins.rs +@@ -44,7 +44,10 @@ impl PluginGroup for DefaultPlugins { + let mut group = PluginGroupBuilder::start::(); + group = group + .add(bevy_app::PanicHandlerPlugin) +- .add(bevy_log::LogPlugin::default()) ++ .add(bevy_log::LogPlugin { ++ update_subscriber: Some(vleue_sentry::sentry_error_reporter), ++ ..Default::default() ++ }) + .add(bevy_core::TaskPoolPlugin::default()) + .add(bevy_core::TypeRegistrationPlugin) + .add(bevy_core::FrameCountPlugin)