Does langfuse trace parallel api calls? I tried a sample with parallel call but it didn't traced. #2874
Replies: 4 comments 3 replies
-
|
Hey @ksundarraj-c-rpx! I'm here to help you with any bugs, questions, or contributions you have. Let's work together to solve this issue! To ensure that parallel API calls are traced in Langfuse, you should follow these steps:
Additionally, Langfuse's client SDKs and integrations are designed to queue and batch requests in the background to optimize API calls and network time. You can customize the batching behavior to suit your needs by configuring options such as By following these steps and utilizing Langfuse's features, you can ensure that parallel API calls are properly traced in Langfuse. |
Beta Was this translation helpful? Give feedback.
-
Have checked the config keys, I am using the correct keys only and there is no error in langfuse setup. I used to manually flush() the trace but still no traces in the UI when using a parallel run. |
Beta Was this translation helpful? Give feedback.
-
|
Did not worked |
Beta Was this translation helpful? Give feedback.
-
|
parallel apply will send data in a parallel way, so in my code i'm sending 60 data at same time to speed up the process. I am actually using the OpenAI class from langfuse, tried various things like updating the trace manually inside the get_gpt_result_1 function itself but not sure why it is not working. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
This is my function to run gpt-4o and I used langfuse openai to trace this in UI,
I use another function which will call this to get gpt result, so it works fine if I perform sequence of calls I can see the traces in UI but, if I call the other function in parallel way to speed up like,
So when I call like this everything is running fine I am getting output but I could not see any trace in langfuse UI.
Beta Was this translation helpful? Give feedback.
All reactions