Skip to content

Hybrid SDKs should set the sentryClientName on Native SDKs during SDK init. #48

@marandaneto

Description

@marandaneto

The reason is that sentryClientName is logged out by Relay when there are errors.

For Hybrid SDKs, this is going to be always the Native SDKs because they are the ones sending the event over the wire.
Ideally, the Hybrid SDKs overwrite this value so when there's errors, it's logged out as the Hybrid SDK itself instead of eg Android or iOS.
The other benefit is that we can collect event metrics per SDK (Native events on an RN app will be counted as RN and not Native anymore).

Another option is that Relay logs the event.sdk instead of the USER_AGENT or sentry_client from the authHeader.

Android already has the SentryOptions#setSentryClientName, iOS to be confirmed, likely needs to be exposed in the PrivateSentrySDKOnly class, @brustolin can you confirm?

### Tasks
- [ ] https://github.com/getsentry/sentry-dart/issues/1185
- [ ] https://github.com/getsentry/sentry-react-native/issues/2813
- [ ] https://github.com/getsentry/sentry-dart/issues/1333
- [ ] https://github.com/getsentry/sentry-react-native/issues/2960
- [ ] https://github.com/getsentry/sentry-java/issues/2678
- [ ] https://github.com/getsentry/sentry-dotnet/pull/2389
- [ ] https://github.com/getsentry/sentry-dotnet/pull/2171
- [ ] https://github.com/getsentry/sentry-capacitor/issues/379

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    Status

    Done

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions