Skip to content
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

Improve metrics library to enforce best practices #2376

Closed
lambdanis opened this issue Apr 25, 2024 · 1 comment · Fixed by #2606
Closed

Improve metrics library to enforce best practices #2376

lambdanis opened this issue Apr 25, 2024 · 1 comment · Fixed by #2606
Assignees
Labels
area/metrics Related to prometheus metrics

Comments

@lambdanis
Copy link
Contributor

There were many changes made recently to improve how Prometheus metrics are defined and managed in Tetragon:

Metrics now seem to be in a decent place. However, it's not intuitive for developers how to define them. Things like labels configuration, initialization and separate helpers for docs can be confusing.

The goal of this issue is to extend pkg/metrics library to provide an intuitive interface for defining metrics following best practices. Ideally we should also write dev docs and add metrics linting to CI.

@lambdanis lambdanis added the area/metrics Related to prometheus metrics label Apr 25, 2024
@lambdanis lambdanis self-assigned this Apr 25, 2024
@lambdanis lambdanis changed the title Intuitive metrics library Improve metrics library to enforce best practices Apr 25, 2024
lambdanis added a commit to lambdanis/tetragon that referenced this issue Jun 17, 2024
Fixes cilium#2376

Signed-off-by: Anna Kapuscinska <[email protected]>
lambdanis added a commit to lambdanis/tetragon that referenced this issue Jun 17, 2024
Fixes: cilium#2376

Signed-off-by: Anna Kapuscinska <[email protected]>
lambdanis added a commit to lambdanis/tetragon that referenced this issue Jun 21, 2024
Details of the goals and implementation of the metrics library are documented
in pkg/metrics/doc.go and in the code doc comments.

Fixes: cilium#2376

Signed-off-by: Anna Kapuscinska <[email protected]>
lambdanis added a commit to lambdanis/tetragon that referenced this issue Jun 21, 2024
Details of the goals and implementation of the metrics library are documented
in pkg/metrics/doc.go and in the code doc comments.

Fixes: cilium#2376

Signed-off-by: Anna Kapuscinska <[email protected]>
lambdanis added a commit to lambdanis/tetragon that referenced this issue Jun 21, 2024
Details of the goals and implementation of the metrics library are documented
in pkg/metrics/doc.go and in the code doc comments.

Fixes: cilium#2376

Signed-off-by: Anna Kapuscinska <[email protected]>
lambdanis added a commit to lambdanis/tetragon that referenced this issue Jun 21, 2024
Details of the goals and implementation of the metrics library are documented
in pkg/metrics/doc.go and in the code doc comments.

Fixes: cilium#2376

Signed-off-by: Anna Kapuscinska <[email protected]>
lambdanis added a commit to lambdanis/tetragon that referenced this issue Jun 21, 2024
Details of the goals and implementation of the metrics library are documented
in pkg/metrics/doc.go and in the code doc comments.

Fixes: cilium#2376

Signed-off-by: Anna Kapuscinska <[email protected]>
lambdanis added a commit to lambdanis/tetragon that referenced this issue Jun 22, 2024
Details of the goals and implementation of the metrics library are documented
in pkg/metrics/doc.go and in the code doc comments.

Fixes: cilium#2376

Signed-off-by: Anna Kapuscinska <[email protected]>
lambdanis added a commit to lambdanis/tetragon that referenced this issue Jun 22, 2024
Details of the goals and implementation of the metrics library are documented
in pkg/metrics/doc.go and in the code doc comments.

Fixes: cilium#2376

Signed-off-by: Anna Kapuscinska <[email protected]>
lambdanis added a commit to lambdanis/tetragon that referenced this issue Jun 24, 2024
This is a general rewrite of pkg/metrics library, but it a fully backwards
compatible way. Goals and key components are described in doc.go, so I won't
repeat them here.

Fixes: cilium#2376

Signed-off-by: Anna Kapuscinska <[email protected]>
lambdanis added a commit to lambdanis/tetragon that referenced this issue Jun 24, 2024
This is a general rewrite of pkg/metrics library, but it a fully backwards
compatible way. Goals and key components are described in doc.go, so I won't
repeat them here.

Fixes: cilium#2376

Signed-off-by: Anna Kapuscinska <[email protected]>
lambdanis added a commit to lambdanis/tetragon that referenced this issue Jun 28, 2024
This is a general rewrite of pkg/metrics library, but it a fully backwards
compatible way. Goals and key components are described in doc.go, so I won't
repeat them here.

Fixes: cilium#2376

Signed-off-by: Anna Kapuscinska <[email protected]>
lambdanis added a commit that referenced this issue Jul 3, 2024
This is a general rewrite of pkg/metrics library, but it a fully backwards
compatible way. Goals and key components are described in doc.go.

Fixes: #2376

Signed-off-by: Anna Kapuscinska <[email protected]>
lambdanis added a commit that referenced this issue Jul 3, 2024
This is a general rewrite of pkg/metrics library, but it a fully backwards
compatible way. Goals and key components are described in doc.go.

Fixes: #2376

Signed-off-by: Anna Kapuscinska <[email protected]>
lambdanis added a commit that referenced this issue Jul 19, 2024
This is a general rewrite of pkg/metrics library, but it a fully backwards
compatible way. Goals and key components are described in doc.go.

Fixes: #2376

Signed-off-by: Anna Kapuscinska <[email protected]>
lambdanis added a commit that referenced this issue Jul 19, 2024
This is a general rewrite of pkg/metrics library, but it a fully backwards
compatible way. Goals and key components are described in doc.go.

Fixes: #2376

Signed-off-by: Anna Kapuscinska <[email protected]>
lambdanis added a commit that referenced this issue Jul 22, 2024
This is a general rewrite of pkg/metrics library, but it a fully backwards
compatible way. Goals and key components are described in doc.go.

Fixes: #2376

Signed-off-by: Anna Kapuscinska <[email protected]>
@lambdanis
Copy link
Contributor Author

lambdanis commented Aug 7, 2024

Here's the proposal for Tetragon metrics framework: https://docs.google.com/document/d/1oP0hZ_yKHqflhRJdpIzaoIUzniCrKQz6_L1sxw1JVYA/edit?usp=sharing

The library part is merged: #2606

The next steps are refactoring existing metrics to fully use it. This is tracked in a dedicated project: https://github.com/orgs/cilium/projects/57

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/metrics Related to prometheus metrics
Projects
Development

Successfully merging a pull request may close this issue.

1 participant