Skip to content

Commit

Permalink
fix: lint
Browse files Browse the repository at this point in the history
  • Loading branch information
amychisholm03 committed Sep 10, 2024
1 parent e400a21 commit ee52c98
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 14 deletions.
10 changes: 5 additions & 5 deletions test/lib/metrics_helper.js
Original file line number Diff line number Diff line change
Expand Up @@ -151,11 +151,11 @@ function assertSegments(parent, expected, options) {
child ? child.name : undefined,
sequenceItem,
'segment "' +
parent.name +
'" should have child "' +
sequenceItem +
'" in position ' +
childCount
parent.name +
'" should have child "' +
sequenceItem +
'" in position ' +
childCount
)

// If the next expected item is not array, then check that the current
Expand Down
14 changes: 12 additions & 2 deletions test/versioned/amqplib/amqp-utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -244,7 +244,12 @@ function verifyGet({ t, tx, exchangeName, routingKey, queue, assertAttr }) {
} else {
metrics.assertSegments(tx.trace.root, [produceName, consumeName])
}
metrics.assertMetrics(tx.metrics, [[{ name: produceName }], [{ name: consumeName }]], false, false)
metrics.assertMetrics(
tx.metrics,
[[{ name: produceName }], [{ name: consumeName }]],
false,
false
)
if (assertAttr) {
const segment = metrics.findSegment(tx.trace.root, consumeName)
const attributes = segment.getAttributes()
Expand Down Expand Up @@ -296,7 +301,12 @@ function verifyPurge(t, tx) {

metrics.assertSegments(tx.trace.root, segments, 'should have expected segments')

metrics.assertMetrics(tx.metrics, [[{ name: 'MessageBroker/RabbitMQ/Queue/Purge/Temp' }]], false, false)
metrics.assertMetrics(
tx.metrics,
[[{ name: 'MessageBroker/RabbitMQ/Queue/Purge/Temp' }]],
false,
false
)
}

function verifyTransaction(t, tx, msg) {
Expand Down
10 changes: 3 additions & 7 deletions test/versioned/openai/embeddings.tap.js
Original file line number Diff line number Diff line change
Expand Up @@ -45,13 +45,9 @@ tap.test('OpenAI instrumentation - embedding', (t) => {
test.notOk(results.headers, 'should remove response headers from user result')
test.equal(results.model, 'text-embedding-ada-002-v2')

assertSegments(
tx.trace.root,
[OPENAI.EMBEDDING, [`External/${host}:${port}/embeddings`]],
{
exact: false
}
)
assertSegments(tx.trace.root, [OPENAI.EMBEDDING, [`External/${host}:${port}/embeddings`]], {
exact: false
})
tx.end()
test.end()
})
Expand Down

0 comments on commit ee52c98

Please sign in to comment.