-
Notifications
You must be signed in to change notification settings - Fork 6.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Integration of Langfuse has bugs #8548
Comments
I found a similar unsolved discussion that might be relevant to your issue: Started with Local Source Code, made sure langSmith is connected properly, but log traces not printing upon adding to langsmith_trace.py, which was last updated on 2024-08-21 [1]. Additionally, here are some key points and steps to ensure the integration of Langfuse with Dify is correctly configured:
For logging and debugging, ensure that the def add_trace(self, langfuse_trace_data: Optional[LangfuseTrace] = None):
format_trace_data = filter_none_values(langfuse_trace_data.model_dump()) if langfuse_trace_data else {}
try:
self.langfuse_client.trace(**format_trace_data)
logger.debug("LangFuse Trace created successfully")
except Exception as e:
raise ValueError(f"LangFuse Failed to create trace: {str(e)}")
def add_span(self, langfuse_span_data: Optional[LangfuseSpan] = None):
format_span_data = filter_none_values(langfuse_span_data.model_dump()) if langfuse_span_data else {}
try:
self.langfuse_client.span(**format_span_data)
logger.debug("LangFuse Span created successfully")
except Exception as e:
raise ValueError(f"LangFuse Failed to create span: {str(e)}")
def add_generation(self, langfuse_generation_data: Optional[LangfuseGeneration] = None):
format_generation_data = (
filter_none_values(langfuse_generation_data.model_dump()) if langfuse_generation_data else {}
)
try:
self.langfuse_client.generation(**format_generation_data)
logger.debug("LangFuse Generation created successfully")
except Exception as e:
raise ValueError(f"LangFuse Failed to create generation: {str(e)}") These log messages and the detailed monitoring data can help in identifying and diagnosing issues with the Langfuse integration [5][3][4]. |
Self Checks
Dify version
0.6.12
Cloud or Self Hosted
Self Hosted (Source)
Steps to reproduce
Monitoring the integration of external Ops tools, there are bugs in the integration of Langfuse, see details:langfuse/langfuse#2700
✔️ Expected Behavior
No response
❌ Actual Behavior
No response
The text was updated successfully, but these errors were encountered: