How kaligo/event_tracer works
Main Components
a. Core EventTracer Component:
• Configuration module
• Registry mechanism
• Buffer component for optimization
b. Logger Implementations:
• Base Logger
• Appsignal Logger
• Datadog Logger
• DynamoDB Logger
• Prometheus Logger
c. Supporting Components:
• Error Handling System
• Buffering System
• Result Processing
Relationship Flows
┌─────────────────────────────────────────────────────────────────┐
• External Services │
• ┌──────────┐ ┌──────────┐ ┌──────────┐ ┌──────────┐ │
• AppSignal │ │ Datadog │ │ DynamoDB │ │Prometheus│ │
• ┬─────┘ └────┬─────┘ └────┬─────┘ └────┬─────┘ │
• ┼──────────────┼──────────────┼──────────────┼───────────┘
┌───────┼──────────────┼──────────────┼──────────────┼───────────┐
• EventTracer Core │ │ │
• ┌───▼───────────────▼───────────────▼──────────────▼──┐ │
• Registry │ │
• (Manages logger registration and access) │ │
• ┬───────────────────────────────┬─┘ │
• ┌───────────────────▼───────────────┐ ┌──────────▼──┐ │
• Logger Implementations │ │ Buffer │ │
• ┌─────────┐ ┌─────────┐ ┌───────┐ │ │ System │ │
• Base │ │ Metric │ │DynamoDB│ │ └───────────┘ │
• Logger │ │ Loggers │ │Logger │ │ │
• ┘ └─────────┘ └───────┘ │ │
• ┘ │
• ┌───────────────────▼───────────────┐ │
• Error Handling System │ │
• (Configurable Error Handler) │ │
• ┘ │
• ┘
Important Details
a. Configuration Layer:
• How EventTracer.Config interfaces with all components
• Configuration options (app_name, table_name, etc.)
b. Buffer System:
• Buffer_size and flush_interval parameters
• Relationship with DynamoDB logger
c. Metric Types:
• Counter
• Gauge
• Distribution
• Histogram
• Set
Implementation Notes
• Use standardized UML notation where appropriate
• A notes section explaining the async nature of the buffer system
• Annotations for required dependencies (Sidekiq, AWS SDK)
• Error handling flow with the Result object pattern
Integration Points
Clearly mark:
• External service connection points
• Configuration injection points
• Custom logger extension points
• Error handler customization points