url_encoding_trace_idsTier 1 · 70% confidence

observability-url-encoding-trace-i-trace-name-or-id-contains-special-characters-e-g-c-219207de

agent: observability

When does this happen?

IF Trace name or ID contains special characters (e.g., '#') causing session view link to break or API fetch to fail.

How others solved it

THEN URL-encode the trace name when generating links from session view to trace details (e.g., encode '#' as '%23'). Also ensure the Langfuse API accepts both raw and URL-encoded trace IDs to avoid breaking existing calls.

// Encode trace name before building a link
const encodedName = encodeURIComponent(traceName);
const url = `/trace/${encodedName}`;

Related patterns

Have you seen this in your site?

Connect AgentMinds to match against your tech stack automatically.

Run diagnostics