@sentry/angular 8.11.0 → 8.12.0
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.
package/esm2020/sdk.mjs
CHANGED
|
@@ -36,7 +36,7 @@ export function init(options) {
|
|
|
36
36
|
};
|
|
37
37
|
applySdkMetadata(opts, 'angular');
|
|
38
38
|
checkAndSetAngularVersion();
|
|
39
|
-
browserInit(opts);
|
|
39
|
+
return browserInit(opts);
|
|
40
40
|
}
|
|
41
41
|
function checkAndSetAngularVersion() {
|
|
42
42
|
const ANGULAR_MINIMUM_VERSION = 14;
|
|
@@ -49,4 +49,4 @@ function checkAndSetAngularVersion() {
|
|
|
49
49
|
setContext('angular', { version: angularVersion });
|
|
50
50
|
}
|
|
51
51
|
}
|
|
52
|
-
//# sourceMappingURL=data:application/json;base64,
|
|
52
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoic2RrLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vc3JjL3Nkay50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSxPQUFPLEVBQUUsT0FBTyxFQUFFLE1BQU0sZUFBZSxDQUFDO0FBRXhDLE9BQU8sRUFDTCxzQkFBc0IsRUFDdEIseUJBQXlCLEVBQ3pCLHNCQUFzQixFQUN0Qix1QkFBdUIsR0FDeEIsTUFBTSxpQkFBaUIsQ0FBQztBQUN6QixPQUFPLEVBQUUsSUFBSSxJQUFJLFdBQVcsRUFBRSxVQUFVLEVBQUUsTUFBTSxpQkFBaUIsQ0FBQztBQUNsRSxPQUFPLEVBQ0wsZ0JBQWdCLEVBQ2hCLGlCQUFpQixFQUNqQiwyQkFBMkIsRUFDM0IseUJBQXlCLEdBQzFCLE1BQU0sY0FBYyxDQUFDO0FBRXRCLE9BQU8sRUFBRSxNQUFNLEVBQUUsTUFBTSxlQUFlLENBQUM7QUFFdkMsT0FBTyxFQUF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bmQgYWJvdmUuYCxcbiAgICAgICAgICBcIklmIHlvdSdyZSB1c2luZyBsb3dlciBBbmd1bGFyIHZlcnNpb25zLCBjaGVjayB0aGUgQW5ndWxhciBWZXJzaW9uIENvbXBhdGliaWxpdHkgdGFibGUgaW4gb3VyIGRvY3M6IGh0dHBzOi8vZG9jcy5zZW50cnkuaW8vcGxhdGZvcm1zL2phdmFzY3JpcHQvZ3VpZGVzL2FuZ3VsYXIvI2FuZ3VsYXItdmVyc2lvbi1jb21wYXRpYmlsaXR5LlwiLFxuICAgICAgICAgICdPdGhlcndpc2UsIHBsZWFzZSBjb25zaWRlciB1cGdyYWRpbmcgeW91ciBBbmd1bGFyIHZlcnNpb24uJyxcbiAgICAgICAgKTtcbiAgICB9XG4gICAgc2V0Q29udGV4dCgnYW5ndWxhcicsIHsgdmVyc2lvbjogYW5ndWxhclZlcnNpb24gfSk7XG4gIH1cbn1cbiJdfQ==
|
|
@@ -51,7 +51,7 @@ function init(options) {
|
|
|
51
51
|
const opts = Object.assign({ defaultIntegrations: getDefaultIntegrations() }, options);
|
|
52
52
|
applySdkMetadata(opts, 'angular');
|
|
53
53
|
checkAndSetAngularVersion();
|
|
54
|
-
init$1(opts);
|
|
54
|
+
return init$1(opts);
|
|
55
55
|
}
|
|
56
56
|
function checkAndSetAngularVersion() {
|
|
57
57
|
const ANGULAR_MINIMUM_VERSION = 14;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sentry-angular.mjs","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 {\n breadcrumbsIntegration,\n globalHandlersIntegration,\n httpContextIntegration,\n linkedErrorsIntegration,\n} from '@sentry/browser';\nimport { init as browserInit, setContext } from '@sentry/browser';\nimport {\n applySdkMetadata,\n dedupeIntegration,\n functionToStringIntegration,\n inboundFiltersIntegration,\n} from '@sentry/core';\nimport type { Integration } from '@sentry/types';\nimport { logger } from '@sentry/utils';\n\nimport { IS_DEBUG_BUILD } from './flags';\n\n/**\n * Get the default integrations for the Angular SDK.\n */\nexport function getDefaultIntegrations(): Integration[] {\n // Don't include the BrowserApiErrors integration as it interferes with the Angular SDK's `ErrorHandler`:\n // BrowserApiErrors would catch certain errors before they reach the `ErrorHandler` and\n // thus provide a lower fidelity error than what `SentryErrorHandler`\n // (see errorhandler.ts) would provide.\n //\n // see:\n // - https://github.com/getsentry/sentry-javascript/issues/5417#issuecomment-1453407097\n // - https://github.com/getsentry/sentry-javascript/issues/2744\n return [\n inboundFiltersIntegration(),\n functionToStringIntegration(),\n breadcrumbsIntegration(),\n globalHandlersIntegration(),\n linkedErrorsIntegration(),\n dedupeIntegration(),\n httpContextIntegration(),\n ];\n}\n\n/**\n * Inits the Angular SDK\n */\nexport function init(options: BrowserOptions): void {\n const opts = {\n defaultIntegrations: getDefaultIntegrations(),\n ...options,\n };\n\n applySdkMetadata(opts, 'angular');\n\n checkAndSetAngularVersion();\n browserInit(opts);\n}\n\nfunction checkAndSetAngularVersion(): void {\n const ANGULAR_MINIMUM_VERSION = 14;\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 `This Sentry SDK does not officially support Angular ${angularVersion}.`,\n `This SDK only supports Angular ${ANGULAR_MINIMUM_VERSION} and above.`,\n \"If you're using lower Angular versions, check the Angular Version Compatibility table in our docs: https://docs.sentry.io/platforms/javascript/guides/angular/#angular-version-compatibility.\",\n 'Otherwise, please consider upgrading your Angular version.',\n );\n }\n setContext('angular', { version: angularVersion });\n }\n}\n","// This would be exposed in the global environment whenever `zone.js` is\n// included in the `polyfills` configuration property. Starting from Angular 17,\n// users can opt-in to use zoneless change detection.\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\ndeclare const Zone: any;\n\n// In Angular 17 and future versions, zoneless support is forthcoming.\n// Therefore, it's advisable to safely check whether the `run` function is\n// available in the `<root>` context.\n// eslint-disable-next-line @typescript-eslint/no-unsafe-member-access\nconst isNgZoneEnabled = typeof Zone !== 'undefined' && Zone.root && Zone.root.run;\n\n/**\n * The function that does the same job as `NgZone.runOutsideAngular`.\n *\n * ⚠️ Note: All of the Sentry functionality called from inside the Angular\n * execution context must be wrapped in this function. Angular's rendering\n * relies on asynchronous tasks being scheduled within its execution context.\n * Since Sentry schedules tasks that do not interact with Angular's rendering,\n * it may prevent Angular from functioning reliably. Consequently, it may disrupt\n * processes such as server-side rendering or client-side hydration.\n */\nexport function runOutsideAngular<T>(callback: () => T): T {\n // Running the `callback` within the root execution context enables Angular\n // processes (such as SSR and hydration) to continue functioning normally without\n // timeouts and delays that could affect the user experience. This approach is\n // necessary because some of the Sentry functionality continues to run in the background.\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?: ReportDialogOptions;\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 runOutsideAngular(() => {\n Sentry.showReportDialog({ ...this._options.dialogOptions, eventId: event.event_id! });\n });\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 runOutsideAngular(() => {\n Sentry.showReportDialog({ ...this._options.dialogOptions, eventId });\n });\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","import 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 browserTracingIntegration as originalBrowserTracingIntegration,\n getActiveSpan,\n getClient,\n getCurrentScope,\n getRootSpan,\n spanToJSON,\n startBrowserTracingNavigationSpan,\n startInactiveSpan,\n} from '@sentry/browser';\nimport type { Integration, Span } 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;\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 }\n\n return originalBrowserTracingIntegration({\n ...options,\n instrumentNavigation: false,\n });\n}\n\n/**\n * This function is extracted to make unit testing easier.\n */\nexport function _updateSpanAttributesForParametrizedUrl(route: string, span?: Span): void {\n const attributes = (span && spanToJSON(span).data) || {};\n\n if (span && attributes[SEMANTIC_ATTRIBUTE_SENTRY_SOURCE] === 'url') {\n span.updateName(route);\n span.setAttribute(SEMANTIC_ATTRIBUTE_SENTRY_SOURCE, 'route');\n span.setAttribute(SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN, `auto.${spanToJSON(span).op}.angular`);\n }\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) {\n // see comment in `_isPageloadOngoing` for rationale\n if (!this._isPageloadOngoing()) {\n runOutsideAngular(() => {\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 });\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 runOutsideAngular(() =>\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 }),\n ) || null;\n\n return;\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 if (route) {\n getCurrentScope().setTransactionName(route);\n }\n\n const activeSpan = getActiveSpan();\n const rootSpan = activeSpan && getRootSpan(activeSpan);\n\n _updateSpanAttributesForParametrizedUrl(route, rootSpan);\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 * don'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\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 if (getActiveSpan()) {\n this._tracingSpan = runOutsideAngular(() =>\n startInactiveSpan({\n name: `<${this.componentName}>`,\n op: ANGULAR_INIT_OP,\n attributes: { [SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN]: 'auto.ui.angular.trace_directive' },\n }),\n );\n }\n }\n\n /**\n * Implementation of AfterViewInit lifecycle method\n * @inheritdoc\n */\n public ngAfterViewInit(): void {\n if (this._tracingSpan) {\n runOutsideAngular(() => 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\ninterface TraceClassOptions {\n /**\n * Name of the class\n */\n name?: string;\n}\n\n/**\n * Decorator function that can be used to capture initialization lifecycle of the whole component.\n */\nexport function TraceClass(options?: TraceClassOptions): ClassDecorator {\n let tracingSpan: Span;\n\n /* eslint-disable @typescript-eslint/no-unsafe-member-access */\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 tracingSpan = runOutsideAngular(() =>\n startInactiveSpan({\n onlyIfParent: true,\n name: `<${options && options.name ? options.name : 'unnamed'}>`,\n op: ANGULAR_INIT_OP,\n attributes: {\n [SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN]: 'auto.ui.angular.trace_class_decorator',\n },\n }),\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 runOutsideAngular(() => 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\ninterface TraceMethodOptions {\n /**\n * Name of the method (is added to the tracing span)\n */\n name?: string;\n}\n\n/**\n * Decorator function that can be used to capture a single lifecycle methods of the component.\n */\nexport function TraceMethod(options?: TraceMethodOptions): MethodDecorator {\n // eslint-disable-next-line @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\n runOutsideAngular(() => {\n startInactiveSpan({\n onlyIfParent: true,\n name: `<${options && options.name ? options.name : 'unnamed'}>`,\n op: `${ANGULAR_OP}.${String(propertyKey)}`,\n startTime: now,\n attributes: {\n [SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN]: 'auto.ui.angular.trace_method_decorator',\n },\n }).end(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":["browserInit","originalBrowserTracingIntegration"],"mappings":";;;;;;;;;;;;;AAAA;;;;;;;AAOG;AAIH;AACO,MAAM,cAAc,GAAG,OAAO,gBAAgB,KAAK,WAAW,GAAG,IAAI,GAAG,gBAAgB;;ACQ/F;;AAEG;SACa,sBAAsB,GAAA;;;;;;;;;IASp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IAAI,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;IACtD,OAAO,QAAQ,GAAG,CAAA,CAAA,EAAI,QAAQ,CAAA,CAAA,CAAG,GAAG,GAAG,CAAC;AAC1C;;AChZA;;AAEG;;;;"}
|
|
1
|
+
{"version":3,"file":"sentry-angular.mjs","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 {\n breadcrumbsIntegration,\n globalHandlersIntegration,\n httpContextIntegration,\n linkedErrorsIntegration,\n} from '@sentry/browser';\nimport { init as browserInit, setContext } from '@sentry/browser';\nimport {\n applySdkMetadata,\n dedupeIntegration,\n functionToStringIntegration,\n inboundFiltersIntegration,\n} from '@sentry/core';\nimport type { Client, Integration } from '@sentry/types';\nimport { logger } from '@sentry/utils';\n\nimport { IS_DEBUG_BUILD } from './flags';\n\n/**\n * Get the default integrations for the Angular SDK.\n */\nexport function getDefaultIntegrations(): Integration[] {\n // Don't include the BrowserApiErrors integration as it interferes with the Angular SDK's `ErrorHandler`:\n // BrowserApiErrors would catch certain errors before they reach the `ErrorHandler` and\n // thus provide a lower fidelity error than what `SentryErrorHandler`\n // (see errorhandler.ts) would provide.\n //\n // see:\n // - https://github.com/getsentry/sentry-javascript/issues/5417#issuecomment-1453407097\n // - https://github.com/getsentry/sentry-javascript/issues/2744\n return [\n inboundFiltersIntegration(),\n functionToStringIntegration(),\n breadcrumbsIntegration(),\n globalHandlersIntegration(),\n linkedErrorsIntegration(),\n dedupeIntegration(),\n httpContextIntegration(),\n ];\n}\n\n/**\n * Inits the Angular SDK\n */\nexport function init(options: BrowserOptions): Client | undefined {\n const opts = {\n defaultIntegrations: getDefaultIntegrations(),\n ...options,\n };\n\n applySdkMetadata(opts, 'angular');\n\n checkAndSetAngularVersion();\n return browserInit(opts);\n}\n\nfunction checkAndSetAngularVersion(): void {\n const ANGULAR_MINIMUM_VERSION = 14;\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 `This Sentry SDK does not officially support Angular ${angularVersion}.`,\n `This SDK only supports Angular ${ANGULAR_MINIMUM_VERSION} and above.`,\n \"If you're using lower Angular versions, check the Angular Version Compatibility table in our docs: https://docs.sentry.io/platforms/javascript/guides/angular/#angular-version-compatibility.\",\n 'Otherwise, please consider upgrading your Angular version.',\n );\n }\n setContext('angular', { version: angularVersion });\n }\n}\n","// This would be exposed in the global environment whenever `zone.js` is\n// included in the `polyfills` configuration property. Starting from Angular 17,\n// users can opt-in to use zoneless change detection.\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\ndeclare const Zone: any;\n\n// In Angular 17 and future versions, zoneless support is forthcoming.\n// Therefore, it's advisable to safely check whether the `run` function is\n// available in the `<root>` context.\n// eslint-disable-next-line @typescript-eslint/no-unsafe-member-access\nconst isNgZoneEnabled = typeof Zone !== 'undefined' && Zone.root && Zone.root.run;\n\n/**\n * The function that does the same job as `NgZone.runOutsideAngular`.\n *\n * ⚠️ Note: All of the Sentry functionality called from inside the Angular\n * execution context must be wrapped in this function. Angular's rendering\n * relies on asynchronous tasks being scheduled within its execution context.\n * Since Sentry schedules tasks that do not interact with Angular's rendering,\n * it may prevent Angular from functioning reliably. Consequently, it may disrupt\n * processes such as server-side rendering or client-side hydration.\n */\nexport function runOutsideAngular<T>(callback: () => T): T {\n // Running the `callback` within the root execution context enables Angular\n // processes (such as SSR and hydration) to continue functioning normally without\n // timeouts and delays that could affect the user experience. This approach is\n // necessary because some of the Sentry functionality continues to run in the background.\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?: ReportDialogOptions;\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 runOutsideAngular(() => {\n Sentry.showReportDialog({ ...this._options.dialogOptions, eventId: event.event_id! });\n });\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 runOutsideAngular(() => {\n Sentry.showReportDialog({ ...this._options.dialogOptions, eventId });\n });\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","import 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 browserTracingIntegration as originalBrowserTracingIntegration,\n getActiveSpan,\n getClient,\n getCurrentScope,\n getRootSpan,\n spanToJSON,\n startBrowserTracingNavigationSpan,\n startInactiveSpan,\n} from '@sentry/browser';\nimport type { Integration, Span } 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;\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 }\n\n return originalBrowserTracingIntegration({\n ...options,\n instrumentNavigation: false,\n });\n}\n\n/**\n * This function is extracted to make unit testing easier.\n */\nexport function _updateSpanAttributesForParametrizedUrl(route: string, span?: Span): void {\n const attributes = (span && spanToJSON(span).data) || {};\n\n if (span && attributes[SEMANTIC_ATTRIBUTE_SENTRY_SOURCE] === 'url') {\n span.updateName(route);\n span.setAttribute(SEMANTIC_ATTRIBUTE_SENTRY_SOURCE, 'route');\n span.setAttribute(SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN, `auto.${spanToJSON(span).op}.angular`);\n }\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) {\n // see comment in `_isPageloadOngoing` for rationale\n if (!this._isPageloadOngoing()) {\n runOutsideAngular(() => {\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 });\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 runOutsideAngular(() =>\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 }),\n ) || null;\n\n return;\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 if (route) {\n getCurrentScope().setTransactionName(route);\n }\n\n const activeSpan = getActiveSpan();\n const rootSpan = activeSpan && getRootSpan(activeSpan);\n\n _updateSpanAttributesForParametrizedUrl(route, rootSpan);\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 * don'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\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 if (getActiveSpan()) {\n this._tracingSpan = runOutsideAngular(() =>\n startInactiveSpan({\n name: `<${this.componentName}>`,\n op: ANGULAR_INIT_OP,\n attributes: { [SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN]: 'auto.ui.angular.trace_directive' },\n }),\n );\n }\n }\n\n /**\n * Implementation of AfterViewInit lifecycle method\n * @inheritdoc\n */\n public ngAfterViewInit(): void {\n if (this._tracingSpan) {\n runOutsideAngular(() => 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\ninterface TraceClassOptions {\n /**\n * Name of the class\n */\n name?: string;\n}\n\n/**\n * Decorator function that can be used to capture initialization lifecycle of the whole component.\n */\nexport function TraceClass(options?: TraceClassOptions): ClassDecorator {\n let tracingSpan: Span;\n\n /* eslint-disable @typescript-eslint/no-unsafe-member-access */\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 tracingSpan = runOutsideAngular(() =>\n startInactiveSpan({\n onlyIfParent: true,\n name: `<${options && options.name ? options.name : 'unnamed'}>`,\n op: ANGULAR_INIT_OP,\n attributes: {\n [SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN]: 'auto.ui.angular.trace_class_decorator',\n },\n }),\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 runOutsideAngular(() => 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\ninterface TraceMethodOptions {\n /**\n * Name of the method (is added to the tracing span)\n */\n name?: string;\n}\n\n/**\n * Decorator function that can be used to capture a single lifecycle methods of the component.\n */\nexport function TraceMethod(options?: TraceMethodOptions): MethodDecorator {\n // eslint-disable-next-line @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\n runOutsideAngular(() => {\n startInactiveSpan({\n onlyIfParent: true,\n name: `<${options && options.name ? options.name : 'unnamed'}>`,\n op: `${ANGULAR_OP}.${String(propertyKey)}`,\n startTime: now,\n attributes: {\n [SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN]: 'auto.ui.angular.trace_method_decorator',\n },\n }).end(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":["browserInit","originalBrowserTracingIntegration"],"mappings":";;;;;;;;;;;;;AAAA;;;;;;;AAOG;AAIH;AACO,MAAM,cAAc,GAAG,OAAO,gBAAgB,KAAK,WAAW,GAAG,IAAI,GAAG,gBAAgB;;ACQ/F;;AAEG;SACa,sBAAsB,GAAA;;;;;;;;;IASpC,OAAO;AACL,QAAA,yBAAyB,EAAE;AAC3B,QAAA,2BAA2B,EAAE;AAC7B,QAAA,sBAAsB,EAAE;AACxB,QAAA,yBAAyB,EAAE;AAC3B,QAAA,uBAAuB,EAAE;AACzB,QAAA,iBAAiB,EAAE;AACnB,QAAA,sBAAsB,EAAE;KACzB,CAAC;AACJ,CAAC;AAED;;AAEG;AACG,SAAU,IAAI,CAAC,OAAuB,EAAA;IAC1C,MAAM,IAAI,mBACR,mBAAmB,EAAE,sBAAsB,EAAE,EAAA,EAC1C,OAAO,CACX,CAAC;AAEF,IAAA,gBAAgB,CAAC,IAAI,EAAE,SAAS,CAAC,CAAC;AAElC,IAAA,yBAAyB,EAAE,CAAC;AAC5B,IAAA,OAAOA,MAAW,CAAC,IAAI,CAAC,CAAC;AAC3B,CAAC;AAED,SAAS,yBAAyB,GAAA;IAChC,MAAM,uBAAuB,GAAG,EAAE,CAAC;IAEnC,MAAM,cAAc,GAAG,OAAO,IAAI,OAAO,CAAC,KAAK,GAAG,QAAQ,CAAC,OAAO,CAAC,KAAK,EAAE,EAAE,CAAC,GAAG,SAAS,CAAC;AAE1F,I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SAAU,iCAAiC,CAAC,KAAqC,EAAA;IACrF,MAAM,KAAK,GAAa,EAAE,CAAC;AAE3B,IAAA,IAAI,YAAY,GAAG,KAAK,IAAI,KAAK,CAAC,UAAU,CAAC;AAC7C,IAAA,OAAO,YAAY,EAAE;AACnB,QAAA,MAAM,IAAI,GAAG,YAAY,IAAI,YAAY,CAAC,WAAW,IAAI,YAAY,CAAC,WAAW,CAAC,IAAI,CAAC;AACvF,QAAA,IAAI,IAAI,KAAK,IAAI,IAAI,IAAI,KAAK,SAAS,EAAE;YACvC,MAAM;AACP,SAAA;AAED,QAAA,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;AACjB,QAAA,YAAY,GAAG,YAAY,CAAC,UAAU,CAAC;AACxC,KAAA;AAED,IAAA,MAAM,QAAQ,GAAG,KAAK,CAAC,MAAM,CAAC,IAAI,IAAI,IAAI,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;IACtD,OAAO,QAAQ,GAAG,CAAA,CAAA,EAAI,QAAQ,CAAA,CAAA,CAAG,GAAG,GAAG,CAAC;AAC1C;;AChZA;;AAEG;;;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sentry-angular.mjs","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 {\n breadcrumbsIntegration,\n globalHandlersIntegration,\n httpContextIntegration,\n linkedErrorsIntegration,\n} from '@sentry/browser';\nimport { init as browserInit, setContext } from '@sentry/browser';\nimport {\n applySdkMetadata,\n dedupeIntegration,\n functionToStringIntegration,\n inboundFiltersIntegration,\n} from '@sentry/core';\nimport type { Integration } from '@sentry/types';\nimport { logger } from '@sentry/utils';\n\nimport { IS_DEBUG_BUILD } from './flags';\n\n/**\n * Get the default integrations for the Angular SDK.\n */\nexport function getDefaultIntegrations(): Integration[] {\n // Don't include the BrowserApiErrors integration as it interferes with the Angular SDK's `ErrorHandler`:\n // BrowserApiErrors would catch certain errors before they reach the `ErrorHandler` and\n // thus provide a lower fidelity error than what `SentryErrorHandler`\n // (see errorhandler.ts) would provide.\n //\n // see:\n // - https://github.com/getsentry/sentry-javascript/issues/5417#issuecomment-1453407097\n // - https://github.com/getsentry/sentry-javascript/issues/2744\n return [\n inboundFiltersIntegration(),\n functionToStringIntegration(),\n breadcrumbsIntegration(),\n globalHandlersIntegration(),\n linkedErrorsIntegration(),\n dedupeIntegration(),\n httpContextIntegration(),\n ];\n}\n\n/**\n * Inits the Angular SDK\n */\nexport function init(options: BrowserOptions): void {\n const opts = {\n defaultIntegrations: getDefaultIntegrations(),\n ...options,\n };\n\n applySdkMetadata(opts, 'angular');\n\n checkAndSetAngularVersion();\n browserInit(opts);\n}\n\nfunction checkAndSetAngularVersion(): void {\n const ANGULAR_MINIMUM_VERSION = 14;\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 `This Sentry SDK does not officially support Angular ${angularVersion}.`,\n `This SDK only supports Angular ${ANGULAR_MINIMUM_VERSION} and above.`,\n \"If you're using lower Angular versions, check the Angular Version Compatibility table in our docs: https://docs.sentry.io/platforms/javascript/guides/angular/#angular-version-compatibility.\",\n 'Otherwise, please consider upgrading your Angular version.',\n );\n }\n setContext('angular', { version: angularVersion });\n }\n}\n","// This would be exposed in the global environment whenever `zone.js` is\n// included in the `polyfills` configuration property. Starting from Angular 17,\n// users can opt-in to use zoneless change detection.\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\ndeclare const Zone: any;\n\n// In Angular 17 and future versions, zoneless support is forthcoming.\n// Therefore, it's advisable to safely check whether the `run` function is\n// available in the `<root>` context.\n// eslint-disable-next-line @typescript-eslint/no-unsafe-member-access\nconst isNgZoneEnabled = typeof Zone !== 'undefined' && Zone.root && Zone.root.run;\n\n/**\n * The function that does the same job as `NgZone.runOutsideAngular`.\n *\n * ⚠️ Note: All of the Sentry functionality called from inside the Angular\n * execution context must be wrapped in this function. Angular's rendering\n * relies on asynchronous tasks being scheduled within its execution context.\n * Since Sentry schedules tasks that do not interact with Angular's rendering,\n * it may prevent Angular from functioning reliably. Consequently, it may disrupt\n * processes such as server-side rendering or client-side hydration.\n */\nexport function runOutsideAngular<T>(callback: () => T): T {\n // Running the `callback` within the root execution context enables Angular\n // processes (such as SSR and hydration) to continue functioning normally without\n // timeouts and delays that could affect the user experience. This approach is\n // necessary because some of the Sentry functionality continues to run in the background.\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?: ReportDialogOptions;\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 runOutsideAngular(() => {\n Sentry.showReportDialog({ ...this._options.dialogOptions, eventId: event.event_id! });\n });\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 runOutsideAngular(() => {\n Sentry.showReportDialog({ ...this._options.dialogOptions, eventId });\n });\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","import 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 browserTracingIntegration as originalBrowserTracingIntegration,\n getActiveSpan,\n getClient,\n getCurrentScope,\n getRootSpan,\n spanToJSON,\n startBrowserTracingNavigationSpan,\n startInactiveSpan,\n} from '@sentry/browser';\nimport type { Integration, Span } 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;\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 }\n\n return originalBrowserTracingIntegration({\n ...options,\n instrumentNavigation: false,\n });\n}\n\n/**\n * This function is extracted to make unit testing easier.\n */\nexport function _updateSpanAttributesForParametrizedUrl(route: string, span?: Span): void {\n const attributes = (span && spanToJSON(span).data) || {};\n\n if (span && attributes[SEMANTIC_ATTRIBUTE_SENTRY_SOURCE] === 'url') {\n span.updateName(route);\n span.setAttribute(SEMANTIC_ATTRIBUTE_SENTRY_SOURCE, 'route');\n span.setAttribute(SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN, `auto.${spanToJSON(span).op}.angular`);\n }\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) {\n // see comment in `_isPageloadOngoing` for rationale\n if (!this._isPageloadOngoing()) {\n runOutsideAngular(() => {\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 });\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 runOutsideAngular(() =>\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 }),\n ) || null;\n\n return;\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 if (route) {\n getCurrentScope().setTransactionName(route);\n }\n\n const activeSpan = getActiveSpan();\n const rootSpan = activeSpan && getRootSpan(activeSpan);\n\n _updateSpanAttributesForParametrizedUrl(route, rootSpan);\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 * don'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\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 if (getActiveSpan()) {\n this._tracingSpan = runOutsideAngular(() =>\n startInactiveSpan({\n name: `<${this.componentName}>`,\n op: ANGULAR_INIT_OP,\n attributes: { [SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN]: 'auto.ui.angular.trace_directive' },\n }),\n );\n }\n }\n\n /**\n * Implementation of AfterViewInit lifecycle method\n * @inheritdoc\n */\n public ngAfterViewInit(): void {\n if (this._tracingSpan) {\n runOutsideAngular(() => 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\ninterface TraceClassOptions {\n /**\n * Name of the class\n */\n name?: string;\n}\n\n/**\n * Decorator function that can be used to capture initialization lifecycle of the whole component.\n */\nexport function TraceClass(options?: TraceClassOptions): ClassDecorator {\n let tracingSpan: Span;\n\n /* eslint-disable @typescript-eslint/no-unsafe-member-access */\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 tracingSpan = runOutsideAngular(() =>\n startInactiveSpan({\n onlyIfParent: true,\n name: `<${options && options.name ? options.name : 'unnamed'}>`,\n op: ANGULAR_INIT_OP,\n attributes: {\n [SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN]: 'auto.ui.angular.trace_class_decorator',\n },\n }),\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 runOutsideAngular(() => 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\ninterface TraceMethodOptions {\n /**\n * Name of the method (is added to the tracing span)\n */\n name?: string;\n}\n\n/**\n * Decorator function that can be used to capture a single lifecycle methods of the component.\n */\nexport function TraceMethod(options?: TraceMethodOptions): MethodDecorator {\n // eslint-disable-next-line @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\n runOutsideAngular(() => {\n startInactiveSpan({\n onlyIfParent: true,\n name: `<${options && options.name ? options.name : 'unnamed'}>`,\n op: `${ANGULAR_OP}.${String(propertyKey)}`,\n startTime: now,\n attributes: {\n [SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN]: 'auto.ui.angular.trace_method_decorator',\n },\n }).end(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":["browserInit","originalBrowserTracingIntegration"],"mappings":";;;;;;;;;;;;;AAAA;;;;;;;AAOG;AAIH;AACO,MAAM,cAAc,GAAG,OAAO,gBAAgB,KAAK,WAAW,GAAG,IAAI,GAAG,gBAAgB;;ACQ/F;;AAEG;SACa,sBAAsB,GAAA;;;;;;;;;IASpC,OAAO;AACL,QAAA,yBAAyB,EAAE;AAC3B,QAAA,2BAA2B,EAAE;AAC7B,QAAA,sBAAsB,EAAE;AACxB,QAAA,yBAAyB,EAAE;AAC3B,QAAA,uBAAuB,EAAE;AACzB,QAAA,i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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 {\n breadcrumbsIntegration,\n globalHandlersIntegration,\n httpContextIntegration,\n linkedErrorsIntegration,\n} from '@sentry/browser';\nimport { init as browserInit, setContext } from '@sentry/browser';\nimport {\n applySdkMetadata,\n dedupeIntegration,\n functionToStringIntegration,\n inboundFiltersIntegration,\n} from '@sentry/core';\nimport type { Client, Integration } from '@sentry/types';\nimport { logger } from '@sentry/utils';\n\nimport { IS_DEBUG_BUILD } from './flags';\n\n/**\n * Get the default integrations for the Angular SDK.\n */\nexport function getDefaultIntegrations(): Integration[] {\n // Don't include the BrowserApiErrors integration as it interferes with the Angular SDK's `ErrorHandler`:\n // BrowserApiErrors would catch certain errors before they reach the `ErrorHandler` and\n // thus provide a lower fidelity error than what `SentryErrorHandler`\n // (see errorhandler.ts) would provide.\n //\n // see:\n // - https://github.com/getsentry/sentry-javascript/issues/5417#issuecomment-1453407097\n // - https://github.com/getsentry/sentry-javascript/issues/2744\n return [\n inboundFiltersIntegration(),\n functionToStringIntegration(),\n breadcrumbsIntegration(),\n globalHandlersIntegration(),\n linkedErrorsIntegration(),\n dedupeIntegration(),\n httpContextIntegration(),\n ];\n}\n\n/**\n * Inits the Angular SDK\n */\nexport function init(options: BrowserOptions): Client | undefined {\n const opts = {\n defaultIntegrations: getDefaultIntegrations(),\n ...options,\n };\n\n applySdkMetadata(opts, 'angular');\n\n checkAndSetAngularVersion();\n return browserInit(opts);\n}\n\nfunction checkAndSetAngularVersion(): void {\n const ANGULAR_MINIMUM_VERSION = 14;\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 `This Sentry SDK does not officially support Angular ${angularVersion}.`,\n `This SDK only supports Angular ${ANGULAR_MINIMUM_VERSION} and above.`,\n \"If you're using lower Angular versions, check the Angular Version Compatibility table in our docs: https://docs.sentry.io/platforms/javascript/guides/angular/#angular-version-compatibility.\",\n 'Otherwise, please consider upgrading your Angular version.',\n );\n }\n setContext('angular', { version: angularVersion });\n }\n}\n","// This would be exposed in the global environment whenever `zone.js` is\n// included in the `polyfills` configuration property. Starting from Angular 17,\n// users can opt-in to use zoneless change detection.\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\ndeclare const Zone: any;\n\n// In Angular 17 and future versions, zoneless support is forthcoming.\n// Therefore, it's advisable to safely check whether the `run` function is\n// available in the `<root>` context.\n// eslint-disable-next-line @typescript-eslint/no-unsafe-member-access\nconst isNgZoneEnabled = typeof Zone !== 'undefined' && Zone.root && Zone.root.run;\n\n/**\n * The function that does the same job as `NgZone.runOutsideAngular`.\n *\n * ⚠️ Note: All of the Sentry functionality called from inside the Angular\n * execution context must be wrapped in this function. Angular's rendering\n * relies on asynchronous tasks being scheduled within its execution context.\n * Since Sentry schedules tasks that do not interact with Angular's rendering,\n * it may prevent Angular from functioning reliably. Consequently, it may disrupt\n * processes such as server-side rendering or client-side hydration.\n */\nexport function runOutsideAngular<T>(callback: () => T): T {\n // Running the `callback` within the root execution context enables Angular\n // processes (such as SSR and hydration) to continue functioning normally without\n // timeouts and delays that could affect the user experience. This approach is\n // necessary because some of the Sentry functionality continues to run in the background.\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?: ReportDialogOptions;\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 runOutsideAngular(() => {\n Sentry.showReportDialog({ ...this._options.dialogOptions, eventId: event.event_id! });\n });\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 runOutsideAngular(() => {\n Sentry.showReportDialog({ ...this._options.dialogOptions, eventId });\n });\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","import 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 browserTracingIntegration as originalBrowserTracingIntegration,\n getActiveSpan,\n getClient,\n getCurrentScope,\n getRootSpan,\n spanToJSON,\n startBrowserTracingNavigationSpan,\n startInactiveSpan,\n} from '@sentry/browser';\nimport type { Integration, Span } 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;\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 }\n\n return originalBrowserTracingIntegration({\n ...options,\n instrumentNavigation: false,\n });\n}\n\n/**\n * This function is extracted to make unit testing easier.\n */\nexport function _updateSpanAttributesForParametrizedUrl(route: string, span?: Span): void {\n const attributes = (span && spanToJSON(span).data) || {};\n\n if (span && attributes[SEMANTIC_ATTRIBUTE_SENTRY_SOURCE] === 'url') {\n span.updateName(route);\n span.setAttribute(SEMANTIC_ATTRIBUTE_SENTRY_SOURCE, 'route');\n span.setAttribute(SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN, `auto.${spanToJSON(span).op}.angular`);\n }\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) {\n // see comment in `_isPageloadOngoing` for rationale\n if (!this._isPageloadOngoing()) {\n runOutsideAngular(() => {\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 });\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 runOutsideAngular(() =>\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 }),\n ) || null;\n\n return;\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 if (route) {\n getCurrentScope().setTransactionName(route);\n }\n\n const activeSpan = getActiveSpan();\n const rootSpan = activeSpan && getRootSpan(activeSpan);\n\n _updateSpanAttributesForParametrizedUrl(route, rootSpan);\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 * don'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\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 if (getActiveSpan()) {\n this._tracingSpan = runOutsideAngular(() =>\n startInactiveSpan({\n name: `<${this.componentName}>`,\n op: ANGULAR_INIT_OP,\n attributes: { [SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN]: 'auto.ui.angular.trace_directive' },\n }),\n );\n }\n }\n\n /**\n * Implementation of AfterViewInit lifecycle method\n * @inheritdoc\n */\n public ngAfterViewInit(): void {\n if (this._tracingSpan) {\n runOutsideAngular(() => 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\ninterface TraceClassOptions {\n /**\n * Name of the class\n */\n name?: string;\n}\n\n/**\n * Decorator function that can be used to capture initialization lifecycle of the whole component.\n */\nexport function TraceClass(options?: TraceClassOptions): ClassDecorator {\n let tracingSpan: Span;\n\n /* eslint-disable @typescript-eslint/no-unsafe-member-access */\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 tracingSpan = runOutsideAngular(() =>\n startInactiveSpan({\n onlyIfParent: true,\n name: `<${options && options.name ? options.name : 'unnamed'}>`,\n op: ANGULAR_INIT_OP,\n attributes: {\n [SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN]: 'auto.ui.angular.trace_class_decorator',\n },\n }),\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 runOutsideAngular(() => 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\ninterface TraceMethodOptions {\n /**\n * Name of the method (is added to the tracing span)\n */\n name?: string;\n}\n\n/**\n * Decorator function that can be used to capture a single lifecycle methods of the component.\n */\nexport function TraceMethod(options?: TraceMethodOptions): MethodDecorator {\n // eslint-disable-next-line @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\n runOutsideAngular(() => {\n startInactiveSpan({\n onlyIfParent: true,\n name: `<${options && options.name ? options.name : 'unnamed'}>`,\n op: `${ANGULAR_OP}.${String(propertyKey)}`,\n startTime: now,\n attributes: {\n [SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN]: 'auto.ui.angular.trace_method_decorator',\n },\n }).end(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":["browserInit","originalBrowserTracingIntegration"],"mappings":";;;;;;;;;;;;;AAAA;;;;;;;AAOG;AAIH;AACO,MAAM,cAAc,GAAG,OAAO,gBAAgB,KAAK,WAAW,GAAG,IAAI,GAAG,gBAAgB;;ACQ/F;;AAEG;SACa,sBAAsB,GAAA;;;;;;;;;IASpC,OAAO;AACL,QAAA,yBAAyB,EAAE;AAC3B,QAAA,2BAA2B,EAAE;AAC7B,QAAA,sBAAsB,EAAE;AACxB,QAAA,yBAAyB,EAAE;AAC3B,QAAA,uBAAuB,EAAE;AACzB,QAAA,iBAAiB,EAAE;AACnB,QAAA,sBAAsB,EAAE;KACzB,CAAC;AACJ,CAAC;AAED;;AAEG;AACG,SAAU,IAAI,CAAC,OAAuB,EAAA;AAC1C,IAAA,MAAM,IAAI,GAAG;QACX,mBAAmB,EAAE,sBAAsB,EAAE;AAC7C,QAAA,GAAG,OAAO;KACX,CAAC;AAEF,IAAA,gBAAgB,CAAC,IAAI,EAAE,SAAS,CAAC,CAAC;AAElC,IAAA,yBAAyB,EAAE,CAAC;AAC5B,IAAA,OAAOA,MAAW,CAAC,IAAI,CAAC,CAAC;AAC3B,CAAC;AAED,SAAS,yBAAyB,GAAA;IAChC,MAAM,uBAAuB,GAAG,EAAE,CAAC;IAEnC,MAAM,cAAc,GAAG,OAAO,IAAI,OAAO,CAAC,KAAK,GAAG,QAAQ,CAAC,OAAO,CAAC,KAAK,EAAE,EAAE,CAAC,GAAG,SAAS,CAAC;AAE1F,IAAA,IAAI,cAAc,EAAE;QAClB,IAAI,cAAc,GAAG,uBAAuB,EAAE;YAC5C,cAAc;AACZ,gBAAA,MAAM,CAAC,IAAI,CACT,CAAA,oDAAA,EAAuD,cAAc,CAAG,CAAA,CAAA,EACxE,CAAkC,+BAAA,EAAA,uBAAuB,aAAa,EACtE,+LAA+L,E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IAAI,IAAI,IAAI,KAAK,SAAS,EAAE;YACvC,MAAM;AACP,SAAA;AAED,QAAA,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;AACjB,QAAA,YAAY,GAAG,YAAY,CAAC,UAAU,CAAC;AACxC,KAAA;AAED,IAAA,MAAM,QAAQ,GAAG,KAAK,CAAC,MAAM,CAAC,IAAI,IAAI,IAAI,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;IACtD,OAAO,QAAQ,GAAG,CAAA,CAAA,EAAI,QAAQ,CAAA,CAAA,CAAG,GAAG,GAAG,CAAC;AAC1C;;AChZA;;AAEG;;;;"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@sentry/angular",
|
|
3
|
-
"version": "8.
|
|
3
|
+
"version": "8.12.0",
|
|
4
4
|
"description": "Official Sentry SDK for Angular",
|
|
5
5
|
"repository": "git://github.com/getsentry/sentry-javascript.git",
|
|
6
6
|
"homepage": "https://github.com/getsentry/sentry-javascript/tree/master/packages/angular",
|
|
@@ -21,10 +21,10 @@
|
|
|
21
21
|
"rxjs": "^6.5.5 || ^7.x"
|
|
22
22
|
},
|
|
23
23
|
"dependencies": {
|
|
24
|
-
"@sentry/browser": "8.
|
|
25
|
-
"@sentry/core": "8.
|
|
26
|
-
"@sentry/types": "8.
|
|
27
|
-
"@sentry/utils": "8.
|
|
24
|
+
"@sentry/browser": "8.12.0",
|
|
25
|
+
"@sentry/core": "8.12.0",
|
|
26
|
+
"@sentry/types": "8.12.0",
|
|
27
|
+
"@sentry/utils": "8.12.0",
|
|
28
28
|
"tslib": "^2.4.1"
|
|
29
29
|
},
|
|
30
30
|
"volta": {
|
package/sdk.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { BrowserOptions } from '@sentry/browser';
|
|
2
|
-
import type { Integration } from '@sentry/types';
|
|
2
|
+
import type { Client, Integration } from '@sentry/types';
|
|
3
3
|
/**
|
|
4
4
|
* Get the default integrations for the Angular SDK.
|
|
5
5
|
*/
|
|
@@ -7,4 +7,4 @@ export declare function getDefaultIntegrations(): Integration[];
|
|
|
7
7
|
/**
|
|
8
8
|
* Inits the Angular SDK
|
|
9
9
|
*/
|
|
10
|
-
export declare function init(options: BrowserOptions):
|
|
10
|
+
export declare function init(options: BrowserOptions): Client | undefined;
|