Excessibility.TelemetryCapture.Registry (Excessibility v0.14.0)

View Source

Auto-discovers enrichers and analyzers at compile time.

Built-in enrichers are discovered from lib/telemetry_capture/enrichers/ and must implement the Excessibility.TelemetryCapture.Enricher behaviour.

Built-in analyzers are discovered from lib/telemetry_capture/analyzers/ and must implement the Excessibility.TelemetryCapture.Analyzer behaviour.

Custom Plugins

Users can register custom enrichers and analyzers via application config:

# config/test.exs
config :excessibility,
  custom_enrichers: [MyApp.CustomEnricher],
  custom_analyzers: [MyApp.CustomAnalyzer]

Custom modules must implement the appropriate behaviour.

Usage

# Get all enrichers (built-in + custom)
Registry.discover_enrichers()

# Get analyzers that run by default
Registry.get_default_analyzers()

# Get specific analyzer by name
Registry.get_analyzer(:memory)

Summary

Functions

Returns all registered analyzers (built-in + custom).

Returns all registered enrichers (built-in + custom).

Returns all analyzers regardless of default_enabled? status.

Finds analyzer by name.

Returns analyzers that are enabled by default.

Finds enricher by name.

Resolves which enrichers are needed for a set of analyzer names.

Functions

discover_analyzers()

Returns all registered analyzers (built-in + custom).

Custom analyzers can be configured via :custom_analyzers in app config.

discover_enrichers()

Returns all registered enrichers (built-in + custom).

Enrichers run automatically during timeline building. Custom enrichers can be configured via :custom_enrichers in app config.

get_all_analyzers()

Returns all analyzers regardless of default_enabled? status.

get_analyzer(name)

Finds analyzer by name.

Returns nil if not found.

get_default_analyzers()

Returns analyzers that are enabled by default.

These run unless explicitly disabled via --no-analyze flag.

get_enricher(name)

Finds enricher by name.

Returns nil if not found.

resolve_enrichers(analyzer_names)

Resolves which enrichers are needed for a set of analyzer names.

Returns deduplicated list of enricher names.