-
Notifications
You must be signed in to change notification settings - Fork 494
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open Telemetry : Adds query text in attribute #4664
Conversation
2f7c8e7
to
e663af5
Compare
816b162
to
8e29f00
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we want to have an opt in to also capture parameter values attributes? This is described in the otel conventions, but we can always go back and add it if there's demand later.
Microsoft.Azure.Cosmos/src/Telemetry/OpenTelemetry/OpenTelemetryCoreRecorder.cs
Show resolved
Hide resolved
Microsoft.Azure.Cosmos/src/Telemetry/OpenTelemetry/OpenTelemetryRecorderFactory.cs
Outdated
Show resolved
Hide resolved
9b3858e
to
35201c3
Compare
Microsoft.Azure.Cosmos/src/Telemetry/OpenTelemetry/ShowQueryMode.cs
Outdated
Show resolved
Hide resolved
Microsoft.Azure.Cosmos/src/ChangeFeed/ChangeFeedIteratorCore.cs
Outdated
Show resolved
Hide resolved
Reqeustlevel override feels over engineering, Thoughts? |
It is taken from Java SDK and I believe, It will provide customers with the option to enable or disable the inclusion of query text in OpenTelemetry (OTel) traces for specific types of queries. |
6343391
to
23b13bf
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nothing major from me. LGTM. just one nit. Everything else looks good.
Microsoft.Azure.Cosmos/src/Telemetry/OpenTelemetry/QueryTextMode.cs
Outdated
Show resolved
Hide resolved
Microsoft.Azure.Cosmos/src/RequestOptions/ChangeFeedRequestOptions.cs
Outdated
Show resolved
Hide resolved
d64896a
to
74a59ac
Compare
Description
db.query.text
attribute to record queries in Traces.QueryTextMode
, which will have valid values asa)
None
:Do not show query.b)
ParameterizedOnly
: Print parameterized query only.b)
All
CosmosClientTelemetryOptions
andRequestOptions
(i.e.QueryRequestOptions
andChangeFeedRequestOptions
)Type of change