Skip to content

SQLServer XE handlers documentation #29291

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

Merged
merged 15 commits into from
Jun 23, 2025
Merged

Conversation

azhou-datadog
Copy link
Contributor

@azhou-datadog azhou-datadog commented May 12, 2025

What does this PR do? What is the motivation?

Adds documentation to support DataDog/integrations-core#20229

Provides instructions on how to configure SQLServer extended event (XE) sessions to capture query errors and query completions.

Merge instructions

Merge readiness:

  • Ready for merge

For Datadog employees:
Merge queue is enabled in this repo. Your branch name MUST follow the <name>/<description> convention and include the forward slash (/). Without this format, your pull request will not pass in CI, the GitLab pipeline will not run, and you won't get a branch preview. Getting a branch preview makes it easier for us to check any issues with your PR, such as broken links.

If your branch doesn't follow this format, rename it or create a new branch and PR.

To have your PR automatically merged after it receives the required reviews, add the following PR comment:

/merge

Additional notes

@azhou-datadog azhou-datadog requested review from a team as code owners May 12, 2025 18:31
@github-actions github-actions bot added the Guide Content impacting a guide label May 12, 2025
@datadog-datadog-prod-us1
Copy link

datadog-datadog-prod-us1 bot commented May 12, 2025

Datadog Summary

✅ Code Quality    ✅ Code Security    ✅ Dependencies


Was this helpful? Give us feedback!

Copy link
Contributor

github-actions bot commented May 12, 2025

Preview links (active after the build_preview check completes)

New or renamed files

@azhou-datadog azhou-datadog changed the title SQLServer XE handlers documentation WIP: SQLServer XE handlers documentation May 12, 2025
@jhgilbert jhgilbert added the WORK IN PROGRESS No review needed, it's a wip ;) label May 12, 2025
@jhgilbert
Copy link
Contributor

Hi @azhou-datadog, I see this is labeled as a WIP. I went ahead and added the work-in-progress label to keep this out of the docs team's review queue. If this is incorrect, feel free to update the PR title and remove the label. Thank you!

Copy link
Contributor

@pierreln-dd pierreln-dd left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

added some comments

Copy link
Contributor

github-actions bot commented Jun 17, 2025

✅ Documentation Team Review

The documentation team has approved this pull request. Thank you for your contribution!

@azhou-datadog azhou-datadog removed WORK IN PROGRESS No review needed, it's a wip ;) labels Jun 17, 2025
@azhou-datadog azhou-datadog changed the title WIP: SQLServer XE handlers documentation SQLServer XE handlers documentation Jun 17, 2025
@azhou-datadog azhou-datadog force-pushed the allen.zhou/sqlserver_xe branch from 1bfd49c to 8247c4d Compare June 17, 2025 17:22
@maycmlee
Copy link
Contributor

Created DOCS-11255 for docs review.

@maycmlee maycmlee added the editorial review Waiting on a more in-depth review label Jun 17, 2025
GO
```

The datadog_query_errors XE session captures SQL errors (severity ≥ 11) and query timeouts (attention events), allowing Datadog to surface query failures and interruptions.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Are there any docs for severity >= 11?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also what are attention events?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

query_errors:
enabled: true
```
In order to collect deobfuscated versions of query_completion and query_error events, enable collect_raw_query_statement in `sqlserver.d/conf.yaml`.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should probably add this disclaimer that we include above the param in sample conf file here the docs as well: https://github.com/DataDog/integrations-core/blob/master/sqlserver/datadog_checks/sqlserver/data/conf.yaml.example#L659

" ## Raw query statements and execution plans may contain sensitive information (e.g., passwords)
## or personally identifiable information in query text.
## Enabling this option will allow the collection and ingestion of raw query statements and
## execution plans into Datadog, which can then become viewable in query samples or explain plans.
## This option is disabled by default."

azhou-datadog and others added 2 commits June 23, 2025 14:15
Co-authored-by: DeForest Richards <56796055+drichards-87@users.noreply.github.com>
@drichards-87 drichards-87 merged commit 63ae78b into master Jun 23, 2025
15 of 17 checks passed
@drichards-87 drichards-87 deleted the allen.zhou/sqlserver_xe branch June 23, 2025 18:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
editorial review Waiting on a more in-depth review Guide Content impacting a guide
Projects
None yet
Development

Successfully merging this pull request may close these issues.

8 participants