Skip to content

Commit

Permalink
fix: add trace_id to observation update/end to be able to ingest ev…
Browse files Browse the repository at this point in the history
…ents in any order (#629)

fix: add trace_id to observation update/end
  • Loading branch information
marcklingen authored Apr 29, 2024
1 parent 8aa8405 commit c0a9070
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions langfuse/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -1793,6 +1793,7 @@ def update(
try:
generation_body = {
"id": self.id,
"trace_id": self.trace_id, # Included to avoid relying on the order of events sent to the API
"name": name,
"start_time": start_time,
"metadata": metadata,
Expand Down Expand Up @@ -1985,6 +1986,7 @@ def update(
try:
span_body = {
"id": self.id,
"trace_id": self.trace_id, # Included to avoid relying on the order of events sent to the API
"name": name,
"start_time": start_time,
"metadata": metadata,
Expand Down

0 comments on commit c0a9070

Please sign in to comment.