E53F feat: `sp_HumanEvents` Add Wildcard Support, A Few Fixes, And Event Type Check Handling by mattcargile · Pull Request #641 · erikdarlingdata/DarlingData · GitHub
[go: up one dir, main page]

Skip to content

Conversation

mattcargile
Copy link
@mattcargile mattcargile commented Oct 8, 2025

feat: sp_HumanEvents Add Wildcard Support, A Few Fixes, And Event Type Check Handling
Closes #639 , #640
Wildcard support for the below parameters:
@database_name
@object_name
@username
@client_hostname
@client_app_name
Remove ending periods on @help for for @cleanup and @gimme_danger
Bug in substring for @view_sql
Bug that Waits session doesn't support object_name
Use @@Procid for @help query
Use Lower on event type to avoid redundancy
Add event type and pattern variables to centralize checks
Format three IF blocks

Considerations For Maintainers

  1. Is @use_like parameter appropriate? Should auto opt-in without an opt-out?
  2. Are you ok supporting the bracket wildcard feature too?
  3. Is leaving out wildcard support for a single underscore ok?
  4. Overall attempts are made to match @database_name and/or @object_name with an exact match first even when wild card characters are found to hopefully not break folks and be helpfu. Is this ok?
  5. Should we incorporate @gimme_danger check for predicates close to 1000 characters? The limit is 3000 characters and MSSQL will complain. Is that enough?
  6. Are you ok taking this without wildcard support for @object_schema?
  7. Are you able to reproduce the error for @event_type = N'waits' using @object_name? Should the procedure raise an error with this or continue as is?
  8. Is it appropriate for the queries deriving the object_id for the blocking @event_type to filter out the is_ms_shipped objects. Users could get around this if not using wildcard because OBJECT_ID is used instead of a query to sys.objects.

Work To Be Done

  1. Generate a set of procedure executions of the varying scenarios for testing.

@mattcargile mattcargile marked this pull request as ready for review October 8, 2025 04:11
@mattcargile mattcargile force-pushed the add-like branch 2 times, most recently from d9c3e44 to 8f9392c Compare October 8, 2025 14:02
@mattcargile mattcargile changed the title feat: Add Wildcard Support, A Few Fixes, And Event Type Check Handling feat: sp_HumanEvents Add Wildcard Support, A Few Fixes, And Event Type Check Handling Oct 8, 2025
@mattcargile mattcargile force-pushed the add-like branch 2 times, most recently from db8cb13 to a2698a7 Compare October 8, 2025 16:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant
0