summaryrefslogtreecommitdiff
path: root/internal/flamegraph/livetrie.go
diff options
context:
space:
mode:
authorPaul Buetow <paul@buetow.org>2026-03-06 16:31:21 +0200
committerPaul Buetow <paul@buetow.org>2026-03-06 16:31:21 +0200
commite2322eeb63efc492bbaf499427afd3592c4836be (patch)
treef1e8de9fe95d55e2bec11fb7b5c2819033063ee5 /internal/flamegraph/livetrie.go
parent96f30bc109818547e456251ad0c25e1e7308e22b (diff)
fix: return errors for unknown counter fields (task 383)
Diffstat (limited to 'internal/flamegraph/livetrie.go')
-rw-r--r--internal/flamegraph/livetrie.go5
1 files changed, 4 insertions, 1 deletions
diff --git a/internal/flamegraph/livetrie.go b/internal/flamegraph/livetrie.go
index 04137bf..e76a806 100644
--- a/internal/flamegraph/livetrie.go
+++ b/internal/flamegraph/livetrie.go
@@ -102,7 +102,10 @@ func (lt *LiveTrie) Ingest(ep *event.Pair) {
// AddRecord adds one already-decoded flamegraph record into the live trie.
func (lt *LiveTrie) AddRecord(record IterRecord) {
- value := record.Cnt.ValueByName(lt.countField)
+ value, err := record.Cnt.ValueByName(lt.countField)
+ if err != nil {
+ return
+ }
lt.mu.Lock()
frames := lt.buildFrames(record)