Get Span
client.spans.retrieve(stringspanID, RequestOptionsoptions?): Span { id, name, start_time, 7 more }
GET/spans/{span_id}
Get Span
import Agentex from 'agentex';
const client = new Agentex({
apiKey: process.env['AGENTEX_SDK_API_KEY'], // This is the default and can be omitted
});
const span = await client.spans.retrieve('span_id');
console.log(span.id);{
"id": "id",
"name": "name",
"start_time": "2019-12-27T18:11:19.117Z",
"trace_id": "trace_id",
"data": {
"foo": "bar"
},
"end_time": "2019-12-27T18:11:19.117Z",
"input": {
"foo": "bar"
},
"output": {
"foo": "bar"
},
"parent_id": "parent_id",
"task_id": "task_id"
}Returns Examples
{
"id": "id",
"name": "name",
"start_time": "2019-12-27T18:11:19.117Z",
"trace_id": "trace_id",
"data": {
"foo": "bar"
},
"end_time": "2019-12-27T18:11:19.117Z",
"input": {
"foo": "bar"
},
"output": {
"foo": "bar"
},
"parent_id": "parent_id",
"task_id": "task_id"
}