Skip to content

Commit 524402c

Browse files
committed
feat: Debug integration
1 parent 3642c86 commit 524402c

File tree

3 files changed

+25
-1
lines changed

3 files changed

+25
-1
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
- [browser] feat: Show dropped event url in `blacklistUrl`/`whitelistUrl` debug mode
66
- [browser] feat: Use better event description instead of `event_id` for user-facing logs
77
- [core] ref: Create common integrations that are exposed on `@sentry/core` and reexposed through `browser`/`node`
8+
- [core] feat: Debug integration
89

910
## 4.0.0
1011

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
// TODO
1+
export { Debug } from './pluggable/debug';
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
import { configureScope } from '@sentry/minimal';
2+
import { Integration, SentryEvent } from '@sentry/types';
3+
4+
/** JSDoc */
5+
export class Debug implements Integration {
6+
/**
7+
* @inheritDoc
8+
*/
9+
public name: string = 'Debug';
10+
11+
/**
12+
* @inheritDoc
13+
*/
14+
public install(): void {
15+
configureScope(scope => {
16+
scope.addEventProcessor(async (event: SentryEvent) => {
17+
// tslint:disable-next-line:no-console
18+
console.log(event);
19+
return event;
20+
});
21+
});
22+
}
23+
}

0 commit comments

Comments
 (0)