-
Notifications
You must be signed in to change notification settings - Fork 23
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
Expose agent label constants #606
Merged
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
mem
approved these changes
Feb 7, 2024
ka3de
force-pushed
the
feat/tenant-labels-limits-agent-labels
branch
from
February 16, 2024 09:57
50bc556
to
c2d29fc
Compare
Extracts the probe setup functions so test is simplified and these can be reused for other scraper tests.
Defines public functions that return the maximum number of labels that can be set for a metric and a log stream. These are static per agent version, therefore are defined as private constants, but are exposed through a public function to make it more "intuitive" to understand that they may vary between agent versions, and also to allow encapsulating logic in these methods in the future if required.
The purpose of this test is to verify that the currently defined constants for max metric and log labels set by the agent still apply and have not changed due to modifications, in which case the constants should be updated.
This should now be done in the API taking into account the particular tenant limits.
ka3de
force-pushed
the
feat/tenant-labels-limits-agent-labels
branch
from
March 6, 2024 10:17
c2d29fc
to
5e12d74
Compare
ka3de
added a commit
that referenced
this pull request
Mar 18, 2024
* Expose agent label constants (#606) Signed-off-by: ka3de <danijs12@hotmail.com>
Merged
ka3de
added a commit
that referenced
this pull request
Mar 18, 2024
* Expose agent label constants (#606) Signed-off-by: ka3de <danijs12@hotmail.com>
This pull request was closed.
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.
This PR makes modifications to the agent in order to expose how many max labels are associated for any metric and log for each of the supported probes. For example, how many labels are associated at max for any metric from the ones reported when running an HTTP probe.
This information is required in order to validate that the check labels set from the API will not exceed the particular tenant limits for the metrics and logs backends (e.g.: mimir and loki).
A change in the number of max labels being generated from the agent could potentially make some check exceed the tenant limits, therefore there is a test in place (
TestValidateLabels
) which should alert us to update the values and review the tenant limits and possibly take some actions prior to the release. Other possible strategies such as giving extra room when defining the max number of check labels allowed should be taken into account from the API.Updates https://github.com/grafana/synthetic-monitoring/issues/5