Normalize trace/span IDs to lowercase hex for W3C Trace Context spec compliance
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 39.9k
- Forks
- 3.4k
- Avg merge
- 6h 51m
- Merged PRs (30d)
- 232
Description
Feature request
Is your feature request related to a problem?
PostHog currently stores trace and span IDs as uppercase hex (e.g., 5A5222C6...), while the W3C Trace Context specification requires lowercase hex format (e.g., 5a5222c6...).
This creates a correlation problem when using PostHog alongside spec-compliant observability backends like Axiom, OpenTelemetry collectors, or other tracing systems that follow the W3C standard.
Describe the solution you'd like
Normalize trace IDs to lowercase please.
Describe alternatives you've considered
n/a
Additional context
https://posthog.com/questions/posthog-showing-double-encoded-trace-id-and-span-id-in-logs
Debug info
- [x] PostHog Cloud, Debug information: [please copy/paste from https://us.posthog.com/settings/project-details#variables]
- [ ] PostHog Hobby self-hosted with `docker compose`, version/commit: [please provide]
- [ ] PostHog self-hosted with Kubernetes (deprecated, see [`Sunsetting Kubernetes support`](https://posthog.com/blog/sunsetting-helm-support-posthog)), version/commit: [please provide]
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
No files or tests are named. Start by locating the code paths that create or serialize PostHog trace and span IDs, then compare their output with the W3C Trace Context requirements. Done means emitted IDs use lowercase hexadecimal and remain correlatable with spec-compliant tracing backends.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- observability
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 38/100