Build a span-create event body. Used for both tool-call starts (open span) and the synthetic span emitted in record_tool_call_finish's fallback path.
| 328 | // Build a span-create event body. Used for both tool-call starts (open span) |
| 329 | // and the synthetic span emitted in record_tool_call_finish's fallback path. |
| 330 | JsonValue make_span_create(const std::string& span_id, |
| 331 | const std::string& trace_id, |
| 332 | const std::string& parent_id, |
| 333 | const std::string& name, |
| 334 | const std::string& start_iso, |
| 335 | const JsonValue& input, |
| 336 | const std::string& environment) { |
| 337 | JsonValue body; |
| 338 | body["id"] = span_id; |
| 339 | body["traceId"] = trace_id; |
| 340 | body["name"] = name; |
| 341 | body["startTime"] = start_iso; |
| 342 | body["input"] = input; |
| 343 | body["environment"] = environment; |
| 344 | if (!parent_id.empty()) |
| 345 | body["parentObservationId"] = parent_id; |
| 346 | return body; |
| 347 | } |
| 348 | |
| 349 | JsonValue wrap_event(const char* type, |
| 350 | const std::string& timestamp, |
no outgoing calls
no test coverage detected