description: operation list_indexes
schemaVersion: '1.27'
createEntities:
  - client:
      id: &client0 client0
      useMultipleMongoses: false
      observeTracingMessages:
        enableCommandPayload: true
  - database:
      id: &database0 database0
      client: *client0
      databaseName: operation-list-indexes
  - collection:
      id: &collection0 collection0
      database: database0
      collectionName: test
initialData:
  - collectionName: test
    databaseName: operation-list-indexes
    documents: [ ]
tests:
  - description: List indexes
    operations:
      - object: *collection0
        name: listIndexes

    expectTracingMessages:
      - client: *client0
        ignoreExtraSpans: false
        spans:
          - name: listIndexes operation-list-indexes.test
            attributes:
              db.system.name: mongodb
              db.namespace: operation-list-indexes
              db.collection.name: test
              db.operation.name: listIndexes
              db.operation.summary: listIndexes operation-list-indexes.test

            nested:
              - name: listIndexes
                attributes:
                  db.system.name: mongodb
                  db.namespace: operation-list-indexes
                  db.collection.name: test
                  db.command.name: listIndexes
                  network.transport: tcp
                  db.response.status_code: { $$exists: false }
                  exception.message: { $$exists: false }
                  exception.type: { $$exists: false }
                  exception.stacktrace: { $$exists: false }
                  server.address: { $$type: string }
                  server.port: { $$type: [ int, long ] }
                  db.query.summary: listIndexes operation-list-indexes.test
                  db.query.text:
                    $$matchAsDocument:
                      $$matchAsRoot:
                        listIndexes: test
                  db.mongodb.server_connection_id:
                    $$type: [ int, long ]
                  db.mongodb.driver_connection_id:
                    $$type: [ int, long ]
