Skip to content

Sync with upstream langfuse v1.2.1, keeping our backlog fix and agent-type tags - #2

Merged
miguel-border merged 49 commits into
mainfrom
sync/upstream-v1.2.1
Oct 12, 2026
Merged

miguel-border merged 49 commits into
mainfrom
sync/upstream-v1.2.1

Conversation

@miguel-border

Copy link
Copy Markdown
Collaborator

What

  • Upstream merged: langfuse/claude-observability-plugin main (v1.2.1) is merged in. Our fork was 47 commits behind.
  • Conflicts: wherever upstream and the fork disagreed, I took upstream's code.
  • Result: the fork is now 0 behind / 5 ahead of upstream.

Upstream gains that matter for TopCode

Fork changes kept

  • Backlog fix from PR Stop silently dropping spans when a firing uploads a backlog of turns #1:
    • per-turn flush on multi-turn firings;
    • CC_LANGFUSE_FLUSH_TIMEOUT_S;
    • 600 s hook timeouts;
    • the OTEL_BSP_MAX_QUEUE_SIZE default.
    • The queue default sat in a conflicting hunk, so I restored it by hand in the second commit.
  • agent:<type> trace tags (12fef13): these also sat in a conflicting hunk and were restored by hand. They now come before the operator tags.

Tests

  • 285 passed, 1 failed.
  • The one failure is upstream's own: tests/integration/test_state_lock_contention.py::test_entry_of_another_session_survives_the_emit also fails on a clean upstream/main checkout (278 passed, 1 failed). The merge did not introduce it.

Not in this PR

  • Marketplace name: .claude-plugin/marketplace.json still names the marketplace langfuse-observability. TopCode's settings enable …@langfuse-observability-fork, so /plugin marketplace add of this repo still produces an id our settings don't match. This is a separate decision.
  • Backlog fix upstream: the same fix could be offered to langfuse.

🤖 Generated with Claude Code

milanagm and others added 30 commits August 5, 2026 11:08
…numbering

feat(hook): drop numbering from LLM call observation names
…rable-state-dir

fix(hook): configurable state directory via CC_LANGFUSE_STATE_DIR
…izard-config-claude_plugin_option_-silently

fix(hook): let per-repo env vars win over machine-wide wizard config
fix(plugin): align test pin, wizard default and docs with the EU code default
…t-visibility

fix(hook): trace Workflow-spawned subagent transcripts
…ame-style

feat(hook): configurable trace name style for name-based grouping
…langfuse#56)

* feat(hook): capture image blocks as markers and opt-in Langfuse media

* feat(plugin): offer the image capture option in the config wizard

* docs(plugin): document CC_LANGFUSE_CAPTURE_IMAGES

* feat(hook): enable image capture by default
… them (langfuse#64)

* perf(hook): read a workflow run directory only when a turn references it

* test: cover per-run workflow discovery and its firing scope
…ngfuse#73)

Co-authored-by: Hassieb Pakzad <68423100+hassiebp@users.noreply.github.com>
milanagm and others added 19 commits September 3, 2026 16:34
…angfuse#80)

* feat(hook): record the conversation history as each LLM call's input

* fix: removed option to opt out of history tracing
…fuse#87)

Co-authored-by: Hassieb Pakzad <68423100+hassiebp@users.noreply.github.com>
…rns (langfuse#89)

* added key for session state lock

* added test script for feature
Co-authored-by: John Buccola <jb@velo9.ai>
…ngfuse#40)

Claude Code's interactive /plugins install flow chains install into the
configure form; fields marked required have no skip path, so a user
without keys at hand can only Esc out — landing in a registered-but-
unconfigured state with no feedback (reported as
anthropics/claude-code#80904). The flags add nothing at runtime: the
hook already exits silently until both keys are set. Keys stay
documented as needed; enforcement lives where it already works.

Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
Point troubleshooting at bounded GET /api/public/v2/observations instead of
the sunset traces list API, matching the Codex plugin recipe. Keep traces
list only behind --api-version 3 for self-hosted v3.

Co-authored-by: Max Deichmann <max@langfuse.com>
Keep only the bounded Observations API v2 recipe so agents do not copy
GET /api/public/traces.

Co-authored-by: Max Deichmann <max@langfuse.com>
…ns-api-v2-49b3

docs: verify Claude traces via Observations API v2
* updated readme to mach structure of existing integrations

* added contributing md
emit_subagent_observations walked an agent's turns with no subagent
transcript map, so an Agent call inside a subagent produced a Tool span
but never the inner agent's own span, generations or tools. Pass the
map through so nested agents nest under their launching agent.

Co-authored-by: Pushkar Kolhe <pkolhe@snapchat.com>
…eam v1.2.1

The upstream merge took upstream's side of every conflict. Two of this fork's
changes lived inside conflicting hunks and are restored here:

- collect_subagent_agent_type_tags() and its call in get_trace_tags(), gated by
  CC_LANGFUSE_AGENT_TYPE_TAGS (default true), now placed before the operator tags
- os.environ.setdefault("OTEL_BSP_MAX_QUEUE_SIZE", 65536) in create_langfuse_client()

The per-turn backlog flush, CC_LANGFUSE_FLUSH_TIMEOUT_S and the 600s hook
timeouts merged cleanly.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@miguel-border
miguel-border merged commit 90eebb9 into main Oct 12, 2026
3 of 5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

8 participants