MrOrz
MrOrz
LLangfuse
Created by MrOrz on 8/28/2024 in #support
Setting trace ID and parent observation ID with Python decorator SDK
I love the simplicity of Python Decorator SDK and would like to incorporate distributed tracing with it. In our setup, we have LLM apps that would call Tools, with both types of microservices linked to the same Langfuse project. LLM apps would pass the current Langfuse trace ID and observation ID to Tools when the LLM app decide to call tools. Currently we are able to set custom trace ID by passing langfuse_observation_id kwarg to the first method that is wrapped by @observe. However, we can't do the same as we also want to set parent_observation_id. Although it is possible to set it through the low-level SDK, seems that if we choose to use decorators we just can't achieve the same. What is the recommended way to set parent observation ID through the decorator based Python SDK?
5 replies