-
Notifications
You must be signed in to change notification settings - Fork 1.5k
SQLServer Extended Event Handlers #20229
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
azhou-datadog
wants to merge
131
commits into
master
Choose a base branch
from
allen.zhou/sqlserver_xe_deobf
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
131 commits
Select commit
Hold shift + click to select a range
87cb158
poc test first pass
azhou-datadog 5ed38c3
log events
azhou-datadog 3329ed8
logging
azhou-datadog 72b1592
run_job_loop, not start
azhou-datadog 3742c0b
params correction
azhou-datadog 749458f
rpc_events xml parsing basic
azhou-datadog 46deb8a
batch_events and share utils
azhou-datadog 0ac008d
timestamp and timing implementation
azhou-datadog 653d88f
event file implement
azhou-datadog 6e71063
fix file path
azhou-datadog 5546bbd
return complete xml
azhou-datadog feb1781
parse xml on client side
azhou-datadog a67591e
time parsing and query section seperately
azhou-datadog 3f88433
convert string to bytes
azhou-datadog bc87a76
now test sqlserver parsing
azhou-datadog 9c53d48
remove sqlserver parsing version
azhou-datadog 0c11ffe
missing statement from rpc_events
azhou-datadog 7b6f621
print event payload
azhou-datadog 7dc8c3f
fix json parsing
azhou-datadog a0a85af
add event source to event payload
azhou-datadog a3490c0
implement error events
azhou-datadog 2b5dc00
remove config
azhou-datadog 7ee61ad
test start time timestamp calculation
azhou-datadog bee2f6e
make allen test check more loose
azhou-datadog 7f1a516
log host and session id as well
azhou-datadog 7c81019
delete log
azhou-datadog 1b49409
delete correct log
azhou-datadog f157eff
use resolved hostname
azhou-datadog 20486f7
try to detect ring buffer event loss
azhou-datadog 7158822
more visibility on timestamp gaps
azhou-datadog 5182ad4
do not limit max events for testing
azhou-datadog 4c901c9
temp increase of max events
azhou-datadog 3621e59
fill in dbm_type based on event session name
azhou-datadog cc624a4
implement sql statement events
azhou-datadog 83018c3
implement sp statement events
azhou-datadog de60988
combine query completions to a single event session
azhou-datadog 5c743ef
refactors
azhou-datadog a4f3a4f
implement attention events
azhou-datadog 98339ae
remove joined event handlers, add query start timing data
azhou-datadog 6b09ff0
clean up
azhou-datadog b8ab2f0
clean up
azhou-datadog 47b518c
more clean up
azhou-datadog d6373ac
RQT and obfuscate queries first pass
azhou-datadog bcab373
get query completion timestamp into rqt event
azhou-datadog fdd96ea
better timing data
azhou-datadog 4ddff8c
add more logging
azhou-datadog 351773b
remove caching for now to get visibility for debugging
azhou-datadog 842ac5a
calculate raw query signature
azhou-datadog da0383b
normalize timestamps
azhou-datadog ae0ae64
add xe_type
azhou-datadog 0788348
fix event_name for error events
azhou-datadog 76074ff
add query_signature to non-RQT event
azhou-datadog 1061c3e
refactor obfuscating logic
azhou-datadog 3b6bbac
clean up dead code
azhou-datadog 52ba8b6
consolidate more code
azhou-datadog 7b9a3f0
normalize timestamp for timestamp filtering
azhou-datadog 31eaa9a
simplify timestamp filtering
azhou-datadog c77b6d1
fix timestamp gap logging
azhou-datadog a60284e
simplify event logging
azhou-datadog 7531bb4
omit duration and query_start from query error RQT
azhou-datadog 313b37a
omit in XE event too
azhou-datadog d512f07
refactors
azhou-datadog 1e95e6f
missed path fix
azhou-datadog df08540
add sql fields back
azhou-datadog 4527c8a
explicitly state sql fields expected for each event session
azhou-datadog aa4146f
move raw query signature calculation
azhou-datadog 7536cb6
implement configuration
azhou-datadog 3c2d84a
unit test first pass
azhou-datadog 7056265
change imports
azhou-datadog bce1233
import change
azhou-datadog 5a8a7b2
add handlers test
azhou-datadog 34ac207
fix stub import
azhou-datadog efdd4a1
don't mock event handler
azhou-datadog cc5d249
mock keys return dict
azhou-datadog e197407
fix tests
azhou-datadog cd8c3b0
timestamp mock fixes
azhou-datadog 1b96927
TimeMock class
azhou-datadog 911a60d
avoid mocking time.time
azhou-datadog a807663
refactors
azhou-datadog 6a16ec3
fix expected types in rqt event
azhou-datadog cd20039
module end test
azhou-datadog bb749f8
space in file name!!
azhou-datadog dbee3f5
add attention test
azhou-datadog d17df4f
fix attention test
azhou-datadog 9b9b196
add integration test
azhou-datadog 350ea9c
send events to datadog
azhou-datadog f69c9ac
check if sleep makes test consistent
azhou-datadog 543bbb9
debug test
azhou-datadog 3598748
fix cursor call
azhou-datadog 5358d9a
grant select to datadog user
azhou-datadog c856ac5
grant to bob
azhou-datadog 1b1a4c6
wrong setup
azhou-datadog bea0170
delete extra vars
azhou-datadog 8ddc87c
log all calls
azhou-datadog 79a886f
run check
azhou-datadog f728617
follow activity.py pattern
azhou-datadog fa1d339
fix event type
azhou-datadog df124d2
debug logging
azhou-datadog a3da104
fix config
azhou-datadog 533f171
refactor test
azhou-datadog 26d4b12
remove sleep
azhou-datadog 65f76d3
enable cache, add timestamp test
azhou-datadog bdbc957
fix happy path test
azhou-datadog 06fb391
linter fixes part 1
azhou-datadog 02d1dd2
linters part 2
azhou-datadog e4328b2
concat strings for linter
azhou-datadog be9cb15
delete statement level event files
azhou-datadog 5a6b7df
Add database instance to events
azhou-datadog ab99147
batch events for query_completion and query_errors
azhou-datadog 789ddb0
fix unit test serialization and add test for checking batching logic
azhou-datadog cae8150
add method tracking and code clean up
azhou-datadog a781337
add change log
azhou-datadog a92bc0d
fix conditional logging
azhou-datadog 7c3c773
remove timing data now that we have tracked methods
azhou-datadog 4409099
log ANY first rqt event
azhou-datadog 8d56f9c
validate config
azhou-datadog 3441911
fix import
azhou-datadog 809e135
license fix
azhou-datadog a913fd1
validate models
azhou-datadog eede6bc
make collection interval a number, not int
azhou-datadog 4ec6a98
fix unit tests
azhou-datadog dace4e6
update all setup scripts to set up XE sessions
azhou-datadog a625e4d
add query visibility into error
azhou-datadog 19a6803
clean up code
azhou-datadog 4807906
add raw query signature to query completion and error
azhou-datadog 0f8cfef
revert to execute with retries
azhou-datadog 751af58
debug pipeline, only run on 2022 sqlserver
azhou-datadog ae7b15a
use convert syntax for adodbapi
azhou-datadog bfb1f1d
add back 2019 sqlserver version
azhou-datadog 7bb8b32
address review comments
azhou-datadog 7750c81
delete dead code
azhou-datadog File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
Added SQLServer Extended Event Handlers | ||
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
# (C) Datadog, Inc. 2025-present | ||
# All rights reserved | ||
# Licensed under a 3-clause BSD style license (see LICENSE) |
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
nit: You can set these as descriptions of the properties themselves
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.
this is actually really annoying - we can't set descriptions on properties of an "object". You can set descriptions on individual options. The reason I'm using object here is to get the nested configuration of
We're not able to get this nesting if we use the "option" value. I'm going to keep this format unless we want to talk about this piece more.