Add automated documentation for metrics#6114
Conversation
209ebc4 to
c1dea99
Compare
8cf940b to
f21bd98
Compare
|
Hi @varshaprasad96 @machadovilaca, |
|
/assign @varshaprasad96 |
f21bd98 to
b3543dc
Compare
c8b88af to
6b956d7
Compare
varshaprasad96
left a comment
There was a problem hiding this comment.
@avlitman Since the testdata can be regenerated, the existing changes would be overwritten. I think we may still need a plugin to make changes on scaffolding especially the Makefile. Reason being, the testdata/ projects are primarily for users to refer how a sample scaffolding looks like after using the operator-sdk commands. If we make custom changes in Makefile (on top of existing scaffolding, which does not come from a plugin or any commands) then for a new user it maybe confusing to infer the sample project.
6b956d7 to
b9bae1a
Compare
b9bae1a to
67f50f8
Compare
3fe0677 to
be3506a
Compare
|
/ok-to-test |
|
@varshaprasad96 Updated the name to |
|
LGTM. |
|
LGTM |
There was a problem hiding this comment.
The PR looks good overall, except for two things:
- (nit): The log lines and comments which have been modified to
with customizations. I would prefer them to be more specific, like "webhook and metrics" where apt, or just "with webhooks". - The question of moving the common generator code to a library. I'm still curious on whether it would be useful to scaffold those out for every project. I agree that the generator should live in the operator project, but its helpers can still be moved to a common place. We can create an issue and fix that in a follow up.
Rest of it is good to go from my end. Thanks for working on this PR!
/lgtm
@everettraven @jberkhahn could you all take a look at this too before we go ahead and merge this.
| // Note that it should NOT be called in the e2e tests. | ||
| func GenerateSample(binaryPath, samplesPath string) { | ||
| log.Infof("starting to generate Go memcached sample with webhooks") | ||
| log.Infof("starting to generate Go memcached sample with customizations") |
There was a problem hiding this comment.
Nit: Can we improve logs to mention its "with webhooks and metrics documentation" where apt or "with webhooks" otherwise.
There was a problem hiding this comment.
@varshaprasad96 The condition you mean using generateWithMonitoring var?
As for now I changed all to "with webhooks and metrics documentation"
everettraven
left a comment
There was a problem hiding this comment.
Overall I think this looks good. I have a couple comments but they are non-blocking and could be done in a follow-up.
As for now I changed all to "with webhooks and metrics documentation". regarding the condition I need more guidance. In the meanwhile added this to the follow up issue.
I will make sure to add this in a follow up, as well as the README link addition, and the template in metricsdocs @everettraven suggested.
|
|
Hi @sradco @varshaprasad96 @everettraven @jberkhahn. @jberkhahn can you review and (if approved) merge this pr? Thanks all! |
|
/lgtm |
|
@sradco: changing LGTM is restricted to collaborators DetailsIn response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
|
/hold cancel /lgtm |
|
@avlitman Once all the tests pass I will merge. Thanks! |
|
/lgtm |
Jira-Ticket: https://issues.redhat.com/browse/CNV-21334 Signed-off-by: Aviv Litman <alitman@redhat.com> apply the automated documentation for metrics Signed-off-by: Aviv Litman <alitman@redhat.com> Fix according to Joao's review Signed-off-by: Aviv Litman <alitman@redhat.com> Update testdata Signed-off-by: João Vilaça <jvilaca@redhat.com> Update generator code Signed-off-by: João Vilaça <jvilaca@redhat.com> Rename to memcached-with-customization and remove docs bin Signed-off-by: João Vilaça <jvilaca@redhat.com> Fix comments Signed-off-by: Aviv Litman <alitman@redhat.com>
|
/lgtm |
Description of the change:
Add automated documentation for metrics.
The document path is docs/monitoring/metrics.md,
and the document content is created with monitoring/metricsdocs tool.
Motivation for the change:
See up-to-date documentation of all the metrics in one place (name, description, and type).
Note
Maybe we should consider adding the doc under: operator-framework/operator-sdk/tree/master/website/content/en/docs
jira-Ticket: https://issues.redhat.com/browse/CNV-21334
Signed-off-by: Aviv Litman alitman@redhat.com