MCPcopy Index your code
hub / github.com/getsentry/sentry-javascript / setupIntegrations

Function setupIntegrations

packages/core/src/integration.ts:77–94  ·  view source on GitHub ↗
(client: Client, integrations: Integration[])

Source from the content-addressed store, hash-verified

75 * @param withDefault should enable default integrations
76 */
77export function setupIntegrations(client: Client, integrations: Integration[]): IntegrationIndex {
78 const integrationIndex: IntegrationIndex = {};
79
80 integrations.forEach((integration: Integration | undefined) => {
81 if (integration?.beforeSetup) {
82 integration.beforeSetup(client);
83 }
84 });
85
86 integrations.forEach((integration: Integration | undefined) => {
87 // guard against empty provided integrations
88 if (integration) {
89 setupIntegration(client, integration, integrationIndex);
90 }
91 });
92
93 return integrationIndex;
94}
95
96/**
97 * Execute the `afterAllSetup` hooks of the given integrations.

Callers 1

_setupIntegrationsFunction · 0.90

Calls 3

beforeSetupMethod · 0.80
setupIntegrationFunction · 0.70
forEachMethod · 0.65

Tested by

no test coverage detected