Skip to content

Add multi-client support - #92

Closed
codemonium wants to merge 3 commits into
simplepractice:mainfrom
codemonium:feature/multi-client-support
Closed

Add multi-client support#92
codemonium wants to merge 3 commits into
simplepractice: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
@kxzk kxzk closed this Aug 14, 2026
@benlangfeld

Copy link
Copy Markdown

@kxzk Why was this closed?

@kxzk

kxzk commented Aug 20, 2026

Copy link
Copy Markdown
Collaborator

@kxzk Why was this closed?

Superseded by #94 but I may close that as well. I'll get around to it next. I'll be sure to credit contribution regardless of final form.

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.

3 participants