Replies: 3 comments
-
|
+1 for per-component Langfuse config! Multi-tenant observability is essential. Current workaround: Custom component wrapper from langfuse import Langfuse
from langflow import CustomComponent
class TenantAwareLLM(CustomComponent):
def build(
self,
langfuse_key: str,
langfuse_secret: str,
langfuse_host: str,
tenant_id: str,
**llm_kwargs
):
# Per-tenant Langfuse client
langfuse = Langfuse(
public_key=langfuse_key,
secret_key=langfuse_secret,
host=langfuse_host,
)
# Wrap LLM with tenant-specific tracing
trace = langfuse.trace(
name=f"tenant-{tenant_id}",
metadata={"tenant": tenant_id}
)
return TracedLLM(llm, trace)Proposed API: # In component config
{
"langfuse": {
"enabled": true,
"public_key": "{{tenant.langfuse_key}}",
"secret_key": "{{secrets.langfuse_secret}}",
"host": "https://cloud.langfuse.com",
"project": "{{tenant.project_id}}",
"sampling_rate": 0.1
}
}Implementation suggestion:
We build multi-tenant AI platforms at Revolution AI — per-component observability config would be a huge addition. |
Beta Was this translation helpful? Give feedback.
-
|
Per-component Langfuse config without global env vars — great feature request! Why this matters:
Current workaround: from langfuse import Langfuse
class CustomLangfuseComponent(CustomComponent):
def build(
self,
public_key: str,
secret_key: str,
host: str = "https://cloud.langfuse.com"
):
client = Langfuse(
public_key=public_key,
secret_key=secret_key,
host=host
)
return clientProposed component interface: Langfuse Observer:
inputs:
- public_key: secret
- secret_key: secret
- host: string (optional)
- project: string
outputs:
- trace_handlerUse case flow: We do multi-environment observability at RevolutionAI. Happy to contribute a component! What's your multi-tenant scenario? |
Beta Was this translation helpful? Give feedback.
-
|
Thanks you for your feedback. We have defined several organisations and project team in langfuse. One organisation is a laboratory in my research institute. We cannot autorise members to access to the general call back from langflow to langfuse due to clear separation between organisations. That's why we need to be able to dispatch call from each flow in its own project in langfuse. Each team is in charge to improve its own research flow. They need to be able to access the trace in Langfuse. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Hi Langflow team,
First of all — thanks for the fantastic work on Langflow and the integrations with Langfuse! The current setup makes it very easy to trace flows to Langfuse by passing the required keys as environment variables.
I have a feature request regarding the Langfuse observability integration:
🚀 Problem
At the moment, Langflow’s Langfuse integration requires the API keys (
LANGFUSE_SECRET_KEY,LANGFUSE_PUBLIC_KEY,LANGFUSE_HOST, etc.) to be set as global environment variables before starting the Langflow server. ([Langflow Documentation]1)However, in more complex scenarios — for example multi-tenant workflows, multiple Langfuse projects, or different trace destinations depending on the LLM component — it would be very helpful to configure Langfuse per component (LLM/chain) instead of only at the server level.
In other words:
❓ Use Cases
❓ Is this feasible?
I’m curious to know:
Thanks in advance 🙏
Si tu veux, je peux aussi t’aider à créér le même texte adapté pour “Issues” ou “Discussion” sur GitHub avec les labels suggérés (ex.
enhancement,help wanted,question).Beta Was this translation helpful? Give feedback.
All reactions