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

Function addIntegration

packages/core/src/integration.ts:155–164  ·  view source on GitHub ↗
(integration: Integration)

Source from the content-addressed store, hash-verified

153
154/** Add an integration to the current scope's client. */
155export function addIntegration(integration: Integration): void {
156 const client = getClient();
157
158 if (!client) {
159 DEBUG_BUILD && debug.warn(`Cannot add integration "${integration.name}" because no SDK Client is available.`);
160 return;
161 }
162
163 client.addIntegration(integration);
164}
165
166/**
167 * Define an integration function that can be used to create an integration instance.

Callers 1

Calls 2

getClientFunction · 0.90
warnMethod · 0.65

Tested by

no test coverage detected