diff --git a/docs/architecture.md b/docs/architecture.md index fea88639..acddfdaf 100644 --- a/docs/architecture.md +++ b/docs/architecture.md @@ -6,6 +6,8 @@ The following graph provides a birds' eye view on how the different components a For more info on each component, please check their corresponding Go docs. + + ### Kernel space ```mermaid @@ -33,21 +35,13 @@ flowchart TD ```mermaid flowchart TD E(ebpf.FlowFetcher) --> |"pushes via
RingBuffer"| RB(flow.RingBufTracer) - style E fill:#990 + style E fill:#4A8 E --> |"polls
HashMap"| M(flow.MapTracer) RB --> |chan *model.Record| ACC(flow.Accounter) RB -.-> |flushes| M - ACC --> |"chan []*model.Record"| DD(flow.Deduper) - M --> |"chan []*model.Record"| DD - - subgraph Optional - DD - end - - DD --> |"chan []*model.Record"| CL(flow.CapacityLimiter) + ACC --> |"chan []*model.Record"| CL(flow.CapacityLimiter) + M --> |"chan []*model.Record"| CL - CL --> |"chan []*model.Record"| DC(flow.Decorator) - - DC --> |"chan []*model.Record"| EX("export.GRPCProto
or
export.KafkaProto
or
export.DirectFLP") + CL --> |"chan []*model.Record"| EX("export.GRPCProto
or
export.KafkaProto
or
export.DirectFLP") ``` diff --git a/pkg/tracer/tracer_legacy.go b/pkg/tracer/tracer_legacy.go index f9a6dfe3..51681d7a 100644 --- a/pkg/tracer/tracer_legacy.go +++ b/pkg/tracer/tracer_legacy.go @@ -25,8 +25,6 @@ func (m *FlowFetcher) legacyLookupAndDeleteMap(met *metrics.Metrics) map[ebpf.Bp log.WithError(err).WithField("flowId", id).Warnf("couldn't delete flow entry") met.Errors.WithErrorName("flow-fetcher-legacy", "CannotDeleteFlows").Inc() } - // We observed that eBFP PerCPU map might insert multiple times the same key in the map - // (probably due to race conditions) so we need to re-join metrics again at userspace flows[id] = model.NewBpfFlowContent(baseMetrics) } met.BufferSizeGauge.WithBufferName("hashmap-legacy-total").Set(float64(count))