Semantic Conventions for MongoDB

Status: Experimental

The Semantic Conventions for MongoDB extend and override the Database Semantic Conventions that describe common database operations attributes in addition to the Semantic Conventions described on this page.

db.system MUST be set to "mongodb".

Call-level attributes

AttributeTypeDescriptionExamplesRequirement Level
db.mongodb.collectionstringThe collection being accessed within the database stated in db.name.customers; productsRequired

Example

KeyValue
Span name"products.findAndModify"
db.system"mongodb"
db.connection_stringnot set
db.user"the_user"
server.address"mongodb0.example.com"
server.port27017
network.peer.address"192.0.2.14"
network.peer.port27017
network.transport"tcp"
db.name"shopDb"
db.statementnot set
db.operation"findAndModify"
db.mongodb.collection"products"