Skip to content

Add multi-client support#92

Open
codemonium wants to merge 3 commits intosimplepractice:mainfrom
codemonium:feature/multi-client-support
Open

Add multi-client support#92
codemonium wants to merge 3 commits intosimplepractice:mainfrom
codemonium:feature/multi-client-support

Conversation

@codemonium
Copy link
Copy Markdown
Contributor

TL;DR

Add support for using multiple Langfuse::Client instances while preserving the existing singleton client behavior.

Why

Some applications need to report to more than one Langfuse project from the same process, such as separate "Meeting Transcription" and "Note Summarization" projects. The SDK previously assumed singleton usage in a few internal paths, which made multi-client usage require downstream monkey patches.

Checklist

  • Has label
  • Has linked issue
  • Tests added for new behavior
  • Docs updated (if user-facing)

@codemonium
Copy link
Copy Markdown
Contributor Author

There are still several usages of Langfuse.configuration.logger throughout the codebase (chat_prompt_client.rb, otel_attributes.rb, propagation.rb, and masking.rb).

I left them alone because the change already does what I want, and I don't know the best approach forward for logging.

Should logging be client-specific, or should there be one global logger?

@codemonium codemonium changed the title Feature/multi client support Add multi-client support May 7, 2026
@codemonium codemonium marked this pull request as ready for review May 7, 2026 13:47
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.

1 participant