correlator

package
v0.8.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 20, 2026 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func EnrichFromOTEL

func EnrichFromOTEL(agents []agent.Agent, store OTELLookup) []agent.Agent

EnrichFromOTEL fills in subagent labels and creates virtual agent entries for in-process subagents that don't have their own PID.

For each parent agent with a SessionID, it queries the OTEL store for distinct agent_id values. If a subagent ID doesn't already exist as a process-tree-tagged agent, a virtual entry is created with ParentPID set to the parent's PID.

func TagFromProcessTree

func TagFromProcessTree(agents []agent.Agent, getParentPID ParentPIDFunc)

TagFromProcessTree walks the PID ancestry of each agent. If an agent's ancestor PID matches another agent's PID, it's tagged as a subagent with ParentPID set. Used for tmux-based Agent Teams where subagents have their own PIDs.

Types

type OTELLookup

type OTELLookup interface {
	SubagentInfoBySession(sessionID string) subagent.Info
	SubagentsBySession(sessionID string) []subagent.Info
}

OTELLookup is the minimal interface the correlator needs from the OTEL store.

type ParentPIDFunc

type ParentPIDFunc func(pid int) int

ParentPIDFunc returns the parent PID for a given PID.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL