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

Fix segment ga4 bug #1080

Merged
merged 10 commits into from
Apr 29, 2024
Merged

Fix segment ga4 bug #1080

merged 10 commits into from
Apr 29, 2024

Conversation

silesky
Copy link
Contributor

@silesky silesky commented Apr 29, 2024

Addresses an issue where, if one of the non-destination actions fails to load/is blocked, the entire SDK fails to load. This is most notable in GA4, where, if GA was blocked, Segment initialization would fail.

Copy link

changeset-bot bot commented Apr 29, 2024

🦋 Changeset detected

Latest commit: 0efee48

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 3 packages
Name Type
@segment/analytics-core Minor
@segment/analytics-next Minor
@segment/analytics-node Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@@ -77,6 +77,7 @@ export function schemaFilter(

return {
name: 'Schema Filter',
critical: true,
Copy link
Contributor

Choose a reason for hiding this comment

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

Ah, now that I see the load method for schema filter and env-enrichment, I'm not sure we actually need a critical field at this time. Their load methods are already safe.

It's the actual importing of the modules as part of registerPlugins that can still fail and block.

Copy link
Contributor

@chrisradek chrisradek left a comment

Choose a reason for hiding this comment

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

Approving, though I don't think the critical field is necessary after all. From a practical standpoint, it doesn't actually have any affect for the 2 plugins you added it to since their load methods are already safe.

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.

2 participants