Skip to content

Conversation

@tustanivsky
Copy link
Collaborator

This PR adopts the FSentryVariant type introduced in #940 for use in public APIs that handle arbitrary Sentry objects data (e.g. contexts and extras in USentryScope, data in USentryBreadcrumb). This allows to move away from using FString in favor of a more flexible and type-safe approach.

It also adds TryGet-functions for scope's tags, extras and contexts (#951).

@github-actions
Copy link
Contributor

github-actions bot commented Jun 20, 2025

Messages
📖 Do not forget to update Sentry-docs with your feature once the pull request gets approved.

Generated by 🚫 dangerJS against 414f150

@tustanivsky tustanivsky changed the title Add generic variant type support for API Adopt generic variant type in public APIs Jun 20, 2025
@tustanivsky
Copy link
Collaborator Author

On Android, scope's extras that are variants with array/map values will be set as strings due to current sentry-java limitations (see getsentry/sentry-java#2032):

  • Example extras when added via sentry-native on desktop
    image

  • Example extras when added via sentry-java on Android
    image

@tustanivsky tustanivsky marked this pull request as ready for review June 23, 2025 13:20
@tustanivsky tustanivsky requested review from jpnurmi and limbonaut June 23, 2025 13:20
@tustanivsky tustanivsky merged commit 12822e1 into main Jun 24, 2025
29 checks passed
@tustanivsky tustanivsky deleted the feat/variant-support branch June 24, 2025 08:49
tustanivsky added a commit to getsentry/sentry-docs that referenced this pull request Aug 12, 2025
Key Changes:

- Updated some C++ examples to use `FSentryVariant` type instead of
string (getsentry/sentry-unreal#971)
- Added notice about using local scopes on Windows/Linux
(getsentry/sentry-unreal#928)
- Fixed supported platforms for screenshot feature
tustanivsky added a commit to getsentry/sentry-docs that referenced this pull request Aug 29, 2025
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.

3 participants