Documentation
¶
Overview ¶
Package flowviz builds bounded, privacy-preserving funnel and transition visualizations from pseudonymous sessions and registered route templates.
Index ¶
Constants ¶
View Source
const ( SchemaVersion = 1 MaxConfigBytes = 64 << 10 MaxConfigNesting = 32 MaxStructuralBytes = 4096 MaxFunnels = 16 MaxStepsPerFunnel = 16 MaxNodeBytes = 512 DefaultMaxNodes = 16 DefaultMaxEdges = 48 DefaultMaxSessions = 10000 HardMaxNodes = 32 HardMaxEdges = 128 HardMaxSessions = 10000 ModeOrdered = "ordered" )
View Source
const ( EnvMode = "ISUTOOLS_FLOW_VIZ" EnvConfig = "ISUTOOLS_FUNNEL_CONFIG" EnvMaxNodes = "ISUTOOLS_FLOW_MAX_NODES" EnvMaxEdges = "ISUTOOLS_FLOW_MAX_EDGES" StatusReady = "ready" StatusDisabled = "disabled" StatusPartial = "partial" )
View Source
const OtherNode = "(other)"
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Aggregator ¶
type Aggregator struct {
// contains filtered or unexported fields
}
func New ¶
func New(options Options) (*Aggregator, error)
func (*Aggregator) Enabled ¶
func (a *Aggregator) Enabled() bool
func (*Aggregator) Observe ¶
func (a *Aggregator) Observe(event Event)
func (*Aggregator) Reset ¶
func (a *Aggregator) Reset()
func (*Aggregator) Snapshot ¶
func (a *Aggregator) Snapshot(transitions []Transition) Snapshot
type Config ¶
type Config struct {
Version int `json:"version" yaml:"version"`
Funnels []FunnelDefinition `json:"funnels,omitempty" yaml:"funnels,omitempty"`
}
func LoadConfig ¶
LoadConfig reads one regular, single-link, bounded YAML or JSON file. Error messages are stable codes and never include configuration contents.
type FunnelDefinition ¶
type FunnelDefinition struct {
ID string `json:"id" yaml:"id"`
Scenario string `json:"scenario" yaml:"scenario"`
Mode string `json:"mode" yaml:"mode"`
Within string `json:"within,omitempty" yaml:"within,omitempty"`
Steps []StepDefinition `json:"steps" yaml:"steps"`
}
type FunnelSnapshot ¶
type FunnelSnapshot struct {
ID string `json:"id"`
Scenario string `json:"scenario"`
Mode string `json:"mode"`
Within string `json:"within,omitempty"`
Entered int64 `json:"entered"`
Completed int64 `json:"completed"`
Expired int64 `json:"expired,omitempty"`
ConversionBP int64 `json:"conversion_basis_points"`
Steps []FunnelStepSnapshot `json:"steps"`
}
type FunnelStepSnapshot ¶
type FunnelStepSnapshot struct {
ID string `json:"id"`
Route string `json:"route"`
Sessions int64 `json:"sessions"`
Requests int64 `json:"requests"`
DropOff int64 `json:"drop_off"`
Retries int64 `json:"retries"`
Status4xx int64 `json:"status_4xx"`
Status5xx int64 `json:"status_5xx"`
RequestP95 time.Duration `json:"request_p95_ns"`
FromStartBP int64 `json:"from_start_basis_points"`
FromPreviousBP int64 `json:"from_previous_basis_points"`
}
type GraphSnapshot ¶
type GraphSnapshot struct {
Nodes []GraphNode `json:"nodes,omitempty"`
Edges []GraphEdge `json:"edges,omitempty"`
InputEdges int `json:"input_edges"`
HiddenCount int64 `json:"hidden_count,omitempty"`
Dropped int64 `json:"dropped,omitempty"`
Truncated bool `json:"truncated,omitempty"`
Partial bool `json:"partial,omitempty"`
}
func BuildGraph ¶
func BuildGraph(transitions []Transition, maxNodes, maxEdges int) GraphSnapshot
func (GraphSnapshot) Canonical ¶
func (g GraphSnapshot) Canonical() string
type Snapshot ¶
type Snapshot struct {
Status string `json:"status"`
Reason string `json:"reason,omitempty"`
Partial bool `json:"partial,omitempty"`
SessionDropped int64 `json:"session_dropped,omitempty"`
TimingMissing int64 `json:"timing_missing,omitempty"`
Funnels []FunnelSnapshot `json:"funnels,omitempty"`
Graph GraphSnapshot `json:"graph"`
}
func CloneSnapshot ¶
CloneSnapshot returns a deep copy suitable for immutable run handoff.
type StepDefinition ¶
type Transition ¶
Click to show internal directories.
Click to hide internal directories.