Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion test/logging.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ describe('logging', () => {
attributes: {
'log.type': 'LogRecord',
'exception.message': "Cannot read properties of undefined (reading 'exist')",
'exception.stacktrace': s => s.match(/^TypeError: .+(\n\s+at .+){6}$/),
'exception.stacktrace': s => s.match(/^TypeError: .+(\n\s+at .+){5}$/),
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

stacktrace got shorter...

'exception.type': 'TypeError',
foo: 'bar'
}
Expand Down
4 changes: 1 addition & 3 deletions test/tracing-messaging-with-outbox.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,7 @@ const env = {
process.env.cds_requires_messaging = JSON.stringify(env)

const CHECK = (log, expect) => {
// 2: no outbox -> consumer gets new root context
// REVISIT: for some reason, the emit done in the on succeeded callback gets a new root context when running in jest
expect(log.output.match(/\[telemetry\] - elapsed times:/g).length).to.equal(3) //> actually 2
expect(log.output.match(/\[telemetry\] - elapsed times:/g).length).to.equal(4)
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

log.output in cds 8:
image

log.outputin cds 9:
image

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i think we should deactivate the queue for the existing tests and then add extra ones for it

Copy link
Contributor Author

@hm23 hm23 Jun 4, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not sure if I understand your comment, sorry. Tests for outbox: false are already in place in test/tracing-messaging-without-outbox.test.js, or?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

right, but that worked because the persistent outbox was off by default, i.e., the disabling was omitted. now, we need to explicitly set the in memory outbox: https://github.com/cap-js/telemetry/pull/338/files#diff-08b958738e72f5b16d4eb669fe005de06cf9dfc430ecda1494064d1dec87c93bR5

}

describe(`tracing messaging - ${CASE}`, () => {
Expand Down
Loading