code wiki / _hdl_build / nx_apistack_trace.nx

nx_apistack_trace.nx

buildroot/runtime/_hdl_build/nx_apistack_trace.nx

1524 B35 linesdepth 2pulls 2 transitivereach 1 importersview sourcekind librarytopic apistack
docsdependenciesstructsconstsfunctions

about

nx_apistack_trace.nx -- CAP-API-TRACE: distributed tracing for /api via W3C traceparent "00-<32hex trace-id>-<16hex span-id>-01". Trace/span ids are DERIVED DETERMINISTICALLY from a seed (FNV-1a), so a given request context reproduces byte-identical trace ids -- reproducible traces, the sovereign exceed over random-id tracers. Pure integer, no float, no external collector. license_tier: ORIGINAL

dependencies 1 imports · 1 importers

nx_syscalls.nx nx_apistack_trace.nx nx_apistack_trace_gate.nx

imports: nx_syscalls.nx

imported by: nx_apistack_trace_gate.nx

structs

none

consts

6const K_MAGIC_3750763034362895579: i64 = 3750763034362895579
7const K_MAGIC_1099511628211: i64 = 1099511628211

functions

9func tr_fnv(x: i64) -> i64
called by 1: tr_traceparent
15func tr_hex16(h: i64, out: *u8, off: i64) -> i64
called by 1: tr_traceparent
21func tr_cat(out: *u8, off: i64, s: *u8) -> i64 { var i: i64=0; while s[i]!=(0 as u8){out[off+i]=s[i];i=i+1} return off+i }
called by 1: tr_traceparent
24func tr_traceparent(out: *u8, seed: i64) -> i64
called by 1: main calls 3: tr_fnvtr_cattr_hex16