-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
Add option to dynamically determine what APIs to query for metrics #10815
Merged
Conversation
This file contains 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
Co-authored-by: Jorie Helwig <jorie.helwig@datadoghq.com>
yzhan289
reviewed
Dec 13, 2021
yzhan289
reviewed
Dec 13, 2021
yzhan289
previously approved these changes
Dec 13, 2021
Co-authored-by: Christine Chen <ChristineTChen@users.noreply.github.com>
The |
ofek
approved these changes
Dec 14, 2021
ChristineTChen
approved these changes
Dec 14, 2021
yzhan289
approved these changes
Dec 14, 2021
cswatt
pushed a commit
that referenced
this pull request
Jan 5, 2022
…10815) * Add test data and limit_reqs endpoint * Add support for new endpoints in check * Update metadata with new metrics * add more tests for tags * Add more tests and http limit conns endpoint * Add tests for all plus api versions * Reformat code and fix typos * Remove unneeded mappings * Remove unneeded mapping and test fixture * Properly handle metrics that should be counts * Change more metrics to count * Fix short names of metrics * Update style and add assertion for all count metrics * Update conf.example with new description * Update test folder structure and add mapping for plus api endpoints * Assert metadata in all tests * Add missing count metrics, assert metrics covered, and refactor tests * Remove slashes in directories * Begin _get_enabled_apis to dynamically determine enabled apis * Add fixtures * Comple _get_enabled_endpoints and add more fixtures and test * Add config models and option * Add more tests for only_query_enabled_endpoints * Update config models and remove conflicts * Update endpoint mapping and fix mock return values * Add comments and more logging * Add more log lines and assert them * Don't mention stream disabled when only_query_enabled_endpoints is enabled * Add another test for edge cases * Use more correct url for test * Apply suggestions from code review Co-authored-by: Jorie Helwig <jorie.helwig@datadoghq.com> * Fix style * Make endpoints a set * Use dd_run_check * Remove unused caplog * Update nginx/assets/configuration/spec.yaml Co-authored-by: Christine Chen <ChristineTChen@users.noreply.github.com> * Sync example config * Use urljoin Co-authored-by: Jorie Helwig <jorie.helwig@datadoghq.com> Co-authored-by: Christine Chen <ChristineTChen@users.noreply.github.com>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
What does this PR do?
Motivation
Some nginx modules and APIs can be disabled, and currently, when they are, their corresponding endpoints are still queried in the integration, and error logs show up in the integration and in nginx logs
Additional Notes
This was tested on an nginx plus server, where stream is not enabled, and
use_plus_api_stream
is enabled. Warning logs are not seenReview checklist (to be filled by reviewers)
changelog/
andintegration/
labels attached