@sentry/angular 7.104.0 → 8.0.0-alpha.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -42,14 +42,14 @@
42
42
  */
43
43
  function init(options) {
44
44
  var opts = Object.assign({
45
- // Filter out TryCatch integration as it interferes with our Angular `ErrorHandler`:
46
- // TryCatch would catch certain errors before they reach the `ErrorHandler` and thus provide a
45
+ // Filter out BrowserApiErrors integration as it interferes with our Angular `ErrorHandler`:
46
+ // BrowserApiErrors would catch certain errors before they reach the `ErrorHandler` and thus provide a
47
47
  // lower fidelity error than what `SentryErrorHandler` (see errorhandler.ts) would provide.
48
48
  // see:
49
49
  // - https://github.com/getsentry/sentry-javascript/issues/5417#issuecomment-1453407097
50
50
  // - https://github.com/getsentry/sentry-javascript/issues/2744
51
51
  defaultIntegrations: Sentry.getDefaultIntegrations(options).filter(function (integration) {
52
- return integration.name !== 'TryCatch';
52
+ return integration.name !== 'BrowserApiErrors';
53
53
  })
54
54
  }, options);
55
55
  core.applySdkMetadata(opts, 'angular');
@@ -154,17 +154,16 @@
154
154
  // Optionally show user dialog to provide details on what happened.
155
155
  if (this._options.showDialog) {
156
156
  var client = Sentry__namespace.getClient();
157
- if (client && client.on && !this._registeredAfterSendEventHandler) {
157
+ if (client && !this._registeredAfterSendEventHandler) {
158
158
  client.on('afterSendEvent', function (event) {
159
- if (!event.type) {
160
- // eslint-disable-next-line deprecation/deprecation
159
+ if (!event.type && event.event_id) {
161
160
  Sentry__namespace.showReportDialog(Object.assign(Object.assign({}, _this._options.dialogOptions), { eventId: event.event_id }));
162
161
  }
163
162
  });
164
163
  // We only want to register this hook once in the lifetime of the error handler
165
164
  this._registeredAfterSendEventHandler = true;
166
165
  }
167
- else if (!client || !client.on) {
166
+ else if (!client) {
168
167
  Sentry__namespace.showReportDialog(Object.assign(Object.assign({}, this._options.dialogOptions), { eventId: eventId }));
169
168
  }
170
169
  }
@@ -238,7 +237,7 @@
238
237
  op: 'pageload',
239
238
  origin: 'auto.pageload.angular',
240
239
  attributes: (_a = {},
241
- _a[core.SEMANTIC_ATTRIBUTE_SENTRY_SOURCE] = 'url',
240
+ _a[Sentry.SEMANTIC_ATTRIBUTE_SENTRY_SOURCE] = 'url',
242
241
  _a),
243
242
  });
244
243
  }
@@ -251,7 +250,7 @@
251
250
  // eslint-disable-next-line deprecation/deprecation
252
251
  var instrumentAngularRouting = routingInstrumentation;
253
252
  /**
254
- * A custom BrowserTracing integration for Angular.
253
+ * A custom browser tracing integration for Angular.
255
254
  *
256
255
  * Use this integration in combination with `TraceService`
257
256
  */
@@ -283,7 +282,7 @@
283
282
  var _this = this;
284
283
  this._router = _router;
285
284
  this.navStart$ = this._router.events.pipe(operators.filter(function (event) { return event instanceof i1.NavigationStart; }), operators.tap(function (navigationEvent) {
286
- var _a, _b;
285
+ var _a, _b, _c;
287
286
  if (!instrumentationInitialized) {
288
287
  IS_DEBUG_BUILD &&
289
288
  utils.logger.error('Angular integration has tracing enabled, but Tracing integration is not configured');
@@ -296,22 +295,27 @@
296
295
  var client = core.getClient();
297
296
  var strippedUrl = utils.stripUrlQueryAndFragment(navigationEvent.url);
298
297
  if (client && hooksBasedInstrumentation) {
299
- if (!core.getActiveSpan()) {
298
+ // see comment in `_isPageloadOngoing` for rationale
299
+ if (!_this._isPageloadOngoing()) {
300
300
  Sentry.startBrowserTracingNavigationSpan(client, {
301
301
  name: strippedUrl,
302
- origin: 'auto.navigation.angular',
303
302
  attributes: (_a = {},
304
- _a[core.SEMANTIC_ATTRIBUTE_SENTRY_SOURCE] = 'url',
303
+ _a[Sentry.SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN] = 'auto.navigation.angular',
304
+ _a[Sentry.SEMANTIC_ATTRIBUTE_SENTRY_SOURCE] = 'url',
305
305
  _a),
306
306
  });
307
307
  }
308
- // eslint-disable-next-line deprecation/deprecation
308
+ else {
309
+ // The first time we end up here, we set the pageload flag to false
310
+ // Subsequent navigations are going to get their own navigation root span
311
+ // even if the pageload root span is still ongoing.
312
+ _this._pageloadOngoing = false;
313
+ }
309
314
  _this._routingSpan =
310
315
  core.startInactiveSpan({
311
316
  name: "" + navigationEvent.url,
312
317
  op: ANGULAR_ROUTING_OP,
313
- origin: 'auto.ui.angular',
314
- tags: Object.assign({ 'routing.instrumentation': '@sentry/angular', url: strippedUrl }, (navigationEvent.navigationTrigger && {
318
+ attributes: Object.assign((_b = {}, _b[Sentry.SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN] = 'auto.ui.angular', _b[Sentry.SEMANTIC_ATTRIBUTE_SENTRY_SOURCE] = 'url', _b.url = strippedUrl, _b), (navigationEvent.navigationTrigger && {
315
319
  navigationTrigger: navigationEvent.navigationTrigger,
316
320
  })),
317
321
  }) || null;
@@ -324,18 +328,18 @@
324
328
  name: strippedUrl,
325
329
  op: 'navigation',
326
330
  origin: 'auto.navigation.angular',
327
- attributes: (_b = {},
328
- _b[core.SEMANTIC_ATTRIBUTE_SENTRY_SOURCE] = 'url',
329
- _b),
331
+ attributes: (_c = {},
332
+ _c[Sentry.SEMANTIC_ATTRIBUTE_SENTRY_SOURCE] = 'url',
333
+ _c),
330
334
  });
331
335
  }
332
336
  if (activeTransaction) {
333
337
  // eslint-disable-next-line deprecation/deprecation
334
338
  _this._routingSpan = activeTransaction.startChild({
335
- description: "" + navigationEvent.url,
339
+ name: "" + navigationEvent.url,
336
340
  op: ANGULAR_ROUTING_OP,
337
341
  origin: 'auto.ui.angular',
338
- tags: Object.assign({ 'routing.instrumentation': '@sentry/angular', url: strippedUrl }, (navigationEvent.navigationTrigger && {
342
+ attributes: Object.assign({ url: strippedUrl }, (navigationEvent.navigationTrigger && {
339
343
  navigationTrigger: navigationEvent.navigationTrigger,
340
344
  })),
341
345
  });
@@ -355,10 +359,10 @@
355
359
  var transaction = getActiveTransaction();
356
360
  // TODO (v8 / #5416): revisit the source condition. Do we want to make the parameterized route the default?
357
361
  var attributes = (transaction && core.spanToJSON(transaction).data) || {};
358
- if (transaction && attributes[core.SEMANTIC_ATTRIBUTE_SENTRY_SOURCE] === 'url') {
362
+ if (transaction && attributes[Sentry.SEMANTIC_ATTRIBUTE_SENTRY_SOURCE] === 'url') {
359
363
  transaction.updateName(route);
360
- transaction.setAttribute(core.SEMANTIC_ATTRIBUTE_SENTRY_SOURCE, 'route');
361
- transaction.setAttribute(core.SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN, "auto." + core.spanToJSON(transaction).op + ".angular");
364
+ transaction.setAttribute(Sentry.SEMANTIC_ATTRIBUTE_SENTRY_SOURCE, 'route');
365
+ transaction.setAttribute(Sentry.SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN, "auto." + core.spanToJSON(transaction).op + ".angular");
362
366
  }
363
367
  }));
364
368
  this.navEnd$ = this._router.events.pipe(operators.filter(function (event) { return event instanceof i1.NavigationEnd || event instanceof i1.NavigationCancel || event instanceof i1.NavigationError; }), operators.tap(function () {
@@ -371,6 +375,7 @@
371
375
  }
372
376
  }));
373
377
  this._routingSpan = null;
378
+ this._pageloadOngoing = true;
374
379
  this._subscription = new rxjs.Subscription();
375
380
  this._subscription.add(this.navStart$.subscribe());
376
381
  this._subscription.add(this.resEnd$.subscribe());
@@ -383,6 +388,45 @@
383
388
  TraceService.prototype.ngOnDestroy = function () {
384
389
  this._subscription.unsubscribe();
385
390
  };
391
+ /**
392
+ * We only _avoid_ creating a navigation root span in one case:
393
+ *
394
+ * There is an ongoing pageload span AND the router didn't yet emit the first navigation start event
395
+ *
396
+ * The first navigation start event will create the child routing span
397
+ * and update the pageload root span name on ResolveEnd.
398
+ *
399
+ * There's an edge case we need to avoid here: If the router fires the first navigation start event
400
+ * _after_ the pageload root span finished. This is why we check for the pageload root span.
401
+ * Possible real-world scenario: Angular application and/or router is bootstrapped after the pageload
402
+ * idle root span finished
403
+ *
404
+ * The overall rationale is:
405
+ * - if we already avoided creating a navigation root span once, we don't avoid it again
406
+ * (i.e. set `_pageloadOngoing` to `false`)
407
+ * - if `_pageloadOngoing` is already `false`, create a navigation root span
408
+ * - if there's no active/pageload root span, create a navigation root span
409
+ * - only if there's an ongoing pageload root span AND `_pageloadOngoing` is still `true,
410
+ * con't create a navigation root span
411
+ */
412
+ TraceService.prototype._isPageloadOngoing = function () {
413
+ if (!this._pageloadOngoing) {
414
+ // pageload is already finished, no need to update
415
+ return false;
416
+ }
417
+ var activeSpan = core.getActiveSpan();
418
+ if (!activeSpan) {
419
+ this._pageloadOngoing = false;
420
+ return false;
421
+ }
422
+ var rootSpan = core.getRootSpan(activeSpan);
423
+ if (!rootSpan) {
424
+ this._pageloadOngoing = false;
425
+ return false;
426
+ }
427
+ this._pageloadOngoing = core.spanToJSON(rootSpan).op === 'pageload';
428
+ return this._pageloadOngoing;
429
+ };
386
430
  return TraceService;
387
431
  }());
388
432
  TraceService.ɵprov = i0__namespace.ɵɵdefineInjectable({ factory: function TraceService_Factory() { return new TraceService(i0__namespace.ɵɵinject(i1__namespace.Router)); }, token: TraceService, providedIn: "root" });
@@ -412,7 +456,7 @@
412
456
  if (activeTransaction) {
413
457
  // eslint-disable-next-line deprecation/deprecation
414
458
  this._tracingSpan = activeTransaction.startChild({
415
- description: "<" + this.componentName + ">",
459
+ name: "<" + this.componentName + ">",
416
460
  op: ANGULAR_INIT_OP,
417
461
  origin: 'auto.ui.angular.trace_directive',
418
462
  });
@@ -469,7 +513,7 @@
469
513
  if (activeTransaction) {
470
514
  // eslint-disable-next-line deprecation/deprecation
471
515
  tracingSpan = activeTransaction.startChild({
472
- description: "<" + target.name + ">",
516
+ name: "<" + target.name + ">",
473
517
  op: ANGULAR_INIT_OP,
474
518
  origin: 'auto.ui.angular.trace_class_decorator',
475
519
  });
@@ -514,7 +558,7 @@
514
558
  if (activeTransaction) {
515
559
  // eslint-disable-next-line deprecation/deprecation
516
560
  activeTransaction.startChild({
517
- description: "<" + target.constructor.name + ">",
561
+ name: "<" + target.constructor.name + ">",
518
562
  endTimestamp: now,
519
563
  op: ANGULAR_OP + "." + String(propertyKey),
520
564
  origin: 'auto.ui.angular.trace_method_decorator',
@@ -1 +1 @@
1
- {"version":3,"file":"sentry-angular.umd.js","sources":["../../src/flags.ts","../../src/sdk.ts","../../src/zone.ts","../../src/errorhandler.ts","../../src/constants.ts","../../src/tracing.ts","../../src/sentry-angular.ts"],"sourcesContent":["/*\n * This file defines flags and constants that can be modified during compile time in order to facilitate tree shaking\n * for users.\n *\n * We define \"magic strings\" like `__SENTRY_DEBUG__` that may get replaced with actual values during our, or the user's\n * build process. Take care when introducing new flags - they must not throw if they are not replaced. See the Debug\n * Build Flags section in CONTRIBUTING.md.\n */\n\ndeclare const __SENTRY_DEBUG__: boolean;\n\n/** Flag that is true for debug builds, false otherwise. */\nexport const IS_DEBUG_BUILD = typeof __SENTRY_DEBUG__ === 'undefined' ? true : __SENTRY_DEBUG__;\n","import { VERSION } from '@angular/core';\nimport type { BrowserOptions } from '@sentry/browser';\nimport { getDefaultIntegrations, init as browserInit, setContext } from '@sentry/browser';\nimport { applySdkMetadata } from '@sentry/core';\nimport { logger } from '@sentry/utils';\n\nimport { IS_DEBUG_BUILD } from './flags';\n\n/**\n * Inits the Angular SDK\n */\nexport function init(options: BrowserOptions): void {\n const opts = {\n // Filter out TryCatch integration as it interferes with our Angular `ErrorHandler`:\n // TryCatch would catch certain errors before they reach the `ErrorHandler` and thus provide a\n // lower fidelity error than what `SentryErrorHandler` (see errorhandler.ts) would provide.\n // see:\n // - https://github.com/getsentry/sentry-javascript/issues/5417#issuecomment-1453407097\n // - https://github.com/getsentry/sentry-javascript/issues/2744\n defaultIntegrations: getDefaultIntegrations(options).filter(integration => {\n return integration.name !== 'TryCatch';\n }),\n ...options,\n };\n\n applySdkMetadata(opts, 'angular');\n\n checkAndSetAngularVersion();\n browserInit(opts);\n}\n\nfunction checkAndSetAngularVersion(): void {\n const ANGULAR_MINIMUM_VERSION = 10;\n\n const angularVersion = VERSION && VERSION.major ? parseInt(VERSION.major, 10) : undefined;\n\n if (angularVersion) {\n if (angularVersion < ANGULAR_MINIMUM_VERSION) {\n IS_DEBUG_BUILD &&\n logger.warn(\n `The Sentry SDK does not officially support Angular ${angularVersion}.`,\n `This version of the Sentry SDK supports Angular ${ANGULAR_MINIMUM_VERSION} and above.`,\n 'Please consider upgrading your Angular version or downgrading the Sentry SDK.',\n );\n }\n setContext('angular', { version: angularVersion });\n }\n}\n","// That's the `global.Zone` exposed when the `zone.js` package is used.\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\ndeclare const Zone: any;\n\n// There're 2 types of Angular applications:\n// 1) zone-full (by default)\n// 2) zone-less\n// The developer can avoid importing the `zone.js` package and tells Angular that\n// he is responsible for running the change detection by himself. This is done by\n// \"nooping\" the zone through `CompilerOptions` when bootstrapping the root module.\n// eslint-disable-next-line @typescript-eslint/no-unsafe-member-access\nconst isNgZoneEnabled = typeof Zone !== 'undefined' && !!Zone.current;\n\n/**\n * The function that does the same job as `NgZone.runOutsideAngular`.\n */\nexport function runOutsideAngular<T>(callback: () => T): T {\n // The `Zone.root.run` basically will run the `callback` in the most parent zone.\n // Any asynchronous API used inside the `callback` won't catch Angular's zone\n // since `Zone.current` will reference `Zone.root`.\n // The Angular's zone is forked from the `Zone.root`. In this case, `zone.js` won't\n // trigger change detection, and `ApplicationRef.tick()` will not be run.\n // Caretaker note: we're using `Zone.root` except `NgZone.runOutsideAngular` since this\n // will require injecting the `NgZone` facade. That will create a breaking change for\n // projects already using the `@sentry/angular`.\n // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access\n return isNgZoneEnabled ? Zone.root.run(callback) : callback();\n}\n","import { HttpErrorResponse } from '@angular/common/http';\nimport type { ErrorHandler as AngularErrorHandler } from '@angular/core';\nimport { Inject, Injectable } from '@angular/core';\nimport * as Sentry from '@sentry/browser';\nimport type { Event } from '@sentry/types';\nimport { isString } from '@sentry/utils';\n\nimport { runOutsideAngular } from './zone';\n\n/**\n * Options used to configure the behavior of the Angular ErrorHandler.\n */\nexport interface ErrorHandlerOptions {\n logErrors?: boolean;\n showDialog?: boolean;\n // eslint-disable-next-line deprecation/deprecation\n dialogOptions?: Omit<Sentry.ReportDialogOptions, 'eventId'>;\n /**\n * Custom implementation of error extraction from the raw value captured by the Angular.\n * @param error Value captured by Angular's ErrorHandler provider\n * @param defaultExtractor Default implementation that can be used as the fallback in case of custom implementation\n */\n extractor?(error: unknown, defaultExtractor: (error: unknown) => unknown): unknown;\n}\n\n// https://github.com/angular/angular/blob/master/packages/core/src/util/errors.ts\nfunction tryToUnwrapZonejsError(error: unknown): unknown | Error {\n // TODO: once Angular14 is the minimum requirement ERROR_ORIGINAL_ERROR and\n // getOriginalError from error.ts can be used directly.\n return error && (error as { ngOriginalError: Error }).ngOriginalError\n ? (error as { ngOriginalError: Error }).ngOriginalError\n : error;\n}\n\nfunction extractHttpModuleError(error: HttpErrorResponse): string | Error {\n // The `error` property of http exception can be either an `Error` object, which we can use directly...\n if (isErrorOrErrorLikeObject(error.error)) {\n return error.error;\n }\n\n // ... or an`ErrorEvent`, which can provide us with the message but no stack...\n if (error.error instanceof ErrorEvent && error.error.message) {\n return error.error.message;\n }\n\n // ...or the request body itself, which we can use as a message instead.\n if (typeof error.error === 'string') {\n return `Server returned code ${error.status} with body \"${error.error}\"`;\n }\n\n // If we don't have any detailed information, fallback to the request message itself.\n return error.message;\n}\n\ntype ErrorCandidate = {\n name?: unknown;\n message?: unknown;\n stack?: unknown;\n};\n\nfunction isErrorOrErrorLikeObject(value: unknown): value is Error {\n if (value instanceof Error) {\n return true;\n }\n\n if (value === null || typeof value !== 'object') {\n return false;\n }\n\n const candidate = value as ErrorCandidate;\n\n return (\n isString(candidate.name) &&\n isString(candidate.message) &&\n (undefined === candidate.stack || isString(candidate.stack))\n );\n}\n\n/**\n * Implementation of Angular's ErrorHandler provider that can be used as a drop-in replacement for the stock one.\n */\n@Injectable({ providedIn: 'root' })\nclass SentryErrorHandler implements AngularErrorHandler {\n protected readonly _options: ErrorHandlerOptions;\n\n /* indicates if we already registered our the afterSendEvent handler */\n private _registeredAfterSendEventHandler;\n\n public constructor(@Inject('errorHandlerOptions') options?: ErrorHandlerOptions) {\n this._registeredAfterSendEventHandler = false;\n\n this._options = {\n logErrors: true,\n ...options,\n };\n }\n\n /**\n * Method called for every value captured through the ErrorHandler\n */\n public handleError(error: unknown): void {\n const extractedError = this._extractError(error) || 'Handled unknown error';\n\n // Capture handled exception and send it to Sentry.\n const eventId = runOutsideAngular(() =>\n Sentry.captureException(extractedError, {\n mechanism: { type: 'angular', handled: false },\n }),\n );\n\n // When in development mode, log the error to console for immediate feedback.\n if (this._options.logErrors) {\n // eslint-disable-next-line no-console\n console.error(extractedError);\n }\n\n // Optionally show user dialog to provide details on what happened.\n if (this._options.showDialog) {\n const client = Sentry.getClient();\n\n if (client && client.on && !this._registeredAfterSendEventHandler) {\n client.on('afterSendEvent', (event: Event) => {\n if (!event.type) {\n // eslint-disable-next-line deprecation/deprecation\n Sentry.showReportDialog({ ...this._options.dialogOptions, eventId: event.event_id });\n }\n });\n\n // We only want to register this hook once in the lifetime of the error handler\n this._registeredAfterSendEventHandler = true;\n } else if (!client || !client.on) {\n Sentry.showReportDialog({ ...this._options.dialogOptions, eventId });\n }\n }\n }\n\n /**\n * Used to pull a desired value that will be used to capture an event out of the raw value captured by ErrorHandler.\n */\n protected _extractError(error: unknown): unknown {\n // Allow custom overrides of extracting function\n if (this._options.extractor) {\n const defaultExtractor = this._defaultExtractor.bind(this);\n return this._options.extractor(error, defaultExtractor);\n }\n\n return this._defaultExtractor(error);\n }\n\n /**\n * Default implementation of error extraction that handles default error wrapping, HTTP responses, ErrorEvent and few other known cases.\n */\n protected _defaultExtractor(errorCandidate: unknown): unknown {\n const error = tryToUnwrapZonejsError(errorCandidate);\n\n // If it's http module error, extract as much information from it as we can.\n if (error instanceof HttpErrorResponse) {\n return extractHttpModuleError(error);\n }\n\n // We can handle messages and Error objects directly.\n if (typeof error === 'string' || isErrorOrErrorLikeObject(error)) {\n return error;\n }\n\n // Nothing was extracted, fallback to default error message.\n return null;\n }\n}\n\n/**\n * Factory function that creates an instance of a preconfigured ErrorHandler provider.\n */\nfunction createErrorHandler(config?: ErrorHandlerOptions): SentryErrorHandler {\n return new SentryErrorHandler(config);\n}\n\nexport { createErrorHandler, SentryErrorHandler };\n","export const ANGULAR_ROUTING_OP = 'ui.angular.routing';\n\nexport const ANGULAR_INIT_OP = 'ui.angular.init';\n\nexport const ANGULAR_OP = 'ui.angular';\n","/* eslint-disable max-lines */\nimport type { AfterViewInit, OnDestroy, OnInit } from '@angular/core';\nimport { Directive, Injectable, Input, NgModule } from '@angular/core';\nimport type { ActivatedRouteSnapshot, Event, RouterState } from '@angular/router';\n// Duplicated import to work around a TypeScript bug where it'd complain that `Router` isn't imported as a type.\n// We need to import it as a value to satisfy Angular dependency injection. So:\n// eslint-disable-next-line @typescript-eslint/consistent-type-imports\nimport { NavigationCancel, NavigationError, Router } from '@angular/router';\nimport { NavigationEnd, NavigationStart, ResolveEnd } from '@angular/router';\nimport {\n WINDOW,\n browserTracingIntegration as originalBrowserTracingIntegration,\n getCurrentScope,\n startBrowserTracingNavigationSpan,\n} from '@sentry/browser';\nimport {\n SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN,\n SEMANTIC_ATTRIBUTE_SENTRY_SOURCE,\n getActiveSpan,\n getClient,\n spanToJSON,\n startInactiveSpan,\n} from '@sentry/core';\nimport type { Integration, Span, Transaction, TransactionContext } from '@sentry/types';\nimport { logger, stripUrlQueryAndFragment, timestampInSeconds } from '@sentry/utils';\nimport type { Observable } from 'rxjs';\nimport { Subscription } from 'rxjs';\nimport { filter, tap } from 'rxjs/operators';\n\nimport { ANGULAR_INIT_OP, ANGULAR_OP, ANGULAR_ROUTING_OP } from './constants';\nimport { IS_DEBUG_BUILD } from './flags';\nimport { runOutsideAngular } from './zone';\n\nlet instrumentationInitialized: boolean;\nlet stashedStartTransaction: (context: TransactionContext) => Transaction | undefined;\nlet stashedStartTransactionOnLocationChange: boolean;\n\nlet hooksBasedInstrumentation = false;\n\n/**\n * Creates routing instrumentation for Angular Router.\n *\n * @deprecated Use `browserTracingIntegration()` instead, which includes Angular-specific instrumentation out of the box.\n */\nexport function routingInstrumentation(\n customStartTransaction: (context: TransactionContext) => Transaction | undefined,\n startTransactionOnPageLoad: boolean = true,\n startTransactionOnLocationChange: boolean = true,\n): void {\n instrumentationInitialized = true;\n stashedStartTransaction = customStartTransaction;\n stashedStartTransactionOnLocationChange = startTransactionOnLocationChange;\n\n if (startTransactionOnPageLoad && WINDOW && WINDOW.location) {\n customStartTransaction({\n name: WINDOW.location.pathname,\n op: 'pageload',\n origin: 'auto.pageload.angular',\n attributes: {\n [SEMANTIC_ATTRIBUTE_SENTRY_SOURCE]: 'url',\n },\n });\n }\n}\n\n/**\n * Creates routing instrumentation for Angular Router.\n *\n * @deprecated Use `browserTracingIntegration()` instead, which includes Angular-specific instrumentation out of the box.\n */\n// eslint-disable-next-line deprecation/deprecation\nexport const instrumentAngularRouting = routingInstrumentation;\n\n/**\n * A custom BrowserTracing integration for Angular.\n *\n * Use this integration in combination with `TraceService`\n */\nexport function browserTracingIntegration(\n options: Parameters<typeof originalBrowserTracingIntegration>[0] = {},\n): Integration {\n // If the user opts out to set this up, we just don't initialize this.\n // That way, the TraceService will not actually do anything, functionally disabling this.\n if (options.instrumentNavigation !== false) {\n instrumentationInitialized = true;\n hooksBasedInstrumentation = true;\n }\n\n return originalBrowserTracingIntegration({\n ...options,\n instrumentNavigation: false,\n });\n}\n\n/**\n * Grabs active transaction off scope.\n *\n * @deprecated You should not rely on the transaction, but just use `startSpan()` APIs instead.\n */\nexport function getActiveTransaction(): Transaction | undefined {\n // eslint-disable-next-line deprecation/deprecation\n return getCurrentScope().getTransaction();\n}\n\n/**\n * Angular's Service responsible for hooking into Angular Router and tracking current navigation process.\n * Creates a new transaction for every route change and measures a duration of routing process.\n */\n@Injectable({ providedIn: 'root' })\nexport class TraceService implements OnDestroy {\n public navStart$: Observable<Event> = this._router.events.pipe(\n filter((event): event is NavigationStart => event instanceof NavigationStart),\n tap(navigationEvent => {\n if (!instrumentationInitialized) {\n IS_DEBUG_BUILD &&\n logger.error('Angular integration has tracing enabled, but Tracing integration is not configured');\n return;\n }\n\n if (this._routingSpan) {\n this._routingSpan.end();\n this._routingSpan = null;\n }\n\n const client = getClient();\n const strippedUrl = stripUrlQueryAndFragment(navigationEvent.url);\n\n if (client && hooksBasedInstrumentation) {\n if (!getActiveSpan()) {\n startBrowserTracingNavigationSpan(client, {\n name: strippedUrl,\n origin: 'auto.navigation.angular',\n attributes: {\n [SEMANTIC_ATTRIBUTE_SENTRY_SOURCE]: 'url',\n },\n });\n }\n\n // eslint-disable-next-line deprecation/deprecation\n this._routingSpan =\n startInactiveSpan({\n name: `${navigationEvent.url}`,\n op: ANGULAR_ROUTING_OP,\n origin: 'auto.ui.angular',\n tags: {\n 'routing.instrumentation': '@sentry/angular',\n url: strippedUrl,\n ...(navigationEvent.navigationTrigger && {\n navigationTrigger: navigationEvent.navigationTrigger,\n }),\n },\n }) || null;\n\n return;\n }\n\n // eslint-disable-next-line deprecation/deprecation\n let activeTransaction = getActiveTransaction();\n\n if (!activeTransaction && stashedStartTransactionOnLocationChange) {\n activeTransaction = stashedStartTransaction({\n name: strippedUrl,\n op: 'navigation',\n origin: 'auto.navigation.angular',\n attributes: {\n [SEMANTIC_ATTRIBUTE_SENTRY_SOURCE]: 'url',\n },\n });\n }\n\n if (activeTransaction) {\n // eslint-disable-next-line deprecation/deprecation\n this._routingSpan = activeTransaction.startChild({\n description: `${navigationEvent.url}`,\n op: ANGULAR_ROUTING_OP,\n origin: 'auto.ui.angular',\n tags: {\n 'routing.instrumentation': '@sentry/angular',\n url: strippedUrl,\n ...(navigationEvent.navigationTrigger && {\n navigationTrigger: navigationEvent.navigationTrigger,\n }),\n },\n });\n }\n }),\n );\n\n // The ResolveEnd event is fired when the Angular router has resolved the URL and\n // the parameter<->value mapping. It holds the new resolved router state with\n // the mapping and the new URL.\n // Only After this event, the route is activated, meaning that the transaction\n // can be updated with the parameterized route name before e.g. the route's root\n // component is initialized. This should be early enough before outgoing requests\n // are made from the new route, with the exceptions of requests being made during\n // a navigation.\n public resEnd$: Observable<Event> = this._router.events.pipe(\n filter((event): event is ResolveEnd => event instanceof ResolveEnd),\n tap(event => {\n const route = getParameterizedRouteFromSnapshot(\n (event.state as unknown as RouterState & { root: ActivatedRouteSnapshot }).root,\n );\n\n // eslint-disable-next-line deprecation/deprecation\n const transaction = getActiveTransaction();\n // TODO (v8 / #5416): revisit the source condition. Do we want to make the parameterized route the default?\n const attributes = (transaction && spanToJSON(transaction).data) || {};\n if (transaction && attributes[SEMANTIC_ATTRIBUTE_SENTRY_SOURCE] === 'url') {\n transaction.updateName(route);\n transaction.setAttribute(SEMANTIC_ATTRIBUTE_SENTRY_SOURCE, 'route');\n transaction.setAttribute(SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN, `auto.${spanToJSON(transaction).op}.angular`);\n }\n }),\n );\n\n public navEnd$: Observable<Event> = this._router.events.pipe(\n filter(\n event => event instanceof NavigationEnd || event instanceof NavigationCancel || event instanceof NavigationError,\n ),\n tap(() => {\n if (this._routingSpan) {\n runOutsideAngular(() => {\n // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n this._routingSpan!.end();\n });\n this._routingSpan = null;\n }\n }),\n );\n\n private _routingSpan: Span | null;\n\n private _subscription: Subscription;\n\n public constructor(private readonly _router: Router) {\n this._routingSpan = null;\n this._subscription = new Subscription();\n\n this._subscription.add(this.navStart$.subscribe());\n this._subscription.add(this.resEnd$.subscribe());\n this._subscription.add(this.navEnd$.subscribe());\n }\n\n /**\n * This is used to prevent memory leaks when the root view is created and destroyed multiple times,\n * since `subscribe` callbacks capture `this` and prevent many resources from being GC'd.\n */\n public ngOnDestroy(): void {\n this._subscription.unsubscribe();\n }\n}\n\nconst UNKNOWN_COMPONENT = 'unknown';\n\n/**\n * A directive that can be used to capture initialization lifecycle of the whole component.\n */\n@Directive({ selector: '[trace]' })\nexport class TraceDirective implements OnInit, AfterViewInit {\n @Input('trace') public componentName?: string;\n\n private _tracingSpan?: Span;\n\n /**\n * Implementation of OnInit lifecycle method\n * @inheritdoc\n */\n public ngOnInit(): void {\n if (!this.componentName) {\n this.componentName = UNKNOWN_COMPONENT;\n }\n\n // eslint-disable-next-line deprecation/deprecation\n const activeTransaction = getActiveTransaction();\n if (activeTransaction) {\n // eslint-disable-next-line deprecation/deprecation\n this._tracingSpan = activeTransaction.startChild({\n description: `<${this.componentName}>`,\n op: ANGULAR_INIT_OP,\n origin: 'auto.ui.angular.trace_directive',\n });\n }\n }\n\n /**\n * Implementation of AfterViewInit lifecycle method\n * @inheritdoc\n */\n public ngAfterViewInit(): void {\n if (this._tracingSpan) {\n this._tracingSpan.end();\n }\n }\n}\n\n/**\n * A module serves as a single compilation unit for the `TraceDirective` and can be re-used by any other module.\n */\n@NgModule({\n declarations: [TraceDirective],\n exports: [TraceDirective],\n})\nexport class TraceModule {}\n\n/**\n * Decorator function that can be used to capture initialization lifecycle of the whole component.\n */\nexport function TraceClassDecorator(): ClassDecorator {\n let tracingSpan: Span;\n\n /* eslint-disable @typescript-eslint/no-unsafe-member-access */\n // eslint-disable-next-line @typescript-eslint/explicit-function-return-type\n return target => {\n const originalOnInit = target.prototype.ngOnInit;\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n target.prototype.ngOnInit = function (...args: any[]): ReturnType<typeof originalOnInit> {\n // eslint-disable-next-line deprecation/deprecation\n const activeTransaction = getActiveTransaction();\n if (activeTransaction) {\n // eslint-disable-next-line deprecation/deprecation\n tracingSpan = activeTransaction.startChild({\n description: `<${target.name}>`,\n op: ANGULAR_INIT_OP,\n origin: 'auto.ui.angular.trace_class_decorator',\n });\n }\n if (originalOnInit) {\n return originalOnInit.apply(this, args);\n }\n };\n\n const originalAfterViewInit = target.prototype.ngAfterViewInit;\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n target.prototype.ngAfterViewInit = function (...args: any[]): ReturnType<typeof originalAfterViewInit> {\n if (tracingSpan) {\n tracingSpan.end();\n }\n if (originalAfterViewInit) {\n return originalAfterViewInit.apply(this, args);\n }\n };\n };\n /* eslint-enable @typescript-eslint/no-unsafe-member-access */\n}\n\n/**\n * Decorator function that can be used to capture a single lifecycle methods of the component.\n */\nexport function TraceMethodDecorator(): MethodDecorator {\n // eslint-disable-next-line @typescript-eslint/explicit-function-return-type, @typescript-eslint/ban-types\n return (target: Object, propertyKey: string | symbol, descriptor: PropertyDescriptor) => {\n const originalMethod = descriptor.value;\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n descriptor.value = function (...args: any[]): ReturnType<typeof originalMethod> {\n const now = timestampInSeconds();\n // eslint-disable-next-line deprecation/deprecation\n const activeTransaction = getActiveTransaction();\n if (activeTransaction) {\n // eslint-disable-next-line deprecation/deprecation\n activeTransaction.startChild({\n description: `<${target.constructor.name}>`,\n endTimestamp: now,\n op: `${ANGULAR_OP}.${String(propertyKey)}`,\n origin: 'auto.ui.angular.trace_method_decorator',\n startTimestamp: now,\n });\n }\n if (originalMethod) {\n // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access\n return originalMethod.apply(this, args);\n }\n };\n return descriptor;\n };\n}\n\n/**\n * Takes the parameterized route from a given ActivatedRouteSnapshot and concatenates the snapshot's\n * child route with its parent to produce the complete parameterized URL of the activated route.\n * This happens recursively until the last child (i.e. the end of the URL) is reached.\n *\n * @param route the ActivatedRouteSnapshot of which its path and its child's path is concatenated\n *\n * @returns the concatenated parameterized route string\n */\nexport function getParameterizedRouteFromSnapshot(route?: ActivatedRouteSnapshot | null): string {\n const parts: string[] = [];\n\n let currentRoute = route && route.firstChild;\n while (currentRoute) {\n const path = currentRoute && currentRoute.routeConfig && currentRoute.routeConfig.path;\n if (path === null || path === undefined) {\n break;\n }\n\n parts.push(path);\n currentRoute = currentRoute.firstChild;\n }\n\n const fullPath = parts.filter(part => part).join('/');\n return fullPath ? `/${fullPath}/` : '/';\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":["getDefaultIntegrations","applySdkMetadata","browserInit","VERSION","logger","setContext","isString","Sentry","HttpErrorResponse","Injectable","Inject","WINDOW","SEMANTIC_ATTRIBUTE_SENTRY_SOURCE","originalBrowserTracingIntegration","getCurrentScope","filter","NavigationStart","tap","getClient","stripUrlQueryAndFragment","getActiveSpan","startBrowserTracingNavigationSpan","startInactiveSpan","ResolveEnd","spanToJSON","SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN","NavigationEnd","NavigationCancel","NavigationError","Subscription","Router","Directive","Input","NgModule","timestampInSeconds"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;IAAA;;;;;;;IAOG;IAIH;IACO,IAAM,cAAc,GAAG,OAAO,gBAAgB,KAAK,WAAW,GAAG,IAAI,GAAG,gBAAgB;;ICJ/F;;IAEG;IACG,SAAU,IAAI,CAAC,OAAuB,EAAA;IAC1C,IAAA,IAAM,IAAI,GAAA,MAAA,CAAA,MAAA,CAAA;;;;;;;YAOR,mBAAmB,EAAEA,6BAAsB,CAAC,OAAO,CAAC,CAAC,MAAM,CAAC,UAAA,WAAW,EAAA;IACrE,YAAA,OAAO,WAAW,CAAC,IAAI,KAAK,UAAU,CAAC;IACzC,SAAC,CAAC;SAAA,EACC,OAAO,CACX,CAAC;IAEF,IAAAC,qBAAgB,CAAC,IAAI,EAAE,SAAS,CAAC,CAAC;IAElC,IAAA,yBAAyB,EAAE,CAAC;QAC5BC,WAAW,CAAC,IAAI,CAAC,CAAC;IACpB,CAAC;IAED,SAAS,yBAAyB,GAAA;QAChC,IAAM,uBAAuB,GAAG,EAAE,CAAC;QAEnC,IAAM,cAAc,GAAGC,UAAO,IAAIA,UAAO,CAAC,KAAK,GAAG,QAAQ,CAACA,UAAO,CAAC,KAAK,EAAE,EAAE,CAAC,GAAG,SAAS,CAAC;IAE1F,IAAA,IAAI,cAAc,EAAE;YAClB,IAAI,cAAc,GAAG,uBAAuB,EAAE;gBAC5C,cAAc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AG,GAAA,GAAI,QAAQ,GAAA,GAAG,GAAG,GAAG,CAAC;IAC1C;;ICjZA;;IAEG;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"sentry-angular.umd.js","sources":["../../src/flags.ts","../../src/sdk.ts","../../src/zone.ts","../../src/errorhandler.ts","../../src/constants.ts","../../src/tracing.ts","../../src/sentry-angular.ts"],"sourcesContent":["/*\n * This file defines flags and constants that can be modified during compile time in order to facilitate tree shaking\n * for users.\n *\n * We define \"magic strings\" like `__SENTRY_DEBUG__` that may get replaced with actual values during our, or the user's\n * build process. Take care when introducing new flags - they must not throw if they are not replaced. See the Debug\n * Build Flags section in CONTRIBUTING.md.\n */\n\ndeclare const __SENTRY_DEBUG__: boolean;\n\n/** Flag that is true for debug builds, false otherwise. */\nexport const IS_DEBUG_BUILD = typeof __SENTRY_DEBUG__ === 'undefined' ? true : __SENTRY_DEBUG__;\n","import { VERSION } from '@angular/core';\nimport type { BrowserOptions } from '@sentry/browser';\nimport { getDefaultIntegrations, init as browserInit, setContext } from '@sentry/browser';\nimport { applySdkMetadata } from '@sentry/core';\nimport { logger } from '@sentry/utils';\n\nimport { IS_DEBUG_BUILD } from './flags';\n\n/**\n * Inits the Angular SDK\n */\nexport function init(options: BrowserOptions): void {\n const opts = {\n // Filter out BrowserApiErrors integration as it interferes with our Angular `ErrorHandler`:\n // BrowserApiErrors would catch certain errors before they reach the `ErrorHandler` and thus provide a\n // lower fidelity error than what `SentryErrorHandler` (see errorhandler.ts) would provide.\n // see:\n // - https://github.com/getsentry/sentry-javascript/issues/5417#issuecomment-1453407097\n // - https://github.com/getsentry/sentry-javascript/issues/2744\n defaultIntegrations: getDefaultIntegrations(options).filter(integration => {\n return integration.name !== 'BrowserApiErrors';\n }),\n ...options,\n };\n\n applySdkMetadata(opts, 'angular');\n\n checkAndSetAngularVersion();\n browserInit(opts);\n}\n\nfunction checkAndSetAngularVersion(): void {\n const ANGULAR_MINIMUM_VERSION = 10;\n\n const angularVersion = VERSION && VERSION.major ? parseInt(VERSION.major, 10) : undefined;\n\n if (angularVersion) {\n if (angularVersion < ANGULAR_MINIMUM_VERSION) {\n IS_DEBUG_BUILD &&\n logger.warn(\n `The Sentry SDK does not officially support Angular ${angularVersion}.`,\n `This version of the Sentry SDK supports Angular ${ANGULAR_MINIMUM_VERSION} and above.`,\n 'Please consider upgrading your Angular version or downgrading the Sentry SDK.',\n );\n }\n setContext('angular', { version: angularVersion });\n }\n}\n","// That's the `global.Zone` exposed when the `zone.js` package is used.\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\ndeclare const Zone: any;\n\n// There're 2 types of Angular applications:\n// 1) zone-full (by default)\n// 2) zone-less\n// The developer can avoid importing the `zone.js` package and tells Angular that\n// he is responsible for running the change detection by himself. This is done by\n// \"nooping\" the zone through `CompilerOptions` when bootstrapping the root module.\n// eslint-disable-next-line @typescript-eslint/no-unsafe-member-access\nconst isNgZoneEnabled = typeof Zone !== 'undefined' && !!Zone.current;\n\n/**\n * The function that does the same job as `NgZone.runOutsideAngular`.\n */\nexport function runOutsideAngular<T>(callback: () => T): T {\n // The `Zone.root.run` basically will run the `callback` in the most parent zone.\n // Any asynchronous API used inside the `callback` won't catch Angular's zone\n // since `Zone.current` will reference `Zone.root`.\n // The Angular's zone is forked from the `Zone.root`. In this case, `zone.js` won't\n // trigger change detection, and `ApplicationRef.tick()` will not be run.\n // Caretaker note: we're using `Zone.root` except `NgZone.runOutsideAngular` since this\n // will require injecting the `NgZone` facade. That will create a breaking change for\n // projects already using the `@sentry/angular`.\n // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access\n return isNgZoneEnabled ? Zone.root.run(callback) : callback();\n}\n","import { HttpErrorResponse } from '@angular/common/http';\nimport type { ErrorHandler as AngularErrorHandler } from '@angular/core';\nimport { Inject, Injectable } from '@angular/core';\nimport * as Sentry from '@sentry/browser';\nimport type { ReportDialogOptions } from '@sentry/browser';\nimport type { Event } from '@sentry/types';\nimport { isString } from '@sentry/utils';\n\nimport { runOutsideAngular } from './zone';\n\n/**\n * Options used to configure the behavior of the Angular ErrorHandler.\n */\nexport interface ErrorHandlerOptions {\n logErrors?: boolean;\n showDialog?: boolean;\n dialogOptions?: Omit<ReportDialogOptions, 'eventId'>;\n /**\n * Custom implementation of error extraction from the raw value captured by the Angular.\n * @param error Value captured by Angular's ErrorHandler provider\n * @param defaultExtractor Default implementation that can be used as the fallback in case of custom implementation\n */\n extractor?(error: unknown, defaultExtractor: (error: unknown) => unknown): unknown;\n}\n\n// https://github.com/angular/angular/blob/master/packages/core/src/util/errors.ts\nfunction tryToUnwrapZonejsError(error: unknown): unknown | Error {\n // TODO: once Angular14 is the minimum requirement ERROR_ORIGINAL_ERROR and\n // getOriginalError from error.ts can be used directly.\n return error && (error as { ngOriginalError: Error }).ngOriginalError\n ? (error as { ngOriginalError: Error }).ngOriginalError\n : error;\n}\n\nfunction extractHttpModuleError(error: HttpErrorResponse): string | Error {\n // The `error` property of http exception can be either an `Error` object, which we can use directly...\n if (isErrorOrErrorLikeObject(error.error)) {\n return error.error;\n }\n\n // ... or an`ErrorEvent`, which can provide us with the message but no stack...\n if (error.error instanceof ErrorEvent && error.error.message) {\n return error.error.message;\n }\n\n // ...or the request body itself, which we can use as a message instead.\n if (typeof error.error === 'string') {\n return `Server returned code ${error.status} with body \"${error.error}\"`;\n }\n\n // If we don't have any detailed information, fallback to the request message itself.\n return error.message;\n}\n\ntype ErrorCandidate = {\n name?: unknown;\n message?: unknown;\n stack?: unknown;\n};\n\nfunction isErrorOrErrorLikeObject(value: unknown): value is Error {\n if (value instanceof Error) {\n return true;\n }\n\n if (value === null || typeof value !== 'object') {\n return false;\n }\n\n const candidate = value as ErrorCandidate;\n\n return (\n isString(candidate.name) &&\n isString(candidate.message) &&\n (undefined === candidate.stack || isString(candidate.stack))\n );\n}\n\n/**\n * Implementation of Angular's ErrorHandler provider that can be used as a drop-in replacement for the stock one.\n */\n@Injectable({ providedIn: 'root' })\nclass SentryErrorHandler implements AngularErrorHandler {\n protected readonly _options: ErrorHandlerOptions;\n\n /* indicates if we already registered our the afterSendEvent handler */\n private _registeredAfterSendEventHandler;\n\n public constructor(@Inject('errorHandlerOptions') options?: ErrorHandlerOptions) {\n this._registeredAfterSendEventHandler = false;\n\n this._options = {\n logErrors: true,\n ...options,\n };\n }\n\n /**\n * Method called for every value captured through the ErrorHandler\n */\n public handleError(error: unknown): void {\n const extractedError = this._extractError(error) || 'Handled unknown error';\n\n // Capture handled exception and send it to Sentry.\n const eventId = runOutsideAngular(() =>\n Sentry.captureException(extractedError, {\n mechanism: { type: 'angular', handled: false },\n }),\n );\n\n // When in development mode, log the error to console for immediate feedback.\n if (this._options.logErrors) {\n // eslint-disable-next-line no-console\n console.error(extractedError);\n }\n\n // Optionally show user dialog to provide details on what happened.\n if (this._options.showDialog) {\n const client = Sentry.getClient();\n\n if (client && !this._registeredAfterSendEventHandler) {\n client.on('afterSendEvent', (event: Event) => {\n if (!event.type && event.event_id) {\n Sentry.showReportDialog({ ...this._options.dialogOptions, eventId: event.event_id });\n }\n });\n\n // We only want to register this hook once in the lifetime of the error handler\n this._registeredAfterSendEventHandler = true;\n } else if (!client) {\n Sentry.showReportDialog({ ...this._options.dialogOptions, eventId });\n }\n }\n }\n\n /**\n * Used to pull a desired value that will be used to capture an event out of the raw value captured by ErrorHandler.\n */\n protected _extractError(error: unknown): unknown {\n // Allow custom overrides of extracting function\n if (this._options.extractor) {\n const defaultExtractor = this._defaultExtractor.bind(this);\n return this._options.extractor(error, defaultExtractor);\n }\n\n return this._defaultExtractor(error);\n }\n\n /**\n * Default implementation of error extraction that handles default error wrapping, HTTP responses, ErrorEvent and few other known cases.\n */\n protected _defaultExtractor(errorCandidate: unknown): unknown {\n const error = tryToUnwrapZonejsError(errorCandidate);\n\n // If it's http module error, extract as much information from it as we can.\n if (error instanceof HttpErrorResponse) {\n return extractHttpModuleError(error);\n }\n\n // We can handle messages and Error objects directly.\n if (typeof error === 'string' || isErrorOrErrorLikeObject(error)) {\n return error;\n }\n\n // Nothing was extracted, fallback to default error message.\n return null;\n }\n}\n\n/**\n * Factory function that creates an instance of a preconfigured ErrorHandler provider.\n */\nfunction createErrorHandler(config?: ErrorHandlerOptions): SentryErrorHandler {\n return new SentryErrorHandler(config);\n}\n\nexport { createErrorHandler, SentryErrorHandler };\n","export const ANGULAR_ROUTING_OP = 'ui.angular.routing';\n\nexport const ANGULAR_INIT_OP = 'ui.angular.init';\n\nexport const ANGULAR_OP = 'ui.angular';\n","/* eslint-disable max-lines */\nimport type { AfterViewInit, OnDestroy, OnInit } from '@angular/core';\nimport { Directive, Injectable, Input, NgModule } from '@angular/core';\nimport type { ActivatedRouteSnapshot, Event, RouterState } from '@angular/router';\n// Duplicated import to work around a TypeScript bug where it'd complain that `Router` isn't imported as a type.\n// We need to import it as a value to satisfy Angular dependency injection. So:\n// eslint-disable-next-line @typescript-eslint/consistent-type-imports\nimport { NavigationCancel, NavigationError, Router } from '@angular/router';\nimport { NavigationEnd, NavigationStart, ResolveEnd } from '@angular/router';\nimport {\n SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN,\n SEMANTIC_ATTRIBUTE_SENTRY_SOURCE,\n WINDOW,\n browserTracingIntegration as originalBrowserTracingIntegration,\n getCurrentScope,\n startBrowserTracingNavigationSpan,\n} from '@sentry/browser';\nimport { getActiveSpan, getClient, getRootSpan, spanToJSON, startInactiveSpan } from '@sentry/core';\nimport type { Integration, Span, Transaction, TransactionContext } from '@sentry/types';\nimport { logger, stripUrlQueryAndFragment, timestampInSeconds } from '@sentry/utils';\nimport type { Observable } from 'rxjs';\nimport { Subscription } from 'rxjs';\nimport { filter, tap } from 'rxjs/operators';\n\nimport { ANGULAR_INIT_OP, ANGULAR_OP, ANGULAR_ROUTING_OP } from './constants';\nimport { IS_DEBUG_BUILD } from './flags';\nimport { runOutsideAngular } from './zone';\n\nlet instrumentationInitialized: boolean;\nlet stashedStartTransaction: (context: TransactionContext) => Transaction | undefined;\nlet stashedStartTransactionOnLocationChange: boolean;\n\nlet hooksBasedInstrumentation = false;\n\n/**\n * Creates routing instrumentation for Angular Router.\n *\n * @deprecated Use `browserTracingIntegration()` instead, which includes Angular-specific instrumentation out of the box.\n */\nexport function routingInstrumentation(\n customStartTransaction: (context: TransactionContext) => Transaction | undefined,\n startTransactionOnPageLoad: boolean = true,\n startTransactionOnLocationChange: boolean = true,\n): void {\n instrumentationInitialized = true;\n stashedStartTransaction = customStartTransaction;\n stashedStartTransactionOnLocationChange = startTransactionOnLocationChange;\n\n if (startTransactionOnPageLoad && WINDOW && WINDOW.location) {\n customStartTransaction({\n name: WINDOW.location.pathname,\n op: 'pageload',\n origin: 'auto.pageload.angular',\n attributes: {\n [SEMANTIC_ATTRIBUTE_SENTRY_SOURCE]: 'url',\n },\n });\n }\n}\n\n/**\n * Creates routing instrumentation for Angular Router.\n *\n * @deprecated Use `browserTracingIntegration()` instead, which includes Angular-specific instrumentation out of the box.\n */\n// eslint-disable-next-line deprecation/deprecation\nexport const instrumentAngularRouting = routingInstrumentation;\n\n/**\n * A custom browser tracing integration for Angular.\n *\n * Use this integration in combination with `TraceService`\n */\nexport function browserTracingIntegration(\n options: Parameters<typeof originalBrowserTracingIntegration>[0] = {},\n): Integration {\n // If the user opts out to set this up, we just don't initialize this.\n // That way, the TraceService will not actually do anything, functionally disabling this.\n if (options.instrumentNavigation !== false) {\n instrumentationInitialized = true;\n hooksBasedInstrumentation = true;\n }\n\n return originalBrowserTracingIntegration({\n ...options,\n instrumentNavigation: false,\n });\n}\n\n/**\n * Grabs active transaction off scope.\n *\n * @deprecated You should not rely on the transaction, but just use `startSpan()` APIs instead.\n */\nexport function getActiveTransaction(): Transaction | undefined {\n // eslint-disable-next-line deprecation/deprecation\n return getCurrentScope().getTransaction();\n}\n\n/**\n * Angular's Service responsible for hooking into Angular Router and tracking current navigation process.\n * Creates a new transaction for every route change and measures a duration of routing process.\n */\n@Injectable({ providedIn: 'root' })\nexport class TraceService implements OnDestroy {\n public navStart$: Observable<Event> = this._router.events.pipe(\n filter((event): event is NavigationStart => event instanceof NavigationStart),\n tap(navigationEvent => {\n if (!instrumentationInitialized) {\n IS_DEBUG_BUILD &&\n logger.error('Angular integration has tracing enabled, but Tracing integration is not configured');\n return;\n }\n\n if (this._routingSpan) {\n this._routingSpan.end();\n this._routingSpan = null;\n }\n\n const client = getClient();\n const strippedUrl = stripUrlQueryAndFragment(navigationEvent.url);\n\n if (client && hooksBasedInstrumentation) {\n // see comment in `_isPageloadOngoing` for rationale\n if (!this._isPageloadOngoing()) {\n startBrowserTracingNavigationSpan(client, {\n name: strippedUrl,\n attributes: {\n [SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN]: 'auto.navigation.angular',\n [SEMANTIC_ATTRIBUTE_SENTRY_SOURCE]: 'url',\n },\n });\n } else {\n // The first time we end up here, we set the pageload flag to false\n // Subsequent navigations are going to get their own navigation root span\n // even if the pageload root span is still ongoing.\n this._pageloadOngoing = false;\n }\n\n this._routingSpan =\n startInactiveSpan({\n name: `${navigationEvent.url}`,\n op: ANGULAR_ROUTING_OP,\n attributes: {\n [SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN]: 'auto.ui.angular',\n [SEMANTIC_ATTRIBUTE_SENTRY_SOURCE]: 'url',\n url: strippedUrl,\n ...(navigationEvent.navigationTrigger && {\n navigationTrigger: navigationEvent.navigationTrigger,\n }),\n },\n }) || null;\n\n return;\n }\n\n // eslint-disable-next-line deprecation/deprecation\n let activeTransaction = getActiveTransaction();\n\n if (!activeTransaction && stashedStartTransactionOnLocationChange) {\n activeTransaction = stashedStartTransaction({\n name: strippedUrl,\n op: 'navigation',\n origin: 'auto.navigation.angular',\n attributes: {\n [SEMANTIC_ATTRIBUTE_SENTRY_SOURCE]: 'url',\n },\n });\n }\n\n if (activeTransaction) {\n // eslint-disable-next-line deprecation/deprecation\n this._routingSpan = activeTransaction.startChild({\n name: `${navigationEvent.url}`,\n op: ANGULAR_ROUTING_OP,\n origin: 'auto.ui.angular',\n attributes: {\n url: strippedUrl,\n ...(navigationEvent.navigationTrigger && {\n navigationTrigger: navigationEvent.navigationTrigger,\n }),\n },\n });\n }\n }),\n );\n\n // The ResolveEnd event is fired when the Angular router has resolved the URL and\n // the parameter<->value mapping. It holds the new resolved router state with\n // the mapping and the new URL.\n // Only After this event, the route is activated, meaning that the transaction\n // can be updated with the parameterized route name before e.g. the route's root\n // component is initialized. This should be early enough before outgoing requests\n // are made from the new route, with the exceptions of requests being made during\n // a navigation.\n public resEnd$: Observable<Event> = this._router.events.pipe(\n filter((event): event is ResolveEnd => event instanceof ResolveEnd),\n tap(event => {\n const route = getParameterizedRouteFromSnapshot(\n (event.state as unknown as RouterState & { root: ActivatedRouteSnapshot }).root,\n );\n\n // eslint-disable-next-line deprecation/deprecation\n const transaction = getActiveTransaction();\n // TODO (v8 / #5416): revisit the source condition. Do we want to make the parameterized route the default?\n const attributes = (transaction && spanToJSON(transaction).data) || {};\n if (transaction && attributes[SEMANTIC_ATTRIBUTE_SENTRY_SOURCE] === 'url') {\n transaction.updateName(route);\n transaction.setAttribute(SEMANTIC_ATTRIBUTE_SENTRY_SOURCE, 'route');\n transaction.setAttribute(SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN, `auto.${spanToJSON(transaction).op}.angular`);\n }\n }),\n );\n\n public navEnd$: Observable<Event> = this._router.events.pipe(\n filter(\n event => event instanceof NavigationEnd || event instanceof NavigationCancel || event instanceof NavigationError,\n ),\n tap(() => {\n if (this._routingSpan) {\n runOutsideAngular(() => {\n // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n this._routingSpan!.end();\n });\n this._routingSpan = null;\n }\n }),\n );\n\n private _routingSpan: Span | null;\n\n private _subscription: Subscription;\n\n /**\n * @see _isPageloadOngoing()\n */\n private _pageloadOngoing: boolean;\n\n public constructor(private readonly _router: Router) {\n this._routingSpan = null;\n this._pageloadOngoing = true;\n\n this._subscription = new Subscription();\n\n this._subscription.add(this.navStart$.subscribe());\n this._subscription.add(this.resEnd$.subscribe());\n this._subscription.add(this.navEnd$.subscribe());\n }\n\n /**\n * This is used to prevent memory leaks when the root view is created and destroyed multiple times,\n * since `subscribe` callbacks capture `this` and prevent many resources from being GC'd.\n */\n public ngOnDestroy(): void {\n this._subscription.unsubscribe();\n }\n\n /**\n * We only _avoid_ creating a navigation root span in one case:\n *\n * There is an ongoing pageload span AND the router didn't yet emit the first navigation start event\n *\n * The first navigation start event will create the child routing span\n * and update the pageload root span name on ResolveEnd.\n *\n * There's an edge case we need to avoid here: If the router fires the first navigation start event\n * _after_ the pageload root span finished. This is why we check for the pageload root span.\n * Possible real-world scenario: Angular application and/or router is bootstrapped after the pageload\n * idle root span finished\n *\n * The overall rationale is:\n * - if we already avoided creating a navigation root span once, we don't avoid it again\n * (i.e. set `_pageloadOngoing` to `false`)\n * - if `_pageloadOngoing` is already `false`, create a navigation root span\n * - if there's no active/pageload root span, create a navigation root span\n * - only if there's an ongoing pageload root span AND `_pageloadOngoing` is still `true,\n * con't create a navigation root span\n */\n private _isPageloadOngoing(): boolean {\n if (!this._pageloadOngoing) {\n // pageload is already finished, no need to update\n return false;\n }\n\n const activeSpan = getActiveSpan();\n if (!activeSpan) {\n this._pageloadOngoing = false;\n return false;\n }\n\n const rootSpan = getRootSpan(activeSpan);\n if (!rootSpan) {\n this._pageloadOngoing = false;\n return false;\n }\n\n this._pageloadOngoing = spanToJSON(rootSpan).op === 'pageload';\n return this._pageloadOngoing;\n }\n}\n\nconst UNKNOWN_COMPONENT = 'unknown';\n\n/**\n * A directive that can be used to capture initialization lifecycle of the whole component.\n */\n@Directive({ selector: '[trace]' })\nexport class TraceDirective implements OnInit, AfterViewInit {\n @Input('trace') public componentName?: string;\n\n private _tracingSpan?: Span;\n\n /**\n * Implementation of OnInit lifecycle method\n * @inheritdoc\n */\n public ngOnInit(): void {\n if (!this.componentName) {\n this.componentName = UNKNOWN_COMPONENT;\n }\n\n // eslint-disable-next-line deprecation/deprecation\n const activeTransaction = getActiveTransaction();\n if (activeTransaction) {\n // eslint-disable-next-line deprecation/deprecation\n this._tracingSpan = activeTransaction.startChild({\n name: `<${this.componentName}>`,\n op: ANGULAR_INIT_OP,\n origin: 'auto.ui.angular.trace_directive',\n });\n }\n }\n\n /**\n * Implementation of AfterViewInit lifecycle method\n * @inheritdoc\n */\n public ngAfterViewInit(): void {\n if (this._tracingSpan) {\n this._tracingSpan.end();\n }\n }\n}\n\n/**\n * A module serves as a single compilation unit for the `TraceDirective` and can be re-used by any other module.\n */\n@NgModule({\n declarations: [TraceDirective],\n exports: [TraceDirective],\n})\nexport class TraceModule {}\n\n/**\n * Decorator function that can be used to capture initialization lifecycle of the whole component.\n */\nexport function TraceClassDecorator(): ClassDecorator {\n let tracingSpan: Span;\n\n /* eslint-disable @typescript-eslint/no-unsafe-member-access */\n // eslint-disable-next-line @typescript-eslint/explicit-function-return-type\n return target => {\n const originalOnInit = target.prototype.ngOnInit;\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n target.prototype.ngOnInit = function (...args: any[]): ReturnType<typeof originalOnInit> {\n // eslint-disable-next-line deprecation/deprecation\n const activeTransaction = getActiveTransaction();\n if (activeTransaction) {\n // eslint-disable-next-line deprecation/deprecation\n tracingSpan = activeTransaction.startChild({\n name: `<${target.name}>`,\n op: ANGULAR_INIT_OP,\n origin: 'auto.ui.angular.trace_class_decorator',\n });\n }\n if (originalOnInit) {\n return originalOnInit.apply(this, args);\n }\n };\n\n const originalAfterViewInit = target.prototype.ngAfterViewInit;\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n target.prototype.ngAfterViewInit = function (...args: any[]): ReturnType<typeof originalAfterViewInit> {\n if (tracingSpan) {\n tracingSpan.end();\n }\n if (originalAfterViewInit) {\n return originalAfterViewInit.apply(this, args);\n }\n };\n };\n /* eslint-enable @typescript-eslint/no-unsafe-member-access */\n}\n\n/**\n * Decorator function that can be used to capture a single lifecycle methods of the component.\n */\nexport function TraceMethodDecorator(): MethodDecorator {\n // eslint-disable-next-line @typescript-eslint/explicit-function-return-type, @typescript-eslint/ban-types\n return (target: Object, propertyKey: string | symbol, descriptor: PropertyDescriptor) => {\n const originalMethod = descriptor.value;\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n descriptor.value = function (...args: any[]): ReturnType<typeof originalMethod> {\n const now = timestampInSeconds();\n // eslint-disable-next-line deprecation/deprecation\n const activeTransaction = getActiveTransaction();\n if (activeTransaction) {\n // eslint-disable-next-line deprecation/deprecation\n activeTransaction.startChild({\n name: `<${target.constructor.name}>`,\n endTimestamp: now,\n op: `${ANGULAR_OP}.${String(propertyKey)}`,\n origin: 'auto.ui.angular.trace_method_decorator',\n startTimestamp: now,\n });\n }\n if (originalMethod) {\n // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access\n return originalMethod.apply(this, args);\n }\n };\n return descriptor;\n };\n}\n\n/**\n * Takes the parameterized route from a given ActivatedRouteSnapshot and concatenates the snapshot's\n * child route with its parent to produce the complete parameterized URL of the activated route.\n * This happens recursively until the last child (i.e. the end of the URL) is reached.\n *\n * @param route the ActivatedRouteSnapshot of which its path and its child's path is concatenated\n *\n * @returns the concatenated parameterized route string\n */\nexport function getParameterizedRouteFromSnapshot(route?: ActivatedRouteSnapshot | null): string {\n const parts: string[] = [];\n\n let currentRoute = route && route.firstChild;\n while (currentRoute) {\n const path = currentRoute && currentRoute.routeConfig && currentRoute.routeConfig.path;\n if (path === null || path === undefined) {\n break;\n }\n\n parts.push(path);\n currentRoute = currentRoute.firstChild;\n }\n\n const fullPath = parts.filter(part => part).join('/');\n return fullPath ? `/${fullPath}/` : '/';\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":["getDefaultIntegrations","applySdkMetadata","browserInit","VERSION","logger","setContext","isString","Sentry","HttpErrorResponse","Injectable","Inject","WINDOW","SEMANTIC_ATTRIBUTE_SENTRY_SOURCE","originalBrowserTracingIntegration","getCurrentScope","filter","NavigationStart","tap","getClient","stripUrlQueryAndFragment","startBrowserTracingNavigationSpan","SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN","startInactiveSpan","ResolveEnd","spanToJSON","NavigationEnd","NavigationCancel","NavigationError","Subscription","getActiveSpan","getRootSpan","Router","Directive","Input","NgModule","timestampInSeconds"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;IAAA;;;;;;;IAOG;IAIH;IACO,IAAM,cAAc,GAAG,OAAO,gBAAgB,KAAK,WAAW,GAAG,IAAI,GAAG,gBAAgB;;ICJ/F;;IAEG;IACG,SAAU,IAAI,CAAC,OAAuB,EAAA;IAC1C,IAAA,IAAM,IAAI,GAAA,MAAA,CAAA,MAAA,CAAA;;;;;;;YAOR,mBAAmB,EAAEA,6BAAsB,CAAC,OAAO,CAAC,CAAC,MAAM,CAAC,UAAA,WAAW,EAAA;IACrE,YAAA,OAAO,WAAW,CAAC,IAAI,KAAK,kBAAkB,CAAC;IACjD,SAAC,CAAC;SAAA,EACC,OAAO,CACX,CAAC;IAEF,IAAAC,qBAAgB,CAAC,IAAI,EAAE,SAAS,CAAC,CAAC;IAElC,IAAA,yBAAyB,EAAE,CAAC;QAC5BC,WAAW,CAAC,IAAI,CAAC,CAAC;IACpB,CAAC;IAED,SAAS,yBAAyB,GAAA;QAChC,IAAM,uBAAuB,GAAG,EAAE,CAAC;QAEnC,IAAM,cAAc,GAAGC,UAAO,IAAIA,UAAO,CAAC,KAAK,GAAG,QAAQ,CAACA,UAAO,CAAC,KAAK,EAAE,EAAE,CAAC,GAAG,SAAS,CAAC;IAE1F,IAAA,IAAI,cAAc,EAAE;YAClB,IAAI,cAAc,GAAG,uBAAuB,EAAE;gBAC5C,cAAc;IACZ,gBAAAC,YAAM,CAAC,IAAI,CACT,qDAAA,GAAsD,cAAc,GAAA,GAAG,EACvE,kDAAA,GAAmD,uBAAuB,GAAA,aAAa,EACvF,+EAA+E,CAChF,CAAC;IACL,SAAA;YACDC,iBAAU,CAAC,SAAS,EAAE,EAAE,OAAO,EAAE,cAAc,EAAE,CAAC,CAAC;IACpD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E3B,IAAA,IAAI,YAAY,GAAG,KAAK,IAAI,KAAK,CAAC,UAAU,CAAC;IAC7C,IAAA,OAAO,YAAY,EAAE;IACnB,QAAA,IAAM,IAAI,GAAG,YAAY,IAAI,YAAY,CAAC,WAAW,IAAI,YAAY,CAAC,WAAW,CAAC,IAAI,CAAC;IACvF,QAAA,IAAI,IAAI,KAAK,IAAI,IAAI,IAAI,KAAK,SAAS,EAAE;gBACvC,MAAM;IACP,SAAA;IAED,QAAA,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;IACjB,QAAA,YAAY,GAAG,YAAY,CAAC,UAAU,CAAC;IACxC,KAAA;IAED,IAAA,IAAM,QAAQ,GAAG,KAAK,CAAC,MAAM,CAAC,UAAA,IAAI,EAAA,EAAI,OAAA,IAAI,CAAA,EAAA,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;QACtD,OAAO,QAAQ,GAAG,GAAA,GAAI,QAAQ,GAAA,GAAG,GAAG,GAAG,CAAC;IAC1C;;IClcA;;IAEG;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
@@ -1,2 +1,2 @@
1
- !function(r,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("@sentry/browser"),require("@angular/core"),require("@sentry/core"),require("@sentry/utils"),require("@angular/common/http"),require("@angular/router"),require("rxjs"),require("rxjs/operators")):"function"==typeof define&&define.amd?define("@sentry/angular",["exports","@sentry/browser","@angular/core","@sentry/core","@sentry/utils","@angular/common/http","@angular/router","rxjs","rxjs/operators"],t):t(((r="undefined"!=typeof globalThis?globalThis:r||self).sentry=r.sentry||{},r.sentry.angular={}),r.Sentry,r.ng.core,r.Sentry.core,r.Sentry.util,r.ng.common.http,r.ng.router,r.rxjs,r.rxjs.operators)}(this,(function(r,t,n,e,o,i,a,u,s){"use strict";function c(r){if(r&&r.__esModule)return r;var t=Object.create(null);return r&&Object.keys(r).forEach((function(n){if("default"!==n){var e=Object.getOwnPropertyDescriptor(r,n);Object.defineProperty(t,n,e.get?e:{enumerable:!0,get:function(){return r[n]}})}})),t.default=r,Object.freeze(t)}var g=c(t),p=c(n),l=c(a),f="undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__;var d="undefined"!=typeof Zone&&!!Zone.current;function v(r){return d?Zone.root.run(r):r()}function h(r){if(r instanceof Error)return!0;if(null===r||"object"!=typeof r)return!1;var t=r;return o.isString(t.name)&&o.isString(t.message)&&(void 0===t.stack||o.isString(t.stack))}var _=function(){function r(r){this._registeredAfterSendEventHandler=!1,this._options=Object.assign({logErrors:!0},r)}return r.prototype.handleError=function(r){var t=this,n=this._extractError(r)||"Handled unknown error",e=v((function(){return g.captureException(n,{mechanism:{type:"angular",handled:!1}})}));if(this._options.logErrors&&console.error(n),this._options.showDialog){var o=g.getClient();o&&o.on&&!this._registeredAfterSendEventHandler?(o.on("afterSendEvent",(function(r){r.type||g.showReportDialog(Object.assign(Object.assign({},t._options.dialogOptions),{eventId:r.event_id}))})),this._registeredAfterSendEventHandler=!0):o&&o.on||g.showReportDialog(Object.assign(Object.assign({},this._options.dialogOptions),{eventId:e}))}},r.prototype._extractError=function(r){if(this._options.extractor){var t=this._defaultExtractor.bind(this);return this._options.extractor(r,t)}return this._defaultExtractor(r)},r.prototype._defaultExtractor=function(r){var t=function(r){return r&&r.ngOriginalError?r.ngOriginalError:r}(r);return t instanceof i.HttpErrorResponse?function(r){return h(r.error)?r.error:r.error instanceof ErrorEvent&&r.error.message?r.error.message:"string"==typeof r.error?"Server returned code "+r.status+' with body "'+r.error+'"':r.message}(t):"string"==typeof t||h(t)?t:null},r}();_.ɵprov=p.ɵɵdefineInjectable({factory:function(){return new _(p.ɵɵinject("errorHandlerOptions"))},token:_,providedIn:"root"}),_.decorators=[{type:n.Injectable,args:[{providedIn:"root"}]}],_.ctorParameters=function(){return[{type:void 0,decorators:[{type:n.Inject,args:["errorHandlerOptions"]}]}]};var y,S,E,T="ui.angular.routing",b="ui.angular.init",m=!1;function I(r,n,o){var i;void 0===n&&(n=!0),void 0===o&&(o=!0),y=!0,S=r,E=o,n&&t.WINDOW&&t.WINDOW.location&&r({name:t.WINDOW.location.pathname,op:"pageload",origin:"auto.pageload.angular",attributes:(i={},i[e.SEMANTIC_ATTRIBUTE_SENTRY_SOURCE]="url",i)})}var O=I;function j(){return t.getCurrentScope().getTransaction()}var N=function(){function r(r){var n=this;this._router=r,this.navStart$=this._router.events.pipe(s.filter((function(r){return r instanceof a.NavigationStart})),s.tap((function(r){var i,a;if(y){n._routingSpan&&(n._routingSpan.end(),n._routingSpan=null);var u=e.getClient(),s=o.stripUrlQueryAndFragment(r.url);if(u&&m)return e.getActiveSpan()||t.startBrowserTracingNavigationSpan(u,{name:s,origin:"auto.navigation.angular",attributes:(i={},i[e.SEMANTIC_ATTRIBUTE_SENTRY_SOURCE]="url",i)}),void(n._routingSpan=e.startInactiveSpan({name:""+r.url,op:T,origin:"auto.ui.angular",tags:Object.assign({"routing.instrumentation":"@sentry/angular",url:s},r.navigationTrigger&&{navigationTrigger:r.navigationTrigger})})||null);var c=j();!c&&E&&(c=S({name:s,op:"navigation",origin:"auto.navigation.angular",attributes:(a={},a[e.SEMANTIC_ATTRIBUTE_SENTRY_SOURCE]="url",a)})),c&&(n._routingSpan=c.startChild({description:""+r.url,op:T,origin:"auto.ui.angular",tags:Object.assign({"routing.instrumentation":"@sentry/angular",url:s},r.navigationTrigger&&{navigationTrigger:r.navigationTrigger})}))}else f&&o.logger.error("Angular integration has tracing enabled, but Tracing integration is not configured")}))),this.resEnd$=this._router.events.pipe(s.filter((function(r){return r instanceof a.ResolveEnd})),s.tap((function(r){var t=function(r){var t=[],n=r&&r.firstChild;for(;n;){var e=n&&n.routeConfig&&n.routeConfig.path;if(null==e)break;t.push(e),n=n.firstChild}var o=t.filter((function(r){return r})).join("/");return o?"/"+o+"/":"/"}(r.state.root),n=j(),o=n&&e.spanToJSON(n).data||{};n&&"url"===o[e.SEMANTIC_ATTRIBUTE_SENTRY_SOURCE]&&(n.updateName(t),n.setAttribute(e.SEMANTIC_ATTRIBUTE_SENTRY_SOURCE,"route"),n.setAttribute(e.SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN,"auto."+e.spanToJSON(n).op+".angular"))}))),this.navEnd$=this._router.events.pipe(s.filter((function(r){return r instanceof a.NavigationEnd||r instanceof a.NavigationCancel||r instanceof a.NavigationError})),s.tap((function(){n._routingSpan&&(v((function(){n._routingSpan.end()})),n._routingSpan=null)}))),this._routingSpan=null,this._subscription=new u.Subscription,this._subscription.add(this.navStart$.subscribe()),this._subscription.add(this.resEnd$.subscribe()),this._subscription.add(this.navEnd$.subscribe())}return r.prototype.ngOnDestroy=function(){this._subscription.unsubscribe()},r}();N.ɵprov=p.ɵɵdefineInjectable({factory:function(){return new N(p.ɵɵinject(l.Router))},token:N,providedIn:"root"}),N.decorators=[{type:n.Injectable,args:[{providedIn:"root"}]}],N.ctorParameters=function(){return[{type:a.Router}]};var R=function(){function r(){}return r.prototype.ngOnInit=function(){this.componentName||(this.componentName="unknown");var r=j();r&&(this._tracingSpan=r.startChild({description:"<"+this.componentName+">",op:b,origin:"auto.ui.angular.trace_directive"}))},r.prototype.ngAfterViewInit=function(){this._tracingSpan&&this._tracingSpan.end()},r}();R.decorators=[{type:n.Directive,args:[{selector:"[trace]"}]}],R.propDecorators={componentName:[{type:n.Input,args:["trace"]}]};var A=function(){};A.decorators=[{type:n.NgModule,args:[{declarations:[R],exports:[R]}]}],r.SentryErrorHandler=_,r.TraceClassDecorator=function(){var r;return function(t){var n=t.prototype.ngOnInit;t.prototype.ngOnInit=function(){for(var e=[],o=0;o<arguments.length;o++)e[o]=arguments[o];var i=j();if(i&&(r=i.startChild({description:"<"+t.name+">",op:b,origin:"auto.ui.angular.trace_class_decorator"})),n)return n.apply(this,e)};var e=t.prototype.ngAfterViewInit;t.prototype.ngAfterViewInit=function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];if(r&&r.end(),e)return e.apply(this,t)}}},r.TraceDirective=R,r.TraceMethodDecorator=function(){return function(r,t,n){var e=n.value;return n.value=function(){for(var n=[],i=0;i<arguments.length;i++)n[i]=arguments[i];var a=o.timestampInSeconds(),u=j();if(u&&u.startChild({description:"<"+r.constructor.name+">",endTimestamp:a,op:"ui.angular."+String(t),origin:"auto.ui.angular.trace_method_decorator",startTimestamp:a}),e)return e.apply(this,n)},n}},r.TraceModule=A,r.TraceService=N,r.browserTracingIntegration=function(r){return void 0===r&&(r={}),!1!==r.instrumentNavigation&&(y=!0,m=!0),t.browserTracingIntegration(Object.assign(Object.assign({},r),{instrumentNavigation:!1}))},r.createErrorHandler=function(r){return new _(r)},r.getActiveTransaction=j,r.init=function(r){var i,a,u=Object.assign({defaultIntegrations:t.getDefaultIntegrations(r).filter((function(r){return"TryCatch"!==r.name}))},r);e.applySdkMetadata(u,"angular"),i=10,(a=n.VERSION&&n.VERSION.major?parseInt(n.VERSION.major,10):void 0)&&(a<i&&f&&o.logger.warn("The Sentry SDK does not officially support Angular "+a+".","This version of the Sentry SDK supports Angular "+i+" and above.","Please consider upgrading your Angular version or downgrading the Sentry SDK."),t.setContext("angular",{version:a})),t.init(u)},r.instrumentAngularRouting=O,r.routingInstrumentation=I,Object.keys(t).forEach((function(n){"default"===n||r.hasOwnProperty(n)||Object.defineProperty(r,n,{enumerable:!0,get:function(){return t[n]}})})),Object.defineProperty(r,"__esModule",{value:!0})}));
1
+ !function(r,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("@sentry/browser"),require("@angular/core"),require("@sentry/core"),require("@sentry/utils"),require("@angular/common/http"),require("@angular/router"),require("rxjs"),require("rxjs/operators")):"function"==typeof define&&define.amd?define("@sentry/angular",["exports","@sentry/browser","@angular/core","@sentry/core","@sentry/utils","@angular/common/http","@angular/router","rxjs","rxjs/operators"],t):t(((r="undefined"!=typeof globalThis?globalThis:r||self).sentry=r.sentry||{},r.sentry.angular={}),r.Sentry,r.ng.core,r.Sentry.core,r.Sentry.util,r.ng.common.http,r.ng.router,r.rxjs,r.rxjs.operators)}(this,(function(r,t,n,e,o,i,a,s,u){"use strict";function g(r){if(r&&r.__esModule)return r;var t=Object.create(null);return r&&Object.keys(r).forEach((function(n){if("default"!==n){var e=Object.getOwnPropertyDescriptor(r,n);Object.defineProperty(t,n,e.get?e:{enumerable:!0,get:function(){return r[n]}})}})),t.default=r,Object.freeze(t)}var c=g(t),p=g(n),l=g(a),f="undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__;var d="undefined"!=typeof Zone&&!!Zone.current;function v(r){return d?Zone.root.run(r):r()}function _(r){if(r instanceof Error)return!0;if(null===r||"object"!=typeof r)return!1;var t=r;return o.isString(t.name)&&o.isString(t.message)&&(void 0===t.stack||o.isString(t.stack))}var h=function(){function r(r){this._registeredAfterSendEventHandler=!1,this._options=Object.assign({logErrors:!0},r)}return r.prototype.handleError=function(r){var t=this,n=this._extractError(r)||"Handled unknown error",e=v((function(){return c.captureException(n,{mechanism:{type:"angular",handled:!1}})}));if(this._options.logErrors&&console.error(n),this._options.showDialog){var o=c.getClient();o&&!this._registeredAfterSendEventHandler?(o.on("afterSendEvent",(function(r){!r.type&&r.event_id&&c.showReportDialog(Object.assign(Object.assign({},t._options.dialogOptions),{eventId:r.event_id}))})),this._registeredAfterSendEventHandler=!0):o||c.showReportDialog(Object.assign(Object.assign({},this._options.dialogOptions),{eventId:e}))}},r.prototype._extractError=function(r){if(this._options.extractor){var t=this._defaultExtractor.bind(this);return this._options.extractor(r,t)}return this._defaultExtractor(r)},r.prototype._defaultExtractor=function(r){var t=function(r){return r&&r.ngOriginalError?r.ngOriginalError:r}(r);return t instanceof i.HttpErrorResponse?function(r){return _(r.error)?r.error:r.error instanceof ErrorEvent&&r.error.message?r.error.message:"string"==typeof r.error?"Server returned code "+r.status+' with body "'+r.error+'"':r.message}(t):"string"==typeof t||_(t)?t:null},r}();h.ɵprov=p.ɵɵdefineInjectable({factory:function(){return new h(p.ɵɵinject("errorHandlerOptions"))},token:h,providedIn:"root"}),h.decorators=[{type:n.Injectable,args:[{providedIn:"root"}]}],h.ctorParameters=function(){return[{type:void 0,decorators:[{type:n.Inject,args:["errorHandlerOptions"]}]}]};var S,T,E,y="ui.angular.routing",b="ui.angular.init",O=!1;function I(r,n,e){var o;void 0===n&&(n=!0),void 0===e&&(e=!0),S=!0,T=r,E=e,n&&t.WINDOW&&t.WINDOW.location&&r({name:t.WINDOW.location.pathname,op:"pageload",origin:"auto.pageload.angular",attributes:(o={},o[t.SEMANTIC_ATTRIBUTE_SENTRY_SOURCE]="url",o)})}var m=I;function N(){return t.getCurrentScope().getTransaction()}var R=function(){function r(r){var n=this;this._router=r,this.navStart$=this._router.events.pipe(u.filter((function(r){return r instanceof a.NavigationStart})),u.tap((function(r){var i,a,s;if(S){n._routingSpan&&(n._routingSpan.end(),n._routingSpan=null);var u=e.getClient(),g=o.stripUrlQueryAndFragment(r.url);if(u&&O)return n._isPageloadOngoing()?n._pageloadOngoing=!1:t.startBrowserTracingNavigationSpan(u,{name:g,attributes:(i={},i[t.SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN]="auto.navigation.angular",i[t.SEMANTIC_ATTRIBUTE_SENTRY_SOURCE]="url",i)}),void(n._routingSpan=e.startInactiveSpan({name:""+r.url,op:y,attributes:Object.assign((a={},a[t.SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN]="auto.ui.angular",a[t.SEMANTIC_ATTRIBUTE_SENTRY_SOURCE]="url",a.url=g,a),r.navigationTrigger&&{navigationTrigger:r.navigationTrigger})})||null);var c=N();!c&&E&&(c=T({name:g,op:"navigation",origin:"auto.navigation.angular",attributes:(s={},s[t.SEMANTIC_ATTRIBUTE_SENTRY_SOURCE]="url",s)})),c&&(n._routingSpan=c.startChild({name:""+r.url,op:y,origin:"auto.ui.angular",attributes:Object.assign({url:g},r.navigationTrigger&&{navigationTrigger:r.navigationTrigger})}))}else f&&o.logger.error("Angular integration has tracing enabled, but Tracing integration is not configured")}))),this.resEnd$=this._router.events.pipe(u.filter((function(r){return r instanceof a.ResolveEnd})),u.tap((function(r){var n=function(r){var t=[],n=r&&r.firstChild;for(;n;){var e=n&&n.routeConfig&&n.routeConfig.path;if(null==e)break;t.push(e),n=n.firstChild}var o=t.filter((function(r){return r})).join("/");return o?"/"+o+"/":"/"}(r.state.root),o=N(),i=o&&e.spanToJSON(o).data||{};o&&"url"===i[t.SEMANTIC_ATTRIBUTE_SENTRY_SOURCE]&&(o.updateName(n),o.setAttribute(t.SEMANTIC_ATTRIBUTE_SENTRY_SOURCE,"route"),o.setAttribute(t.SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN,"auto."+e.spanToJSON(o).op+".angular"))}))),this.navEnd$=this._router.events.pipe(u.filter((function(r){return r instanceof a.NavigationEnd||r instanceof a.NavigationCancel||r instanceof a.NavigationError})),u.tap((function(){n._routingSpan&&(v((function(){n._routingSpan.end()})),n._routingSpan=null)}))),this._routingSpan=null,this._pageloadOngoing=!0,this._subscription=new s.Subscription,this._subscription.add(this.navStart$.subscribe()),this._subscription.add(this.resEnd$.subscribe()),this._subscription.add(this.navEnd$.subscribe())}return r.prototype.ngOnDestroy=function(){this._subscription.unsubscribe()},r.prototype._isPageloadOngoing=function(){if(!this._pageloadOngoing)return!1;var r=e.getActiveSpan();if(!r)return this._pageloadOngoing=!1,!1;var t=e.getRootSpan(r);return t?(this._pageloadOngoing="pageload"===e.spanToJSON(t).op,this._pageloadOngoing):(this._pageloadOngoing=!1,!1)},r}();R.ɵprov=p.ɵɵdefineInjectable({factory:function(){return new R(p.ɵɵinject(l.Router))},token:R,providedIn:"root"}),R.decorators=[{type:n.Injectable,args:[{providedIn:"root"}]}],R.ctorParameters=function(){return[{type:a.Router}]};var j=function(){function r(){}return r.prototype.ngOnInit=function(){this.componentName||(this.componentName="unknown");var r=N();r&&(this._tracingSpan=r.startChild({name:"<"+this.componentName+">",op:b,origin:"auto.ui.angular.trace_directive"}))},r.prototype.ngAfterViewInit=function(){this._tracingSpan&&this._tracingSpan.end()},r}();j.decorators=[{type:n.Directive,args:[{selector:"[trace]"}]}],j.propDecorators={componentName:[{type:n.Input,args:["trace"]}]};var A=function(){};A.decorators=[{type:n.NgModule,args:[{declarations:[j],exports:[j]}]}],r.SentryErrorHandler=h,r.TraceClassDecorator=function(){var r;return function(t){var n=t.prototype.ngOnInit;t.prototype.ngOnInit=function(){for(var e=[],o=0;o<arguments.length;o++)e[o]=arguments[o];var i=N();if(i&&(r=i.startChild({name:"<"+t.name+">",op:b,origin:"auto.ui.angular.trace_class_decorator"})),n)return n.apply(this,e)};var e=t.prototype.ngAfterViewInit;t.prototype.ngAfterViewInit=function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];if(r&&r.end(),e)return e.apply(this,t)}}},r.TraceDirective=j,r.TraceMethodDecorator=function(){return function(r,t,n){var e=n.value;return n.value=function(){for(var n=[],i=0;i<arguments.length;i++)n[i]=arguments[i];var a=o.timestampInSeconds(),s=N();if(s&&s.startChild({name:"<"+r.constructor.name+">",endTimestamp:a,op:"ui.angular."+String(t),origin:"auto.ui.angular.trace_method_decorator",startTimestamp:a}),e)return e.apply(this,n)},n}},r.TraceModule=A,r.TraceService=R,r.browserTracingIntegration=function(r){return void 0===r&&(r={}),!1!==r.instrumentNavigation&&(S=!0,O=!0),t.browserTracingIntegration(Object.assign(Object.assign({},r),{instrumentNavigation:!1}))},r.createErrorHandler=function(r){return new h(r)},r.getActiveTransaction=N,r.init=function(r){var i,a,s=Object.assign({defaultIntegrations:t.getDefaultIntegrations(r).filter((function(r){return"BrowserApiErrors"!==r.name}))},r);e.applySdkMetadata(s,"angular"),i=10,(a=n.VERSION&&n.VERSION.major?parseInt(n.VERSION.major,10):void 0)&&(a<i&&f&&o.logger.warn("The Sentry SDK does not officially support Angular "+a+".","This version of the Sentry SDK supports Angular "+i+" and above.","Please consider upgrading your Angular version or downgrading the Sentry SDK."),t.setContext("angular",{version:a})),t.init(s)},r.instrumentAngularRouting=m,r.routingInstrumentation=I,Object.keys(t).forEach((function(n){"default"===n||r.hasOwnProperty(n)||Object.defineProperty(r,n,{enumerable:!0,get:function(){return t[n]}})})),Object.defineProperty(r,"__esModule",{value:!0})}));
2
2
  //# sourceMappingURL=sentry-angular.umd.min.js.map