Traces, missing Responses although they were successful

I found that some Responses don’t show up on traces even though they were successful.

trace_953F833F4D204ACE8F1A4BCACC41E918

for example the second SearchAgent span, span_4B41515F370F48C1B316A7EF doesn’t show a response.

But in the ingested JSON:

    {
      "parent_id" : "span_7E7E8A9C9E624A0D8BF5C950",
      "object" : "trace.span",
      "span_data" : {
        "name" : "SearchAgent",
        "type" : "agent",
        "tools" : [
          "web_search_preview"
        ],
        "handoffs" : [

        ],
        "output_type" : "str"
      },
      "trace_id" : "trace_953F833F4D204ACE8F1A4BCACC41E918",
      "started_at" : "2025-05-06T20:24:09.196Z",
      "error" : null,
      "ended_at" : "2025-05-06T20:24:18.176Z",
      "id" : "span_4B41515F370F48C1B316A7EF"
    },

here’s the trace.span for the response:

    {
      "ended_at" : "2025-05-06T20:24:18.176Z",
      "started_at" : "2025-05-06T20:24:09.197Z",
      "span_data" : {
        "response_id" : "resp_681a6fe956988191879d0bb306ce6ff305a932d0f32f1422",
        "type" : "response"
      },
      "parent_id" : "span_4B41515F370F48C1B316A7EF",
      "id" : "span_CB751A10FD4B4A9084151B71",
      "object" : "trace.span",
      "trace_id" : "trace_953F833F4D204ACE8F1A4BCACC41E918",
      "error" : null
    },

The response with id resp_681a6fe956988191879d0bb306ce6ff305a932d0f32f1422 does exist if I look at it in the logs.

PS: Admittedly I am doing the ingesting myself, with my own SDK, but that should not change anything.

Ok, I uncovered a likely explanation. Apparently the website doesn’t use the span_id for linking traces, but rather uses the time stamps to unique the retrieved span. Because of this the time stamps need to be unique. My exporter was limited to 3 digits after the comma (milliseconds) for seconds for formatting Swift Dates, but the AgentsSDK was sending 6 digits after the comma (microseconds), as String.

Since I changed it to also have microseconds all of the sudden all traces appear correctly.

So my feedback to OpenAI is that they shouldn’t unique trace spans by time stamp, but rather by id.