MCPcopy Create free account
hub / github.com/AIScientists-Dev/Flowtrace / random_trace_id

Function random_trace_id

crates/flowtrace-cli/src/id.rs:7–10  ·  view source on GitHub ↗

Random slug fallback for `POST /api/traces` when no id is supplied: `rcp-<16 hex>`. Hyphen (not underscore) so the result satisfies the slug regex in `flowtrace-core::validate`. Human-authored ids go through `trace init ` and look like `iris-analysis`.

()

Source from the content-addressed store, hash-verified

5/// slug regex in `flowtrace-core::validate`. Human-authored ids go through
6/// `trace init <slug>` and look like `iris-analysis`.
7pub fn random_trace_id() -> String {
8 let raw = Uuid::new_v4().simple().to_string();
9 format!("rcp-{}", &raw[..16])
10}

Callers 1

createFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…