-
Notifications
You must be signed in to change notification settings - Fork 1.3k
dynatrace: Support DQL #7376
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
base: main
Are you sure you want to change the base?
dynatrace: Support DQL #7376
Conversation
Signed-off-by: Jorge Turrado <jorge_turrado@hotmail.es>
|
Thank you for your contribution! 🙏 Please understand that we will do our best to review your PR and give you feedback as soon as possible, but please bear with us if it takes a little longer as expected. While you are waiting, make sure to:
Once the initial tests are successful, a KEDA member will ensure that the e2e tests are run. Once the e2e tests have been successfully completed, the PR may be merged at a later date. Please be patient. Learn more about our contribution guide. |
|
/run-e2e dynatrace |
✅ Snyk checks have passed. No issues have been found so far.
💻 Catch issues earlier using the plugins for VS Code, JetBrains IDEs, Visual Studio, and Eclipse. |
Signed-off-by: Jorge Turrado <jorge_turrado@hotmail.es>
Signed-off-by: Jorge Turrado <jorge_turrado@hotmail.es>
|
/run-e2e dynatrace |
Signed-off-by: Jorge Turrado <jorge_turrado@hotmail.es>
|
/run-e2e dynatrace |
|
/run-e2e dynatrace |
Signed-off-by: Jorge Turrado <jorge_turrado@hotmail.es>
|
/run-e2e dynatrace |
Signed-off-by: Jorge Turrado <jorge_turrado@hotmail.es>
Signed-off-by: Jorge Turrado <jorge_turrado@hotmail.es>
|
PTAL @rickbrouwer |
Signed-off-by: Jorge Turrado <jorge_turrado@hotmail.es>
|
/run-e2e dynatrace |
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 pull request adds support for Dynatrace Query Language (DQL) to the Dynatrace scaler, allowing users to query metrics using DQL in addition to the existing metricSelector approach. The implementation introduces a new query execution and polling mechanism for asynchronous DQL query processing.
Changes:
- Added DQL query support with polling-based result retrieval mechanism
- Introduced new metadata fields for DQL configuration (query, queryTimeoutSeconds, queryPollingWait, queryPollingTries)
- Made metricSelector and query mutually exclusive with proper validation
Reviewed changes
Copilot reviewed 4 out of 6 changed files in this pull request and generated 6 comments.
Show a summary per file
| File | Description |
|---|---|
| pkg/scalers/dynatrace_scaler.go | Core implementation of DQL query execution and polling logic, including new metadata fields and validation |
| pkg/scalers/dynatrace_scaler_test.go | Unit tests for DQL query execution covering various success and failure scenarios |
| tests/scalers/dynatrace_dql/dynatrace_dql_test.go | End-to-end integration tests for the DQL scaler functionality |
| schema/generated/scalers-schema.yaml | Schema updates adding new DQL-related parameters |
| schema/generated/scalers-schema.json | JSON schema updates mirroring the YAML changes |
| CHANGELOG.md | Changelog entry documenting the new DQL querying feature |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> Signed-off-by: Jorge Turrado Ferrero <Jorge_turrado@hotmail.es>
|
/run-e2e dynatrace |
|
Quick concern about the But if it must remain, I think it ignores context cancellation and blocks reconciliation for up to 5s (5x1s). Should this use |
Signed-off-by: Jorge Turrado <jorge_turrado@hotmail.es>
Signed-off-by: Jorge Turrado <jorge_turrado@hotmail.es>
actually, it makes sense since it's a configurable thing. I used the "rude for" because initially the values were fixed, but as soon as I've exposed them, I think that using select+after makes sense totally because a user could set crazy waiting times and cancelling the loop is needed. I've updated the code :) |
|
/run-e2e dynatrace |
Checklist
make generate-scalers-schemahas been run to update any outdated generated files.Fixes #7377