Skip to content

feat(node): Auto discovery only returns integrations where dependency loads#7603

Merged
AbhiPrasad merged 3 commits intogetsentry:developfrom
timfish:feat/node/better-auto-discovery
Mar 24, 2023
Merged

feat(node): Auto discovery only returns integrations where dependency loads#7603
AbhiPrasad merged 3 commits intogetsentry:developfrom
timfish:feat/node/better-auto-discovery

Conversation

@timfish
Copy link
Collaborator

@timfish timfish commented Mar 23, 2023

The current auto discovery returns all integrations and they only become disables when setupOnce is called.

This means all the integrations are retained by the client and listed in sent envelopes.

This PR:

  • Adds LazyLoadedIntegration which adds a loadDependency method that allows us to preemptively load the dependency and check whether we should return the integration
  • Modifies the auto discovered integrations to implement LazyLoadedIntegration

@timfish timfish marked this pull request as ready for review March 24, 2023 11:02
@AbhiPrasad AbhiPrasad enabled auto-merge (squash) March 24, 2023 12:02
@AbhiPrasad AbhiPrasad merged commit e1af1e6 into getsentry:develop Mar 24, 2023
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