Recollect.Telemetry (recollect v0.5.1)

Copy Markdown View Source

Telemetry events emitted by Recollect.

Events

Knowledge Operations

  • [:recollect, :remember, :start] — Entry creation started
  • [:recollect, :remember, :stop] — Entry created successfully
  • [:recollect, :remember, :exception] — Entry creation failed
  • [:recollect, :search, :start] — Search started
  • [:recollect, :search, :stop] — Search completed
  • [:recollect, :search, :exception] — Search failed
  • [:recollect, :search, :vector, :stop] — Vector search completed

Pipeline

  • [:recollect, :pipeline, :start] — Pipeline started
  • [:recollect, :pipeline, :stop] — Pipeline completed
  • [:recollect, :pipeline, :exception] — Pipeline failed

Embedding

  • [:recollect, :embed, :stop] — Embedding completed

Extraction

  • [:recollect, :extract, :stop] — Entity extraction completed

Maintenance

  • [:recollect, :decay, :stop] — Decay pass completed

Learning

  • [:recollect, :learning, :start] — Learning pipeline started
  • [:recollect, :learning, :stop] — Learning pipeline completed
  • [:recollect, :learn, :source, :stop] — Single learner completed

Context

  • [:recollect, :context, :detect, :stop] — Context detection completed

Invalidation

  • [:recollect, :invalidation, :start] — Invalidation started
  • [:recollect, :invalidation, :stop] — Invalidation completed
  • [:recollect, :invalidate, :stop] — Single pattern invalidation completed

Handoffs

  • [:recollect, :handoff, :create, :stop] — Handoff created
  • [:recollect, :handoff, :get, :stop] — Handoff retrieved
  • [:recollect, :handoff, :load, :stop] — Handoff loaded into working memory

Mipmaps

  • [:recollect, :mipmap, :generate, :stop] — Mipmap generation completed

All :stop events include %{duration: native_time} in measurements. All events include relevant metadata (scope_id, owner_id, tier, etc.).

Summary

Functions

Emit a simple event (no span, just measurements + metadata).

Execute a function within a telemetry span.

Functions

event(name, measurements \\ %{}, metadata \\ %{})

Emit a simple event (no span, just measurements + metadata).

span(event_prefix, metadata, fun)

Execute a function within a telemetry span.

Emits event_prefix ++ [:start] before and event_prefix ++ [:stop] after. On exception, emits event_prefix ++ [:exception] and re-raises.

The function result is passed through extract_measurements/1 to pull counts and status into the stop measurements.