Skip to content
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

Langflow traces are not well reflected in Langfuse #4212

Open
codenprogressive opened this issue Oct 19, 2024 · 3 comments
Open

Langflow traces are not well reflected in Langfuse #4212

codenprogressive opened this issue Oct 19, 2024 · 3 comments
Assignees
Labels
bug Something isn't working

Comments

@codenprogressive
Copy link

codenprogressive commented Oct 19, 2024

Bug Description

Not able to see Langflow components inputs and outputs in Langfuse tracing.
For instance, for a given component, you will see the component python code instead of the input data. And the Output is completely empty.

See screenshot below.

Reproduction

  1. create a simple flow with chat input, prompt, and a chat output! flow example reproduce _error_langfuse (1).json
  2. connect to Langfuse, and see trace.
  3. notice that components input are tracking the python code of the component and not the data inputted
  4. notice that the component output is empty

see screenshow:
image

Expected behavior

I'm expecting to see input data (not the python code) and output data of each components.

Who can help?

@italojohnny

Operating System

Ubuntu

Langflow Version

1.0.19

Python Version

3.10

Screenshot

image

Flow File

reproduce _error_langfuse (1).json

@codenprogressive codenprogressive added the bug Something isn't working label Oct 19, 2024
Copy link

dosubot bot commented Oct 19, 2024

Langflow should capture and serialize component inputs and outputs correctly for Langfuse integration. The LangFuseTracer class is responsible for this, using methods like add_trace and end_trace to handle inputs and outputs. These methods should ensure that the actual data, not the code, is included in the trace [1].

If you're seeing code instead of data, it might be due to an issue with how inputs are being captured or serialized. The _convert_to_langwatch_types method is used to convert inputs and outputs to compatible types, which should help ensure that data is correctly represented [2].

To troubleshoot, ensure that the _cleanup_inputs method is correctly sanitizing and storing inputs, and that the LangFuseTracer is properly initialized with the necessary environment variables for Langfuse [3][4]. If the issue persists, reviewing the implementation of these methods might help identify any discrepancies in how data is being processed.

To continue talking to Dosu, mention @dosu.

@codenprogressive codenprogressive changed the title Langflow traces are not well reflected in Langfuse traces Langflow traces are not well reflected in Langfuse Oct 19, 2024
@codenprogressive
Copy link
Author

In version 1.0.18 traces were working fine. Looks like something was introduced in v19 resulted into breaking things. I see tracing service logic was slightly changed when introducing ruff rules.

@zcasanova
Copy link

In version 1.0.18 traces were working fine. Looks like something was introduced in v19 resulted into breaking things. I see tracing service logic was slightly changed when introducing ruff rules.

I spend a long time debugging this. And you are right, it is a bug that was introduced in the latest version :-(.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants