You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Add caller-supplied invocation_id and 0041 reserved keys (#94)
* Add caller invocation_id + 0041 reserved keys
0039: invoke() accepts a caller-supplied invocation_id (any non-empty
URL-safe string, validated at the boundary); resume still mints a
fresh id. The Langfuse adapter derives the trace.id from a non-UUID id
via SHA-256 (matching create_trace_id) and surfaces the raw id under
trace.metadata.invocation_id; a public langfuse_trace_id() helper
exposes the mapping.
0041: reject caller metadata keys that exactly match an OA-emitted
top-level key (the 8.4 Langfuse set plus invocation_id), at both the
invoke() and mid-invocation set_invocation_metadata() boundaries.
Conformance fixtures (035/036/057, 0041) follow with the spec
submodule bump to v0.31.0.
* Move langfuse_trace_id out of [langfuse] gate
From PR #94 review: langfuse_trace_id is a pure mapping (uuid +
hashlib only) and meant for operator / tooling use (e.g. mapping a
logged invocation_id to a Langfuse trace URL), so gating it behind
the [langfuse] extra was unnecessary.
Move _is_uuid, _to_otel_trace_id, and langfuse_trace_id into a new
langfuse/trace_id.py with no SDK import. adapter.py imports the
internal helpers from there (so its own use and the existing
adapter._to_otel_trace_id test reference are unchanged).
langfuse_trace_id is now exported unconditionally from the langfuse
subpackage.
0 commit comments