Package installation
Add the Atatus MongoDB instrumentation package to the application.If you are already using the
Atatus.NetCoreAll package, MongoDB calls are captured automatically once the client is configured as shown below, and no additional subscription code is required.Configure the MongoDB client
A prerequisite for auto-instrumentation is to configure theMongoClient with MongoDbEventSubscriber in your database initialization code:
MongoDbDiagnosticsSubscriber to the Agent.Subscribe method:
What Atatus captures ?
- A span for each command executed through the MongoDB.Driver client.
MongoDB integration is supported on .NET Core and newer. Because the MongoDB.Driver assemblies are not strongly named, they cannot be used with Atatus strongly named assemblies on .NET Framework.