Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

There is no way to private SDKs to add packages into the SDK info #2270

Open
brustolin opened this issue Oct 10, 2022 · 3 comments
Open

There is no way to private SDKs to add packages into the SDK info #2270

brustolin opened this issue Oct 10, 2022 · 3 comments

Comments

@brustolin
Copy link
Contributor

brustolin commented Oct 10, 2022

Description

Private SDKs need to inform packages into the SDK information.

See getsentry/sentry-dart#1056

@marandaneto
Copy link
Contributor

marandaneto commented Oct 10, 2022

https://develop.sentry.dev/sdk/event-payloads/sdk/#attributes
integrations and packages are missing.
The use case is that iOS events (native) don't contain the other packages.
Hybrid events (JS, Dart) contain the other packages.

@brustolin brustolin changed the title There is no way to private SDKs to add packaged into the SDK info There is no way to private SDKs to add packages into the SDK info Oct 10, 2022
@philipphofmann
Copy link
Member

We should expose a public API to set the packages to PrivateSentrySDKOnly similar to the following for setting the packages

+ (void)setSdkName:(NSString *)sdkName andVersionString:(NSString *)versionString;
/**
* Override SDK information.
*/
+ (void)setSdkName:(NSString *)sdkName;

We then need to store the packages somewhere, maybe in SentryMeta.

We add the SDKInfo to events here

event.sdk = @{
@"name" : SentryMeta.sdkName,
@"version" : SentryMeta.versionString,
@"integrations" : integrations
};

and to envelopes here

- (instancetype)initWithId:(nullable SentryId *)eventId
sdkInfo:(nullable SentrySdkInfo *)sdkInfo
traceContext:(nullable SentryTraceContext *)traceContext NS_DESIGNATED_INITIALIZER;

and here

SentrySdkInfo *sdkInfo = envelope.header.sdkInfo;
if (nil != sdkInfo) {
[serializedData addEntriesFromDictionary:[sdkInfo serialize]];
}

@brustolin brustolin moved this from Needs Discussion to Backlog in Mobile & Cross Platform SDK Oct 12, 2022
@github-actions
Copy link

github-actions bot commented Nov 3, 2022

This issue has gone three weeks without activity. In another week, I will close it.

But! If you comment or otherwise update it, I will reset the clock, and if you label it Status: Backlog or Status: In Progress, I will leave it alone ... forever!


"A weed is but an unloved flower." ― Ella Wheeler Wilcox 🥀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: Backlog
Development

No branches or pull requests

5 participants