Skip to content

Commit ed53a9c

Browse files
authored
Rename error to exception (signalfx#58)
1 parent b83f553 commit ed53a9c

2 files changed

Lines changed: 6 additions & 5 deletions

File tree

example/package-lock.json

Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/instrumentations/errors.ts

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -30,19 +30,19 @@ export function reportError(err: any, isFatal?: boolean) {
3030
const msg = err.message || err.toString();
3131

3232
const attributes = {
33-
'error.isFatal': isFatal,
34-
'error.message': limitLen(msg, MESSAGE_LIMIT),
35-
'error.object': useful(err.name)
33+
'exception.isFatal': isFatal,
34+
'exception.message': limitLen(msg, MESSAGE_LIMIT),
35+
'exception.object': useful(err.name)
3636
? err.name
3737
: err.constructor && err.constructor.name
3838
? err.constructor.name
3939
: 'Error',
40-
'error': true, //TODO do we use this?
40+
'exception': true, //TODO do we use this?
4141
'component': 'error',
4242
};
4343

4444
if (err.stack && useful(err.stack)) {
45-
(attributes as any)['error.stack'] = limitLen(
45+
(attributes as any)['exception.stacktrace'] = limitLen(
4646
err.stack.toString(),
4747
STACK_LIMIT
4848
);

0 commit comments

Comments
 (0)