// Documentation
Python SDK reference.
cosmonapse Python package - verified against packages/python-sdk. If something here disagrees with the code, the code wins.
SDK · 11
ID helpers
Both helpers return prefixed ULIDs as defined in the spec. They sort lexicographically by creation time.
function
new_trace_id() -> strGenerate a new trace_id of the form "trc_01JV…". Use at the start of any externally-triggered request so HTTP/CLI/test inputs can be correlated end-to-end.
function
new_event_id() -> strGenerate a new event id of the form "evt_01JV…". The SDK calls this internally on every emitted Signal; you only need it for hand-built envelopes.
from cosmonapse import new_trace_id, new_event_id trace = new_trace_id() # "trc_01JV..." - prefixed ULID eid = new_event_id() # "evt_01JV..." - prefixed ULID # ULIDs sort lexicographically by creation time. # Call new_trace_id() at the top of any externally-triggered request # so you can correlate Doppler output with HTTP request IDs.
Have a feature in mind?
The protocol, SDKs, and CLI are still pre-1.0. If something here is missing, ambiguous, or wrong - open an issue and propose a change. Every breaking change is debated in DECISIONS.md first.