Azure / azure-cosmos-dotnet-v3

.NET SDK for Azure Cosmos DB for the core SQL API
MIT License
723 stars 477 forks source link

Distributed Tracing/Open Telemetry: Feature requests #4553

Open sourabh1007 opened 1 week ago

sourabh1007 commented 1 week ago

Query sanitization

  1. Parameterized queries shouldn't be sanitized (because the user self-sanitizes through parameters), and collecting parameter values will be an opt in config
  2. For all other queries, text should only be captured if it's sanitized. Literal values should be replaced by ?

    Batch

  3. New attribute to capture batch size
  4. Operation name should be prepended with BATCH for homogenous operations, or be just BATCH for heterogenous operations. If the DB system has a native name that makes sense we can use that (ex. our API names for ReadMany, TransactionalBatch etc.)

    Span name

  5. Change span name to " " where target is the collection name if available
  6. This removes the or account name in our case from the span name

Few open requests for reference (might or might not be relevant):

  1. https://github.com/Azure/azure-cosmos-dotnet-v3/issues/4375
  2. https://github.com/Azure/azure-cosmos-dotnet-v3/issues/4095
  3. https://github.com/Azure/azure-cosmos-dotnet-v3/issues/3317