This is a cache of https://www.elastic.co/guide/en/apm/agent/dotnet/current/setup-azure-cosmosdb.html. It is a snapshot of the page at 2024-04-06T01:40:31.772+0000.
Azure Cosmos DB | APM .NET Agent Reference [1.x] | Elastic

Azure Cosmos DBedit

Quick startedit

Instrumentation can be enabled for Azure Cosmos DB by referencing Elastic.Apm.Azure.CosmosDb package and subscribing to diagnostic events.

Agent.Subscribe(new AzureCosmosDbDiagnosticsSubscriber());

Diagnostic events from Microsoft.Azure.Cosmos, Microsoft.Azure.DocumentDb, and Microsoft.Azure.DocumentDb.Core are captured as DB spans.