ElixirScope.Capture.EventCorrelator (elixir_scope v0.0.1)
EventCorrelator establishes causal relationships between events in the ElixirScope execution cinema system.
Key responsibilities:
- Correlate function call entry/exit events using call stacks
- Correlate message send/receive events
- Maintain correlation state with automatic cleanup
- Provide correlation chains for debugging and analysis
- Track correlation metrics and health status
The correlator uses ETS tables for fast correlation state management:
- Call stacks per process for function correlation
- Message registry for message correlation
- Correlation metadata for tracking and cleanup
- Correlation links for establishing relationships
Performance targets:
- <500ns per event correlation
- Support for 10,000+ events/second
- Memory-bounded with automatic cleanup
Summary
Functions
Returns a specification to start this module under a supervisor.
Manually triggers cleanup of expired correlations.
Correlates multiple events in batch for better performance.
Correlates a single event, establishing causal relationships.
Gets the correlation chain for a given correlation ID.
Gets correlation metadata for a given correlation ID.
Gets correlation metrics.
Gets the current state (for testing).
Performs a health check.
Starts the EventCorrelator with the given configuration.
Gracefully stops the correlator.
Functions
Returns a specification to start this module under a supervisor.
See Supervisor
.
Manually triggers cleanup of expired correlations.
Correlates multiple events in batch for better performance.
Correlates a single event, establishing causal relationships.
Gets the correlation chain for a given correlation ID.
Gets correlation metadata for a given correlation ID.
Gets correlation metrics.
Gets the current state (for testing).
Performs a health check.
Starts the EventCorrelator with the given configuration.
Gracefully stops the correlator.