GET
/
v2
/
projects
/
{project_id}
/
spans
/
{span_id}
Get Span
curl --request GET \
  --url https://api.galileo.ai/v2/projects/{project_id}/spans/{span_id} \
  --header 'Galileo-API-Key: <api-key>'
{
  "spans": [
    {}
  ],
  "type": "agent",
  "input": "<string>",
  "redacted_input": "<string>",
  "output": "<string>",
  "redacted_output": "<string>",
  "name": "",
  "created_at": "2023-11-07T05:31:56Z",
  "user_metadata": {},
  "tags": [
    "<string>"
  ],
  "status_code": 123,
  "metrics": {
    "duration_ns": 123
  },
  "external_id": "<string>",
  "dataset_input": "<string>",
  "dataset_output": "<string>",
  "dataset_metadata": {},
  "id": "<string>",
  "session_id": "<string>",
  "trace_id": "<string>",
  "project_id": "<string>",
  "run_id": "<string>",
  "updated_at": "2023-11-07T05:31:56Z",
  "has_children": true,
  "metrics_batch_id": "<string>",
  "session_batch_id": "<string>",
  "metric_info": {},
  "parent_id": "<string>",
  "is_complete": true,
  "step_number": 123,
  "agent_type": "default"
}

Authorizations

Galileo-API-Key
string
header
required

Path Parameters

span_id
string<uuid4>
required
project_id
string<uuid4>
required

Response

Successful Response

id
string<uuid4>
required

Galileo ID of the session, trace or span

session_id
string<uuid4>
required

Galileo ID of the session containing the trace (or the same value as id for a trace)

project_id
string<uuid4>
required

Galileo ID of the project associated with this trace or span

run_id
string<uuid4>
required

Galileo ID of the run (log stream or experiment) associated with this trace or span

parent_id
string<uuid4>
required

Galileo ID of the parent of this span

spans
Spans · array
type
string
default:agent

Type of the trace, span or session.

Allowed value: "agent"
input
default:""

Input to the trace or span.

redacted_input

Redacted input of the trace or span.

output

Output of the trace or span.

redacted_output

Redacted output of the trace or span.

name
string
default:""

Name of the trace, span or session.

created_at
string<date-time>

Timestamp of the trace or span's creation.

user_metadata
object

Metadata associated with this trace or span.

tags
string[]

Tags associated with this trace or span.

status_code
integer | null

Status code of the trace or span. Used for logging failure or error states.

metrics
object

Metrics associated with this trace or span.

external_id
string | null

A user-provided session, trace or span ID.

dataset_input
string | null

Input to the dataset associated with this trace

dataset_output
string | null

Output from the dataset associated with this trace

dataset_metadata
object

Metadata from the dataset associated with this trace

trace_id
string<uuid4> | null

Galileo ID of the trace containing the span (or the same value as id for a trace)

updated_at
string<date-time> | null

Timestamp of the session or trace or span's last update

has_children
boolean | null

Whether or not this trace or span has child spans

metrics_batch_id
string<uuid4> | null

Galileo ID of the metrics batch associated with this trace or span

session_batch_id
string<uuid4> | null

Galileo ID of the metrics batch associated with this trace or span

metric_info
object | null

Detailed information about the metrics associated with this trace or span

is_complete
boolean
default:true

Whether the parent trace is complete or not

step_number
integer | null

Topological step number of the span.

agent_type
enum<string>

Agent type.

Available options:
default,
planner,
react,
reflection,
router,
classifier,
supervisor,
judge