Repository navigation
Conversation
…e v4 OTLP Export observations as OTLP spans via POST /api/public/otel/v1/traces with x-langfuse-ingestion-version: 4 and scores via POST /api/public/scores. Emit timed observations once on End() with start and end timestamps, propagate TraceContext attributes to child observations, and preserve HTTP 413 batch splitting.
…put in workers Attach trace context and root span input to flow and assistant background worker contexts so child observations inherit userId, sessionId, tags, and metadata, and restore TraceID when loading existing assistant workers.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Migrates the Langfuse observability client from legacy ingestion events to v4 OTLP exports. Observations are exported once on completion, with trace context, model parameters, usage, costs, and timing mapped to OTLP attributes; scores use the score API.
Preserves trace identity and metadata when flow and assistant workers create detached contexts or reload persisted workers, and supplies input on their initial preparation spans. Updates the default Langfuse web and worker images to v4 and ClickHouse to 26.4 in Compose and the example environment. Exposes the v4 migration settings for both services, retaining native v4 defaults with historic backfill enabled. Documents the staged v3 upgrade, existing environment overrides, and historic data migration.
Validation:
go test ./pkg/observability/langfuse ./pkg/tools ./pkg/controllerpasses. Coverage includes observation types, scores, context propagation, single export on completion, oversized payload splitting, and executor trace relationships.git diff --checkpasses. Docker Compose configuration validates both without an environment file and with.env.example; rendered images and shared migration settings were checked for both web and worker.Review limitation: no live Langfuse v4 instance or Docker upgrade was exercised. Observations now become visible after completion; existing shutdown behavior drops buffered data. Operators should review the Langfuse upgrade procedure before updating a persisted deployment.