Skip to content

Commit 8e06f0f

Browse files
authoredJun 25, 2024··
test: fixed log error stack message truncating and failing equality test (#2294)
1 parent e4d22f3 commit 8e06f0f

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed
 

‎test/unit/api/api-record-log-events.test.js

+5-1
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,11 @@ tap.test('Agent API - recordCustomEvent', (t) => {
4646
t.notOk(logMessage['trace.id'], 'it does not have a trace id')
4747
t.notOk(logMessage['span.id'], 'it does not have a span id')
4848
t.equal(logMessage['error.message'], 'testing error', 'it has the right error.message')
49-
t.equal(logMessage['error.stack'], error.stack, 'it has the right error.stack')
49+
t.equal(
50+
logMessage['error.stack'].substring(0, 1021),
51+
error.stack.substring(0, 1021),
52+
'it has the right error.stack'
53+
)
5054
t.equal(logMessage['error.class'], 'Error', 'it has the right error.class')
5155

5256
const lineMetric = agent.metrics.getMetric(LOGGING.LINES)

0 commit comments

Comments
 (0)
Please sign in to comment.