Traces

Returns aggregate metrics and the full span tree. Metadata keys beginning with _ are reserved for platform use and omitted from span and trace read responses.

get/api/traces/{trace_unique_id}/

Request

  • Base URL
    https://api.respan.ai
  • URL
    https://api.respan.ai/api/traces/{trace_unique_id}/
  • Auth
    • HTTP bearer
    • or HTTP bearer

Path parameters

trace_unique_idstring required

Unique trace identifier.

Response

Trace detail with span tree.

idstring

Trace identifier.

trace_unique_idstring

Unique trace identifier.

root_span_unique_idstring

Root span ID for the trace.

unique_organization_idstring

Organization unique ID.

organization_idstring

Alias of unique_organization_id.

organization_namestring

Organization name when available.

organization_key_idstring

API key identifier used to create the trace.

environmentstring

Environment for the trace.

customer_identifierstring

Customer or user identifier.

start_timestring date-time

When the trace started.

end_timestring date-time

When the trace ended.

durationnumber

Total duration in seconds.

span_countinteger

Total spans in the trace.

llm_call_countinteger

Number of LLM-call spans.

total_costnumber

Total cost in USD.

total_prompt_tokensinteger

Sum of prompt tokens.

total_completion_tokensinteger

Sum of completion tokens.

total_tokensinteger

Sum of all tokens.

error_countinteger

Number of error spans.

namestring

Root span name.

inputstring nullable

Root span input. API key responses may include full storage-enriched content.

outputstring nullable

Root span output. API key responses may include full storage-enriched content.

metadataobject

Customer metadata. Keys beginning with _ are reserved and omitted from customer-facing responses.

trace_group_identifierstring

Workflow or trace-group identifier.

session_identifierstring

Session identifier when present.

modelstring

Primary/root model used.

storage_object_keystring

Storage object key for the root span payload when present.

Changes

    • breaking

      the response property became nullable for the status

    • breaking

      the response property became nullable for the status

    • breaking

      the response property // became nullable for the status

    • breaking

      the response property // became nullable for the status

    • breaking

      the response property // became nullable for the status

    • breaking

      the response's property format changed from double to no format for status

    • breaking

      the // response's property format changed from double to no format for status

    • breaking

      the // response's property format changed from double to no format for status

    • breaking

      the response's property format changed from double to no format for status

    • info

      api operation id traces_retrieveTrace removed and replaced with retrieveTrace

    • info

      the endpoint scheme security DashboardJwt was added to the API

    • info

      api tag Traces added

    • info

      api tag traces removed

    • breaking

      the response property became nullable for the status

    • breaking

      the response property became nullable for the status

    • breaking

      the response property // became nullable for the status

    • breaking

      the response property // became nullable for the status

    • info

      added the non-success response with the status

    • info

      removed the non-success response with the status