Skip to content
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

Merged
merged 30 commits into from
Oct 6, 2024

Conversation

sourabh1007
Copy link
Contributor

@sourabh1007 sourabh1007 commented Sep 4, 2024

Description

  1. Added db.query.text attribute to record queries in Traces.
  2. Introduced new QueryTextMode, which will have valid values as
    a) None :Do not show query.
    b) ParameterizedOnly : Print parameterized query only.
    b) All
  3. It can be set as part of CosmosClientTelemetryOptions and RequestOptions (i.e. QueryRequestOptions and ChangeFeedRequestOptions)

Type of change

  • [] New feature (non-breaking change which adds functionality)

@sourabh1007 sourabh1007 marked this pull request as draft September 4, 2024 17:16
@sourabh1007 sourabh1007 force-pushed the users/sourabhjain/addqueryTextinOtel branch 3 times, most recently from 2f7c8e7 to e663af5 Compare September 11, 2024 01:24
@sourabh1007 sourabh1007 marked this pull request as ready for review September 12, 2024 00:45
@sourabh1007 sourabh1007 requested a review from a team as a code owner September 12, 2024 00:45
@sourabh1007 sourabh1007 force-pushed the users/sourabhjain/addqueryTextinOtel branch from 816b162 to 8e29f00 Compare September 13, 2024 12:32
Copy link
Contributor

@jcocchi jcocchi left a 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.

db.query.parameter.<key>

@sourabh1007 sourabh1007 force-pushed the users/sourabhjain/addqueryTextinOtel branch from 9b3858e to 35201c3 Compare September 18, 2024 02:11
@kirankumarkolli
Copy link
Member

Reqeustlevel override feels over engineering, Thoughts?

@sourabh1007
Copy link
Contributor Author

verride 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.

@sourabh1007 sourabh1007 force-pushed the users/sourabhjain/addqueryTextinOtel branch from 6343391 to 23b13bf Compare September 25, 2024 10:23
Copy link
Contributor

@philipthomas-MSFT philipthomas-MSFT left a 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.

@sourabh1007 sourabh1007 self-assigned this Oct 3, 2024
@sourabh1007 sourabh1007 added the auto-merge Enables automation to merge PRs label Oct 3, 2024
@microsoft-github-policy-service microsoft-github-policy-service bot enabled auto-merge (squash) October 3, 2024 06:57
@sourabh1007 sourabh1007 force-pushed the users/sourabhjain/addqueryTextinOtel branch from d64896a to 74a59ac Compare October 3, 2024 07:02
@microsoft-github-policy-service microsoft-github-policy-service bot enabled auto-merge (squash) October 6, 2024 02:27
@kirankumarkolli kirankumarkolli merged commit ad1bcd8 into master Oct 6, 2024
23 checks passed
@kirankumarkolli kirankumarkolli deleted the users/sourabhjain/addqueryTextinOtel branch October 6, 2024 03:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
auto-merge Enables automation to merge PRs Telemetry
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

6 participants