ProjectTech4DevAI / ProjectTech4DevAI/kaapi-backend

Langfuse: Async Traces

Open
#510 1 comment 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

bug
Dominant language
Python
Stars
18
Forks
10
Avg merge
2d 20h
Merged PRs (30d)
14

Description

Is your feature request related to a problem?

Glific AI flows experienced an outage where flows were stuck due to no response from Kaapi. Root cause: Langfuse was returning errors while creating traces for orgs with Langfuse credentials (Bandhu, Veddis, Rocket Learning, Antara, Sneha).

As a quick fix, we marked Langfuse credentials as is_active: false to restore Kaapi responses, but traces are now not being captured.

Current behavior:

  • Trace creation is synchronous
  • Langfuse failures block the entire flow
  • External service outages directly impact core functionality

Describe the solution you'd like

Make Langfuse trace creation asynchronous so:

  • Normal flow execution continues regardless of Langfuse status
  • Trace failures are logged but don't block responses
  • Core functionality remains unaffected by observability layer issues

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

No files or tests are named. Start by locating the synchronous Langfuse trace-creation entry point and the flow response path; verify how Langfuse errors currently propagate. Done means flow responses continue when trace creation fails, failures are logged, and traces are still attempted asynchronously.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
backend, observability
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
38/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.