Skip to main content
dataframer-journey is a small Python library that reads the journey id off incoming requests and stamps it onto every Langfuse trace your service creates, no need to pass it around manually. Pair it with the browser SDK, which is what generates the journey id in the first place.

Install

Zero runtime dependencies. It only patches libraries you already have installed (requests, httpx, langfuse).

Set up

That’s it. From here on, one call is doing three things for you:
  1. Reading it in: the journey id is read off each incoming request (header or cookie) into request-local context.
  2. Passing it along: every outgoing requests/httpx call to another service automatically carries the id forward, so a multi-service call chain stays connected.
  3. Stamping traces: every Langfuse trace your code creates during that request gets metadata.journey_id set automatically, plus a journey:<id> tag.

Non-HTTP entry points

Queue consumers and scheduled jobs don’t go through a middleware, so pull the id from your payload yourself:
Supports Langfuse v2 SDK only. Langfuse v3 (OpenTelemetry-based) and LangSmith aren’t supported yet. Using either means traces won’t be auto-stamped, and the library logs a warning so you’ll notice.

CORS

This library doesn’t add anything to CORS by itself, it just reads whatever id it’s given. If your frontend and backend are on different domains, the header allowance you need is on the browser SDK page. Same-domain setups need nothing.

Next steps

Browser SDK

Generate the journey id in your frontend and send user events.