-
-
Notifications
You must be signed in to change notification settings - Fork 4k
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
Add dynamic sdk options to JavaScript loader backend #44225
Milestone
Comments
AbhiPrasad
changed the title
Add checkbox loader endpoint to Sentry
Add Feb 7, 2023
JsSdkDynamicLoader
as new django view
AbhiPrasad
changed the title
Add
Add Feb 9, 2023
JsSdkDynamicLoader
as new django viewJsSdkDynamicLoader
to sentry backend
This was referenced Feb 13, 2023
AbhiPrasad
added a commit
that referenced
this issue
Feb 16, 2023
ref #44225 Building on the work from #44346, this PR adds `dynamicSdkLoaderOptions`, a dictionary of options for the new dynamic SDK loader. The `dynamicSdkLoaderOptions` live on the data `JSONField` on the `ProjectKey` model, as the there is a dynamic loader unique to each DSN. `dynamicSdkLoaderOptions` is also a dictionary, for ease of use, with 3 keys: 1. `hasReplay`: If the loader should include the replay sdk in the bundle 2. `hasPerformance`: If the loader should include the tracing sdk in the bundle 3. `hasDebug`: If the loader should load the debug bundle In the future we could migrate this onto the model directly (as a `BitField` or something), but for now for iteration speed and fluid schema, adding it as a JSON is good enough. To validate we are using the correct fields, `dynamicSdkLoaderOptions` is validated in the `ProjectKeySerializer` via a custom serializer. These new options are used by the `_get_bundle_kind_modifier` method in the `JavaScriptSdkDynamicLoader` view, but for now are not used since the templates are not added (we render a no-op template instead). In the next PR we will add templates for the loader view, alongside tests to validate this all together.
wmak
pushed a commit
that referenced
this issue
Feb 16, 2023
ref #44225 Building on the work from #44346, this PR adds `dynamicSdkLoaderOptions`, a dictionary of options for the new dynamic SDK loader. The `dynamicSdkLoaderOptions` live on the data `JSONField` on the `ProjectKey` model, as the there is a dynamic loader unique to each DSN. `dynamicSdkLoaderOptions` is also a dictionary, for ease of use, with 3 keys: 1. `hasReplay`: If the loader should include the replay sdk in the bundle 2. `hasPerformance`: If the loader should include the tracing sdk in the bundle 3. `hasDebug`: If the loader should load the debug bundle In the future we could migrate this onto the model directly (as a `BitField` or something), but for now for iteration speed and fluid schema, adding it as a JSON is good enough. To validate we are using the correct fields, `dynamicSdkLoaderOptions` is validated in the `ProjectKeySerializer` via a custom serializer. These new options are used by the `_get_bundle_kind_modifier` method in the `JavaScriptSdkDynamicLoader` view, but for now are not used since the templates are not added (we render a no-op template instead). In the next PR we will add templates for the loader view, alongside tests to validate this all together.
This was referenced Feb 20, 2023
AbhiPrasad
changed the title
Add
Add dynamic sdk options to JavaScript loader backend
Feb 24, 2023
JsSdkDynamicLoader
to sentry backend
Once #44876 has been merged in, the backend changes to get the loader working are all done. All that is left is for the frontend to update the project key settings to enable the different bundles (replay, performance etc.) The project key settings are detailed in #44496
|
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Playground PR: #44237
Tasks
JS_SDK_DYNAMIC_LOADER_SDK_VERSION
to config #44492The text was updated successfully, but these errors were encountered: