LlmCore.Telemetry (llm_core v0.3.0)

Copy Markdown View Source

Helper utilities for emitting telemetry events from llm_core.

Summary

Functions

Executes the provided function within a telemetry span.

Types

metadata()

@type metadata() :: map()

Functions

span(name, metadata, fun)

@spec span(atom(), metadata(), (-> {term(), metadata()})) :: term()

Executes the provided function within a telemetry span.

Emits [:llm_core, name, :start] and [:llm_core, name, :stop] events with duration measurements in native units. If fun raises, an :exception event is emitted with the error details.