-
Notifications
You must be signed in to change notification settings - Fork 39
feat: Added DQL Metadata like scannedBytes to execute_dql tool #124
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
feat: Added DQL Metadata like scannedBytes to execute_dql tool #124
Conversation
c273fdb
to
32dde77
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.
Left some minor notes, but nothing dramatic.
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.
Pull Request Overview
This PR enhances the execute_dql
tool to provide detailed metadata about query execution, particularly focusing on cost tracking through scanned bytes information. The changes aim to help users understand and monitor their Dynatrace consumption when executing DQL queries.
Key Changes:
- Enhanced DQL execution response to include metadata like scanned bytes, records, execution time, and sampling information
- Added user-friendly formatting with cost warnings based on data usage thresholds
- Updated all DQL-consuming functions to work with the new response structure that includes both records and metadata
Reviewed Changes
Copilot reviewed 8 out of 8 changed files in this pull request and generated 5 comments.
Show a summary per file
File | Description |
---|---|
src/capabilities/execute-dql.ts |
Core enhancement adding metadata extraction, logging, and new return type structure |
src/index.ts |
Updated execute_dql tool to format metadata nicely and handle new response structure; fixed list-problems tool |
src/capabilities/list-vulnerabilities.ts |
Updated to access records from new response structure |
src/capabilities/get-monitored-entity-details.ts |
Updated to access records from new response structure |
src/capabilities/find-monitored-entity-by-name.ts |
Updated to access records from new response structure |
integration-tests/execute-dql.integration.test.ts |
Updated tests to validate new response structure and metadata fields |
README.md |
Enhanced cost documentation with query for tracking usage |
CHANGELOG.md |
Added entry for the new metadata feature |
5df723d
to
6829623
Compare
The goal is to alert the user when too many data are queried via
execute_dql
.For now, we are logging and returning scanned bytes from the API, which the user can also find via DQL:
The result in the tool call:
