-
Notifications
You must be signed in to change notification settings - Fork 24
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
NETOBSERV-333: GRPC ingest metrics #223
Conversation
@mariomac - is it possible to include |
@memodi adding it |
Codecov Report
@@ Coverage Diff @@
## main #223 +/- ##
==========================================
+ Coverage 60.96% 61.28% +0.31%
==========================================
Files 66 66
Lines 3784 3833 +49
==========================================
+ Hits 2307 2349 +42
- Misses 1336 1339 +3
- Partials 141 145 +4
Flags with carried forward coverage won't be shown. Click here to find out more.
Continue to review full report at Codecov.
|
} | ||
trafficLabels := prometheus.Labels{ | ||
"type": "protobuf", | ||
"remote_ip": remoteIP, |
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.
Isn't there an issue with cardinality when adding IPs to the labels?
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 does not refer to the IPs in the flow but the IP of the eBPF agents. The number of remote IPs should be small (one agent per node).
I added this field to replicate the behavior of the equivalent metric in the IPFIX ingestor.
pkg/pipeline/ingest/ingest_grpc.go
Outdated
flowDecoderCount = flow.DecoderStats.With( | ||
prometheus.Labels{"worker": "", "name": "protobuf"}) | ||
processDelaySummary = flow.NetFlowTimeStatsSum.With( | ||
prometheus.Labels{"version": "protobuf1.0", "router": ""}) |
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.
Maybe move protobuf1.0
to const ???
pkg/pipeline/ingest/ingest_grpc.go
Outdated
// Prometheus metrics describing the performance of the eBPF ingest | ||
var ( | ||
flowDecoderCount = flow.DecoderStats.With( | ||
prometheus.Labels{"worker": "", "name": "protobuf"}) |
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.
maybe move protobuf
to const ... or change to GRPC
instead
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.
Minor comments. LGTM
Implements the following metrics that are already implemented by the IPFIX ingestor:
It does not implement the following metrics:
flow_traffic_bytes
, because it's equivalent to existingflow_traffic_summary_size_bytes_sum
.flow_process_nf_count
, because it's equivalent to existingingest_collector_flow_logs_processed
.flow_process_nf_flowset_sum
andflow_process_nf_flowset_records_sum
because the GRPC+Protobuf service does not have different message types as IPFIX (DataFlowSet, OptionsDataFlowSet, TemplateFlowSet, etc...). All the values here would be equivalent toingest_collector_flow_logs_processed
.flow_process_nf_templates_count
because GRPC+Protobuf does not use templates.flow_traffic_packets_counter
because GRPC does not work at packet level and there is no affordable way to inspect GRPC communication at IP/TCP level.flow_summary_decoding_time
because GRPC+Protobuf does not provide an affordable way to inspect the raw-->object decoding time.ingest_collector_queue_length
value will be always 0, since GRPC ingestor does not implement any internal queue to batch/forward the flow records.Also, the
flow_decoder_count
might have very different values as for the IPFIX scenario. This metric specifies how many messages have been decoded. In IPFIX, its value would be the same asingest_collector_flow_logs_processed
, as Goflow2 decodes each flow record individually. In GRPC+Protobuf (eBPF agent), this value would be much lower because flow records are sent in big batches.