Skip to content

[pull] main from apache:main#188

Merged
pull[bot] merged 1 commit into
sudoevans:mainfrom
apache:main
Jul 24, 2026
Merged

[pull] main from apache:main#188
pull[bot] merged 1 commit into
sudoevans:mainfrom
apache:main

Conversation

@pull

@pull pull Bot commented Jul 24, 2026

Copy link
Copy Markdown

See Commits and Changes for more details.


Created by pull[bot] (v2.0.0-alpha.4)

Can you help keep this open source service alive? 💖 Please sponsor : )

* feat: add Langfuse integration (LangfuseBridge) (#206)

Implements all features scoped in #206 via lifecycle hooks, built on
OpenTelemetryBridge and the OTel-native Langfuse SDK:

- One trace per application execution call (via the #203 interface)
- One span per step; one span per __tracer span call
- State observations: action inputs/read state and results/written state
  as observation input/output (capture_state=False to disable);
  log_attributes as observation metadata
- Access to the Langfuse client via bridge.langfuse_client
- app_id/partition_key map to Langfuse session/user (overridable)
- Injects a should_export_span filter so Burr spans survive langfuse
  v4's default LLM-only export filtering (public: burr_span_export_filter)

Uses the OTel bridge instead of the tracking/client.py pattern per the
issue thread (May 31): the SDK's OTel rewrite and the closure of #205
made this the cleaner path, and it nests third-party OTel LLM
instrumentation inside step spans automatically.

Includes tests, docs, a runnable example, and a langfuse pyproject extra.

* fix: JSON-serialize complex logged attributes for Langfuse metadata

OTel attributes reject sequences of non-primitives, so list-of-dict values
(e.g. chat_history logged by @trace) were dropped with a warning. Complex
values are now JSON-serialized into observation metadata.

* fix(langfuse): preserve OTel provider context

Route Burr spans through custom tracer providers and propagate session and user attributes to child instrumentation. Serialize mixed-type sequences before passing them to OpenTelemetry.

* fix: import propagate_attributes defensively for langfuse<3.9

Propagate_attributes was added in langfuse 3.9.0 and  Python 3.9 CI resolves an older 3.x (v4 requires py3.10+), so the unconditional import failed and was masked as 'plugin missing'. Falls back to per-span session/user attributes on older SDKs, with a regression test.

* fix(langfuse): support v3 attribute API

Langfuse 3.7 is the latest SDK available on Python 3.9 and does not export propagate_attributes. Fall back to per-span legacy attributes.

---------

Co-authored-by: jernejfrank <jernej@safeintelligence.ai>
@pull pull Bot locked and limited conversation to collaborators Jul 24, 2026
@pull pull Bot added the ⤵️ pull label Jul 24, 2026
@pull
pull Bot merged commit 805131a into sudoevans:main Jul 24, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant