This documentation has an index for AI agents at /llms.txt. A Markdown version of this page is available at https://explorer.opentelemetry.io/collector/components/contrib/mongodbreceiver.md.

MongoDB Receiver

OpenTelemetry Collector receiver · contrib distribution

This receiver fetches stats from a MongoDB instance using the golang mongo driver. Stats are collected via MongoDB's dbStats and serverStatus commands.

  • Component ID: contrib-mongodbreceiver
  • Name: mongodbreceiver
  • Type: receiver
  • Distribution: contrib
  • Repository: opentelemetry-collector-contrib

Stability

LevelSignals
betametrics
developmentlogs

Attributes

AttributeTypeDescription
client.addressstringHostname or address of the client.
client.portintTCP port used by the client.
collectionstringThe name of a collection.
connection_typestringThe status of the connection.
db.collection.namestringThe MongoDB collection being accessed within the database stated in db.namespace.
db.namespacestringThe name of a database.
db.operation.namestringThe name of the MongoDB command being executed (e.g. find, aggregate, insert).
db.query.textstringThe obfuscated MongoDB command statement.
db.system.namestringThe database management system (DBMS) product as identified by the client instrumentation.
lock_modestringThe mode of Lock which denotes the degree of access
lock_typestringThe Resource over which the Lock controls access
memory_typestringThe type of memory used.
mongodb.client.app.namestringThe identifier of the client application which ran the operation, as set by the driver's appName connection option.
mongodb.cursor.await_databoolWhether the tailable cursor waits for new data instead of returning immediately.
mongodb.cursor.idstringThe identifier of the cursor.
mongodb.cursor.no_timeoutboolWhether the cursor is configured not to time out when idle.
mongodb.cursor.originating_commandstringThe obfuscated command that originally created the cursor.
mongodb.cursor.returned_batchesintThe cumulative number of batches returned by the cursor.
mongodb.cursor.returned_documentsintThe cumulative number of documents returned by the cursor.
mongodb.cursor.tailableboolWhether the cursor is a tailable cursor.
mongodb.lsid.idstringThe UUID portion of the logical session identifier associated with the MongoDB operation.
mongodb.operation.commentsliceThe comments attached to the MongoDB command. String comments are reported as-is; array comments are expanded into multiple entries; non-string values are reported as MongoDB Extended JSON.
mongodb.operation.durationdoubleThe duration of the MongoDB operation in seconds.
mongodb.operation.idstringIdentifier of the MongoDB operation.
mongodb.operation.plan.summarystringSummary of the execution plan for the MongoDB operation.
mongodb.operation.prepared_read_conflict.countintThe number of times the MongoDB operation had to wait for a prepared transaction with a write to commit or abort.
mongodb.operation.statestringSimplified state of the MongoDB operation.
mongodb.operation.typestringThe raw MongoDB operation type from $currentOp.op (e.g. query, insert, update, remove, getmore, command).
mongodb.operation.wait.detailsstringDetails about what the MongoDB operation is waiting on.
mongodb.operation.wait.typesliceThe set of wait conditions the MongoDB operation is currently blocked on. Possible values: lock (from waitingForLock), flow_control (from waitingForFlowControl), and latch (when waitingForLatch is a non-empty document). An empty slice indicates the operation is not waiting on any of these conditions.
mongodb.operation.write_conflict.countintThe number of times the MongoDB operation conflicted with another write operation on the same document.
mongodb.operation.yield.countintThe number of times the MongoDB operation yielded to allow other operations to complete.
mongodb.query.frameworkstringThe MongoDB query execution engine that processed this operation. Only present for operations that flow through the query subsystem (reads, read-modify-writes, and getMore continuations); absent for pure inserts, index management, and administrative commands. Known values include classic and sbe.
mongodb.query.truncatedboolWhether the value carried by db.query.text is a truncated rendering of the MongoDB command, as indicated by $truncated in the currentOp output.
operationstringThe MongoDB operation being counted.
operation_latencystringThe MongoDB operation with regards to latency
typestringThe result of a cache request.
user.namestringName of the user associated with the operation.

Data

  • JSON: /data/collector/components/contrib-mongodbreceiver/contrib-mongodbreceiver-4bb3c2ac30d6.json
  • Explore: /collector/components/contrib/mongodbreceiver