Skip to content

Distributed Tracing: Add db.query.text attribute #4375

@joegoldman2

Description

@joegoldman2

It would be interesting to have the database statement being executed when using a feed interator. The standard attribute db.query.text can be used and the value can probably be QueryDefinition.QueryText

The statement may contain sensitive data (parameters), so this feature may require an explicit opt-in from the user. A mechanism similar to what is done in the EntityFrameworkCore instrumentation could surely be implemented:

https://github.com/open-telemetry/opentelemetry-dotnet-contrib/blob/19af5fb08264cb100e946e34855abab91dd99ed1/src/OpenTelemetry.Instrumentation.EntityFrameworkCore/EntityFrameworkInstrumentationOptions.cs#L24

A new option can be added in CosmosClientTelemetryOptions with a default value that does not activate this feature.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions