Skip to content

Session Replay for AngularJS (1.x) #9124

Answered by AbhiPrasad
bruno-garcia asked this question in Q&A
Discussion options

You must be logged in to vote

To use the old integration with the current 7.x version of the JavaScript SDKs, first vendor in (copy paste this code into your app) the old AngularJS integration from 6.x. This is found here: https://github.com/getsentry/sentry-javascript/blob/6.x/packages/integrations/src/angular.ts.

import { Event, EventProcessor, Hub, Integration } from '@sentry/types';
import { getGlobalObject, logger } from '@sentry/utils';

import { IS_DEBUG_BUILD } from './flags';

// See https://github.com/angular/angular.js/blob/v1.4.7/src/minErr.js
const angularPattern = /^\[((?:[$a-zA-Z0-9]+:)?(?:[$a-zA-Z0-9]+))\] (.*?)\n?(\S+)$/;

/**
 * AngularJS integration
 *
 * Provides an $exceptionHandler for AngularJS
 */

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by bruno-garcia
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants