-
[OPIK-4418] [SDK] Include parent_span_id in start span messages (#5313)
发布于
2026-02-20 13:16:39 +00:00 - [OPIK-4418] [SDK] Include parent_span_id in start span messages
When log_start_trace_span is enabled, the @track decorator sends two
CreateSpanMessages per span: a START message at function entry and an
END message at function exit. The START message was missing parent_span_id,
so if the two messages ended up in different batches, ClickHouse would
create rows with different sorting keys that FINAL cannot merge.Co-Authored-By: Claude Opus 4.6 noreply@anthropic.com
- [OPIK-4418] [SDK] Fix emulator span dedup for child spans with parent_span_id in start message
The _save_span dedup logic called _span_trees.remove(existing_span)
unconditionally, but child spans (parent_span_id != None) are never
added to _span_trees. This caused a ValueError that silently prevented
the END message from overwriting the START message in _span_observations.Co-Authored-By: Claude Opus 4.6 noreply@anthropic.com
Co-authored-by: Claude Opus 4.6 noreply@anthropic.com
Co-authored-by: Aliaksandr Kuzmik 98702584+alexkuzmik@users.noreply.github.com下载附件