adk_trace_event (erlang_adk v0.10.0)

View Source

Metadata-only projection for developer trace retention.

The trace store accepts the already-versioned observability and workflow lifecycle schemas, but deliberately applies a narrower persistence policy: prompt, response, media, tool argument, and result fields are never retained. The default policy rejects a content-bearing event. A trusted local owner may instead configure prune, which removes those fields and marks the retained wrapper without weakening either source schema validation.

Summary

Types

content_policy/0

-type content_policy() :: reject | prune.

projection/0

-type projection() ::
          #{kind := observability | workflow_lifecycle,
            timestamp_ms := non_neg_integer(),
            identity := map(),
            event := map(),
            content_pruned := boolean()}.

Functions

observability(Event0, Policy)

-spec observability(map(), content_policy()) -> {ok, projection()} | {error, term()}.

workflow_lifecycle(Event0, Policy)

-spec workflow_lifecycle(map(), content_policy()) -> {ok, projection()} | {error, term()}.