From abe075010de56d432ff062ab2b8c65c7b0d6b34c Mon Sep 17 00:00:00 2001 From: Joel Takvorian Date: Fri, 20 Dec 2024 12:16:52 +0100 Subject: [PATCH] Remove obsolete comment + update arch chart --- docs/architecture.md | 18 ++++++------------ pkg/tracer/tracer_legacy.go | 2 -- 2 files changed, 6 insertions(+), 14 deletions(-) diff --git a/docs/architecture.md b/docs/architecture.md index fea88639..dc7e75c7 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:#7CA 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))