-
Notifications
You must be signed in to change notification settings - Fork 35
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
Make collection of Prometheus data be controlled by an annotation. #315
Conversation
Currently we automatically collect Prometheus data for PSM related tests, now some regular tests (same scenario as PSM test) are also part of the PSM tests, we may want to collect Prometheus data for those regular tests too. The current method for checking if a rest is a PSM test to check the existence of xds-server and sidecar containers. It is hard to apply the same mechanism for PSM related regular tests, the simplest way is to add an annotation like `enablePrometheus:true` to control if we want to use Prometheus for a given test.
ae358bc
to
b5036e9
Compare
3d2a363
to
8da69cf
Compare
8da69cf
to
408e82a
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.
I would also modify the PSM examples to add the enablePrometheus
annotation, and modify the kokoro jobs to include it.
I also notice that there is no mention of Prometheus in the README files, we should update the documentation as well (perhaps as a separate PR).
81a181f
to
14bd481
Compare
The loadtest_examples.sh are updated in grpc/grpc#30452 All examples from this PR are generated by loadtest_examples.sh. |
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.
This is fine, but you need to update the description to match.
Currently we automatically collect Prometheus data for PSM
related tests, now some regular tests (same scenario as PSM
test) are also part of the PSM tests, we may want to collect
Prometheus data for those regular tests too. The current method
for checking if a test isPSM related is to check the existence of
xds-server and sidecar containers.
The default behavior is to not collect any Prometheus data.
This PR adds an annotation
enablePrometheus
toelect to collect Prometheus data, once this annotation is
set to
true
in a LoadTest configuration, thePrometheus data would be collected for that particular test.