Skip to content

Commit

Permalink
test: fixed log error stack message truncating and failing equality t…
Browse files Browse the repository at this point in the history
…est (#2294)
  • Loading branch information
amychisholm03 committed Jun 25, 2024
1 parent e4d22f3 commit 8e06f0f
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion test/unit/api/api-record-log-events.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,11 @@ tap.test('Agent API - recordCustomEvent', (t) => {
t.notOk(logMessage['trace.id'], 'it does not have a trace id')
t.notOk(logMessage['span.id'], 'it does not have a span id')
t.equal(logMessage['error.message'], 'testing error', 'it has the right error.message')
t.equal(logMessage['error.stack'], error.stack, 'it has the right error.stack')
t.equal(
logMessage['error.stack'].substring(0, 1021),
error.stack.substring(0, 1021),
'it has the right error.stack'
)
t.equal(logMessage['error.class'], 'Error', 'it has the right error.class')

const lineMetric = agent.metrics.getMetric(LOGGING.LINES)
Expand Down

0 comments on commit 8e06f0f

Please sign in to comment.