adk_genai_semconv (erlang_adk v0.7.0)

View Source

Metadata-only OpenTelemetry GenAI semantic-convention projection.

The upstream GenAI conventions are still marked Development. This module pins Erlang ADK's mapping independently of any OpenTelemetry SDK so an application can choose when to translate these attributes into spans, metrics, or logs. Prompt, response, media, tool arguments and tool results are intentionally not accepted by the mapper.

Summary

Functions

Build a bounded, content-free attribute map for one operation.

Return only labels suitable for bounded metric streams. IDs, raw errors and user/session values are excluded even if present in the input.

Functions

attributes(Operation0, Context, Details)

-spec attributes(atom() | binary(), map(), map()) -> {ok, map()} | {error, term()}.

Build a bounded, content-free attribute map for one operation.

mapping_version()

-spec mapping_version() -> binary().

metric_labels(Attributes)

-spec metric_labels(map()) -> {ok, map()} | {error, term()}.

Return only labels suitable for bounded metric streams. IDs, raw errors and user/session values are excluded even if present in the input.