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

Add L4 protocol label to advanced metrics #239

Open
andreev-io opened this issue Apr 8, 2024 · 2 comments
Open

Add L4 protocol label to advanced metrics #239

andreev-io opened this issue Apr 8, 2024 · 2 comments
Assignees
Labels
area/metrics area/plugins lang/go The Go Programming Language priority/1 P1 type/enhancement New feature or request

Comments

@andreev-io
Copy link

Is your feature request related to a problem? Please describe.
Advanced metrics include packet information such as IP and port. A typical packet 5-tuple is (protocol, src IP, src port, dst IP, dst port) (this would be a 3-tuple in the Local Context mode). This issue is to add the protocol label to such plugins as dropreason and packetparser.

Describe the solution you'd like
The protocol label should be optionally included in such metrics as drop_count, drop_bytes, adv_forward_bytes, adv_forward_count.

Describe alternatives you've considered
N/A

Additional context
N/A

@andreev-io
Copy link
Author

I opened #243 as a placeholder. While working on it, I originally wanted to add protocol configuration to pkg/module/metrics/types.go because I thought I would code protocol up as an additionalLabel metric. However, I saw that the additionalLabel configuration is actually never utilised (correct me if I'm wrong), and labels such as direction (which are said to be "additional" in the documentation) are actually set directly through the module code, e.g. in pkg/module/metrics/forward.go. Following this model, I added my code to forward.go.

Should there be a separate issue for making additionalLabel configuration work?

As for this change, am I approaching it correctly?

@rbtr rbtr added type/enhancement New feature or request lang/go The Go Programming Language area/metrics area/plugins priority/1 P1 labels Apr 8, 2024
@vakalapa
Copy link
Contributor

Yeah the idea was to use additional labels field for optional labels we might need later on. But for this protocol field, current approach makes perfect sense.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/metrics area/plugins lang/go The Go Programming Language priority/1 P1 type/enhancement New feature or request
Projects
Status: In Progress
Development

No branches or pull requests

3 participants