-
Notifications
You must be signed in to change notification settings - Fork 349
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
Generate metrics reference docs #2124
Closed
lambdanis
wants to merge
12
commits into
cilium:pr/lambdanis/metrics-init-labels
from
lambdanis:pr/lambdanis/metricsmd
Closed
Generate metrics reference docs #2124
lambdanis
wants to merge
12
commits into
cilium:pr/lambdanis/metrics-init-labels
from
lambdanis:pr/lambdanis/metricsmd
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
lambdanis
added
area/documentation
Improvements or additions to documentation
release-note/docs
This PR updates the documentation.
labels
Feb 19, 2024
lambdanis
force-pushed
the
pr/lambdanis/metricsmd
branch
2 times, most recently
from
February 20, 2024 00:38
b46f0bf
to
465cd54
Compare
✅ Deploy Preview for tetragon ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
lambdanis
force-pushed
the
pr/lambdanis/metricsmd
branch
2 times, most recently
from
February 20, 2024 13:01
ceb30a5
to
e28c7c7
Compare
I know it's still a draft but it might be useful for you to check the preview :) Very nice addition, I'll be happy to review. |
lambdanis
force-pushed
the
pr/lambdanis/metricsmd
branch
from
February 28, 2024 12:11
e28c7c7
to
b14215a
Compare
This command utilizes github.com/isovalent/metricstool/pkg/metricsmd to generate a metrics reference. Signed-off-by: Anna Kapuscinska <[email protected]>
`make metrics-docs` generates metrics reference documentation page using `tetra metrics-docs` command. Signed-off-by: Anna Kapuscinska <[email protected]>
Split InitMetrics function into multiple functions to divide metrics into logical groups. Introduce InitMetricsForDocs function used in `tetra metrics-docs` command. There are no functional changes in this commit. This refactoring is a preparation for further improvements in the generated metrics docs. Signed-off-by: Anna Kapuscinska <[email protected]>
Update metrics-docs tetra command and Makefile rule to split metrics reference into three sections: health metrics, resources metrics and events metrics. Signed-off-by: Anna Kapuscinska <[email protected]>
Initialize tetragon_events_total with all possible event types and example process metadata. Initialize tetragon_policy_events_total with example policy and kprobe. Signed-off-by: Anna Kapuscinska <[email protected]>
Initialize tetragon_generic_kprobe_merge_errors_total with all possible error types and example kprobes. Signed-off-by: Anna Kapuscinska <[email protected]>
Initialize tetragon_syscalls_total with example syscall and process metadata. Signed-off-by: Anna Kapuscinska <[email protected]>
observer.bpfCollector doesn't report any metrics if Tetragon isn't fully initialized - so also when we generate metrics docs with tetra. To include observer BPF metrics in metrics docs, let's define a "fake" collector - observer.bpfZeroCollector - reporting same metrics as observer.bpfCollector but with hardcoded zero values. Signed-off-by: Anna Kapuscinska <[email protected]>
eventmetrics.bpfCollector doesn't report any metrics if Tetragon isn't fully initialized - so also when we generate metrics docs with tetra. To include BPF event metrics in metrics docs, let's define a "fake" collector - eventmetrics.bpfZeroCollector - reporting same metrics as eventmetrics.bpfCollector but with hardcoded zero values. Signed-off-by: Anna Kapuscinska <[email protected]>
policyStateCollector doesn't report any metrics if Tetragon isn't fully initialized - so also when we generate metrics docs with tetra. To include policy state metrics in metrics docs, let's define a "fake" collector - policyStateZeroCollector - reporting same metrics as policyStateZeroCollector but with hardcoded zero values. Signed-off-by: Anna Kapuscinska <[email protected]>
Signed-off-by: Anna Kapuscinska <[email protected]>
Signed-off-by: Anna Kapuscinska <[email protected]>
lambdanis
force-pushed
the
pr/lambdanis/metricsmd
branch
from
February 28, 2024 16:36
b14215a
to
187d10a
Compare
lambdanis
changed the base branch from
main
to
pr/lambdanis/metrics-init-labels
February 28, 2024 16:37
lambdanis
requested review from
mtardy,
a team and
willfindlay
as code owners
February 28, 2024 16:41
I'll re-open this PR from a branch in the repo not a fork, so that others can push easily. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
area/documentation
Improvements or additions to documentation
release-note/docs
This PR updates the documentation.
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.
It depends on #2162, so pls review that one first.
It also requires isovalent/metricstool#3 to be merged and then a release of metricstool.
Fixes #1856