Skip to content

feat: add platform integration hook - #2005

Open
jpnurmi wants to merge 1 commit into
masterfrom
jpnurmi/feat/platform-integration
Open

feat: add platform integration hook#2005
jpnurmi wants to merge 1 commit into
masterfrom
jpnurmi/feat/platform-integration

Conversation

@jpnurmi

@jpnurmi jpnurmi commented Aug 19, 2026

Copy link
Copy Markdown
Collaborator

Adds a SENTRY_INTEGRATION_PLATFORM build option for console SDKs.

When enabled, sentry-native automatically creates the downstream-provided platform integration via sentry_integration_platform_new(). This lets sentry-playstation, sentry-switch, and sentry-xbox move platform-specific initialization into a platform integration without wrapping sentry__native_init().

Allow downstream platform SDKs to register an integration without replacing
sentry_init().

Add an integration fixture that verifies a mixture of SDK metadata, platform
scope data, and application event data.
@github-actions

Copy link
Copy Markdown
Fails
🚫 Please consider adding a changelog entry for the next release.
Messages
📖 Do not forget to update Sentry-docs with your feature once the pull request gets approved.

Instructions and example for changelog

Please add an entry to CHANGELOG.md to the "Unreleased" section. Make sure the entry includes this PR's number.

Example:

## Unreleased

### Features

- add platform integration hook ([#2005](https://github.com/getsentry/sentry-native/pull/2005))

If none of the above apply, you can opt out of this check by adding #skip-changelog to the PR description or adding a skip-changelog label.

Generated by 🚫 dangerJS against 958c654

@cursor cursor Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cursor Bugbot has reviewed your changes and found 1 potential issue.

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit 958c654. Configure here.

Comment thread CMakeLists.txt

if(NOT SENTRY_INTEGRATION_PLATFORM STREQUAL "")
target_compile_definitions(sentry PRIVATE SENTRY_INTEGRATION_PLATFORM)
endif()

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Platform define stays private

Medium Severity

SENTRY_INTEGRATION_PLATFORM is added as a PRIVATE compile definition on sentry, so downstream translation units never see it. The extern "C" declaration of sentry_integration_platform_new in sentry_integration.h is therefore hidden from C++ platform SDKs, which will emit a mangled symbol the C library cannot resolve. Consumers also still see sentry__native_init in sentry_core.h even though the library now exports sentry_init.

Additional Locations (2)
Fix in Cursor Fix in Web

Reviewed by Cursor Bugbot for commit 958c654. Configure here.

@jpnurmi jpnurmi changed the title feat(native): add platform integration hook feat: add platform integration hook Aug 19, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant