function verifyTraces(agent, transaction) {
  const host = getMetricHostName(agent, params.postgres_host)
  const trace = transaction.trace
  assert.ok(trace, 'trace should exist')
  assert.ok(trace.root, 'root element should exist')

  assertSegments(trace, trace.root, [findMany, update, update, findMany], { exact: true })
  assertSpanKind({
    agent,
    segments: [
      { name: findMany, kind: 'client' },
      { name: update, kind: 'client' }
    ]
  })
  const findManySegment = findSegment(trace, trace.root, findMany)
  assert.ok(findManySegment.timer.hrDuration, 'findMany segment should have ended')
  const updateSegment = findSegment(trace, trace.root, update)
  assert.ok(updateSegment.timer.hrDuration, 'update segment should have ended')
  for (const segment of [findManySegment, updateSegment]) {
    const attributes = segment.getAttributes()
    const name = segment.name
    assert.equal(attributes.host, host, `host of segment ${name} should equal ${host}`)
    assert.equal(
      attributes.database_name,
      params.postgres_db,
      `database name of segment ${name} should be ${params.postgres_db}`
    )
    assert.equal(
      attributes.port_path_or_id,
      params.postgres_prisma_port.toString(),
      `port of segment ${name} should be ${params.postgres_prisma_port}`
    )
  }
}
Asserts all relevant prisma segments and their associative datastore attributes.
It also asserts that every segment has a hrDuration which means it has ended

@param {Object} agent mocked NR agent
@param {Object} transaction active NR transaction