Update a trace #3556
-
I have a trace_id and want to fetch the corresponding trace. This is possible using the python sdk. |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 10 replies
-
Hey @saiprasath21! How can I assist you today? If you have any questions or need help with anything, feel free to ask. Yes, you can update the metadata of a trace using the Python SDK if you have the # option 2: via trace_id, trace is upserted on id
langfuse.trace(id=trace_id, metadata={"new_key": "new_value"}) This code snippet demonstrates how to update the metadata of a trace by specifying the |
Beta Was this translation helpful? Give feedback.
-
when I use
and then in another @observe()'ed function I use
At the end of the trace my metadata only consist of is that supposed to happen? And even if overwriting is decided then being able to READ metadata of a current trace first would be helpful to prepare NEW metadata with possible decision to save or not some of its data. |
Beta Was this translation helpful? Give feedback.
Hey @saiprasath21! How can I assist you today? If you have any questions or need help with anything, feel free to ask.
Yes, you can update the metadata of a trace using the Python SDK if you have the
trace_id
. You can do this by using thetrace.update()
method or by directly specifying thetrace_id
when creating or updating a trace. Here is an example of how you can update a trace using thetrace_id
:This code snippet demonstrates how to update the metadata of a trace by specifying the
trace_id
and providing the new metadata as a JSON object [1].To continue talking to Dosu, m…