dify icon indicating copy to clipboard operation
dify copied to clipboard

Bug: Langfuse Integration broken

Open jannikmaierhoefer opened this issue 11 months ago • 6 comments

Self Checks

  • [x] This is only for bug report, if you would like to ask a question, please head to Discussions.
  • [x] I have searched for existing issues search for existing issues, including closed ones.
  • [x] I confirm that I am using English to submit this report (我已阅读并同意 Language Policy).
  • [x] [FOR CHINESE USERS] 请务必使用英文提交 Issue,否则会被关闭。谢谢!:)
  • [x] Please do not modify this template :) and fill in all the required fields.

Dify version

Dify Cloud

Cloud or Self Hosted

Cloud

Steps to reproduce

  1. Create a new chatbot
  2. Add the credentials for the Langfuse integration
  3. Send messages to the chatbot -> No traces show up in Langfuse.

✔️ Expected Behavior

Traces show up in Langfuse after exchanging messages with the chatbot

❌ Actual Behavior

No traces in Langfuse.

jannikmaierhoefer avatar Mar 10 '25 15:03 jannikmaierhoefer

I found a similar open issue regarding Langfuse integration not working consistently in the cloud version of Dify. The suggested solution involves checking several potential causes:

  1. Network and Security Configurations: The cloud version of Dify might have different network policies that could affect Langfuse tracking.

  2. Error Logging: Review the logs for any specific error messages that might indicate failures in Langfuse tracking.

  3. Version Differences: Ensure that both Dify and Langfuse are running compatible versions. Dify requires Langfuse version ~2.51.3 and Python version >=3.11,<3.13 for proper functionality [1][2].

Additionally, there is a known limitation in Dify version 0.14.2 where Langfuse tracing does not work with ChatFlow, although it works with ChatBot. This issue is scheduled to be fixed in version 0.15 [3].

To continue talking to Dosu, mention @dosu.


Help Dosu learn! Give it feedback: Great Response | Irrelevant Answer | Incorrect Sources | Too Verbose | Hallucination | Bug Report | Other

dosubot[bot] avatar Mar 10 '25 16:03 dosubot[bot]

Image

I have tested it, and it looks like it's working great. Could you ​confirm if your key and project ​are correct?

ZhouhaoJiang avatar Mar 12 '25 03:03 ZhouhaoJiang

@ZhouhaoJiang Thanks. I can't get it to work with the following settings, what am I doing wrong? https://github.com/orgs/langfuse/discussions/5871#discussioncomment-12420442

IbukiMoriya avatar Mar 12 '25 03:03 IbukiMoriya

fix in #15597

ZhouhaoJiang avatar Mar 12 '25 07:03 ZhouhaoJiang

@ZhouhaoJiang Thanks, for fix. I tried with Dify Cloud v1.1.0, may not be resolved yet. I would like you to try it.

Dify Cloud (v1.1.0)

sandbox plan

Image

Image

Langfuse EU Cloud (v3.43.0)

hobby plan Image

Image

IbukiMoriya avatar Mar 19 '25 03:03 IbukiMoriya

Hi @ZhouhaoJiang, Langfuse maintainer here. I also just tested the integration with Dify Cloud, but no traces have been ingested to Langfuse.

Could you reopen this issue again?

jannikmaierhoefer avatar Mar 19 '25 16:03 jannikmaierhoefer

@jannikmaierhoefer @IbukiMoriya

Thank you for your patience. Due to an update in our Cloud version 1.0.0, there was a misconfiguration in the Celery worker parameters. The issue has now been resolved, and the Cloud version is back to normal.

ZhouhaoJiang avatar Mar 27 '25 06:03 ZhouhaoJiang

@ZhouhaoJiang Hello. Currently, the privately deployed version is also encountering this issue. May I ask which version will fix this problem? Thank you.

haolufeng1990 avatar Apr 23 '25 01:04 haolufeng1990