AITrace.ExportBounds (AITrace v0.2.0)

Copy Markdown View Source

Bounds trace export metadata and attributes before durable serialization.

The file exporter is a generic trace sink, so it cannot know every upstream schema. This module applies a conservative exporter-local profile: only bounded JSON-safe fields with safe keys are kept inline, while raw payload shaped fields and oversize values are replaced with hashed spillover refs.

Summary

Types

surface()

@type surface() :: :trace_metadata | :span_attributes | :event_attributes

Functions

bound_map!(metadata, opts \\ [])

@spec bound_map!(
  map(),
  keyword()
) :: map()

budget_amount_class()

@spec budget_amount_class() :: map()

capture_profile(atom)

@spec capture_profile(:off | :memory_ring | :redacted_debug | :durable_redacted) ::
  map()

context_packet_compile_class()

@spec context_packet_compile_class() :: map()

cost_amount_ceiling_class()

@spec cost_amount_ceiling_class() :: map()

cost_amount_floor_class()

@spec cost_amount_floor_class() :: map()

eval_verdict_class()

@spec eval_verdict_class() :: map()

guard_violation_excerpt_class()

@spec guard_violation_excerpt_class() :: map()

memory_body_class()

@spec memory_body_class() :: map()

model_call_class()

@spec model_call_class() :: map()

profile()

@spec profile() :: map()

promotion_class()

@spec promotion_class() :: map()

prompt_body_class()

@spec prompt_body_class() :: map()

replay_divergence_excerpt_class()

@spec replay_divergence_excerpt_class() :: map()

rollback_class()

@spec rollback_class() :: map()

route_decision_class()

@spec route_decision_class() :: map()

tombstone_map!(metadata, opts \\ [])

@spec tombstone_map!(
  map(),
  keyword()
) :: map()

Redacts sensitive fields while preserving their keys as GAOP tombstones.