GenAI span 쿼리
curl --request POST \
--url https://api.example.com/agents/spans/query \
--header 'Authorization: Basic <encoded-value>' \
--header 'Content-Type: application/json' \
--data '
{
"project_id": "<string>",
"custom_attr_columns": [
{
"key": "<string>",
"source": "field"
}
],
"group_by": [
{
"key": "<string>",
"alias": "<string>",
"source": "field"
}
],
"group_distributions": [
{
"alias": "<string>",
"value": {
"key": "<string>",
"source": "field"
},
"bins": 12,
"top_n": 5
}
],
"group_filters": [
{
"measure": {
"alias": "<string>",
"filter": {
"$expr": {
"$and": [
{
"$literal": "<string>"
}
]
}
},
"value": {
"key": "<string>",
"source": "field"
}
},
"group_by": [
{
"key": "<string>",
"alias": "<string>",
"source": "field"
}
],
"max": 123,
"min": 123
}
],
"include_details": false,
"limit": 100,
"measures": [
{
"alias": "<string>",
"filter": {
"$expr": {
"$and": [
{
"$literal": "<string>"
}
]
}
},
"value": {
"key": "<string>",
"source": "field"
}
}
],
"offset": 0,
"query": {
"$expr": {
"$and": [
{
"$literal": "<string>"
}
]
}
},
"sort_by": [
{
"field": "<string>",
"direction": "desc"
}
],
"started_after": "2023-11-07T05:31:56Z",
"started_before": "2023-11-07T05:31:56Z"
}
'{
"groups": [
{
"agent_names": [
"<string>"
],
"agent_versions": [
"<string>"
],
"conversation_count": 0,
"conversation_names": [
"<string>"
],
"distributions": {},
"error_count": 0,
"first_message": {
"role": "",
"text": ""
},
"first_seen": "2023-11-07T05:31:56Z",
"group_keys": {},
"invocation_count": 0,
"last_message": {
"role": "",
"text": ""
},
"last_seen": "2023-11-07T05:31:56Z",
"metrics": {},
"provider_names": [
"<string>"
],
"request_models": [
"<string>"
],
"span_count": 0,
"total_cache_creation_input_tokens": 0,
"total_cache_read_input_tokens": 0,
"total_duration_ms": 0,
"total_input_tokens": 0,
"total_output_tokens": 0,
"total_reasoning_tokens": 0
}
],
"spans": [
{
"project_id": "<string>",
"span_id": "<string>",
"trace_id": "<string>",
"agent_description": "<string>",
"agent_id": "<string>",
"agent_name": "<string>",
"agent_version": "<string>",
"artifact_refs": [
"<string>"
],
"cache_creation_input_tokens": 123,
"cache_read_input_tokens": 123,
"compaction_items_after": 123,
"compaction_items_before": 123,
"compaction_summary": "<string>",
"content_refs": [
"<string>"
],
"conversation_id": "<string>",
"conversation_name": "<string>",
"custom_attrs_bool": {},
"custom_attrs_float": {},
"custom_attrs_int": {},
"custom_attrs_string": {},
"ended_at": "2023-11-07T05:31:56Z",
"error_type": "<string>",
"finish_reasons": [
"<string>"
],
"input_messages": [
{
"content": "<string>",
"finish_reason": "",
"role": ""
}
],
"input_tokens": 123,
"object_refs": [
"<string>"
],
"operation_name": "<string>",
"output_messages": [
{
"content": "<string>",
"finish_reason": "",
"role": ""
}
],
"output_tokens": 123,
"output_type": "<string>",
"parent_span_id": "<string>",
"provider_name": "<string>",
"raw_span_dump": "<string>",
"reasoning_content": "<string>",
"reasoning_tokens": 123,
"request_choice_count": 123,
"request_frequency_penalty": 123,
"request_max_tokens": 123,
"request_model": "<string>",
"request_presence_penalty": 123,
"request_seed": 123,
"request_stop_sequences": [
"<string>"
],
"request_temperature": 123,
"request_top_p": 123,
"response_id": "<string>",
"response_model": "<string>",
"server_address": "<string>",
"server_port": 123,
"span_name": "<string>",
"started_at": "2023-11-07T05:31:56Z",
"status_message": "<string>",
"system_instructions": [
"<string>"
],
"tool_call_arguments": "<string>",
"tool_call_id": "<string>",
"tool_call_result": "<string>",
"tool_definitions": "<string>",
"tool_description": "<string>",
"tool_name": "<string>",
"tool_type": "<string>",
"wb_run_id": "<string>",
"wb_run_step": 123,
"wb_run_step_end": 123,
"wb_user_id": "<string>"
}
],
"total_count": 0
}에이전트 span을 원시 행 또는 그룹화된 집계 형태로 쿼리합니다.
POST
/
agents
/
spans
/
query
GenAI span 쿼리
curl --request POST \
--url https://api.example.com/agents/spans/query \
--header 'Authorization: Basic <encoded-value>' \
--header 'Content-Type: application/json' \
--data '
{
"project_id": "<string>",
"custom_attr_columns": [
{
"key": "<string>",
"source": "field"
}
],
"group_by": [
{
"key": "<string>",
"alias": "<string>",
"source": "field"
}
],
"group_distributions": [
{
"alias": "<string>",
"value": {
"key": "<string>",
"source": "field"
},
"bins": 12,
"top_n": 5
}
],
"group_filters": [
{
"measure": {
"alias": "<string>",
"filter": {
"$expr": {
"$and": [
{
"$literal": "<string>"
}
]
}
},
"value": {
"key": "<string>",
"source": "field"
}
},
"group_by": [
{
"key": "<string>",
"alias": "<string>",
"source": "field"
}
],
"max": 123,
"min": 123
}
],
"include_details": false,
"limit": 100,
"measures": [
{
"alias": "<string>",
"filter": {
"$expr": {
"$and": [
{
"$literal": "<string>"
}
]
}
},
"value": {
"key": "<string>",
"source": "field"
}
}
],
"offset": 0,
"query": {
"$expr": {
"$and": [
{
"$literal": "<string>"
}
]
}
},
"sort_by": [
{
"field": "<string>",
"direction": "desc"
}
],
"started_after": "2023-11-07T05:31:56Z",
"started_before": "2023-11-07T05:31:56Z"
}
'{
"groups": [
{
"agent_names": [
"<string>"
],
"agent_versions": [
"<string>"
],
"conversation_count": 0,
"conversation_names": [
"<string>"
],
"distributions": {},
"error_count": 0,
"first_message": {
"role": "",
"text": ""
},
"first_seen": "2023-11-07T05:31:56Z",
"group_keys": {},
"invocation_count": 0,
"last_message": {
"role": "",
"text": ""
},
"last_seen": "2023-11-07T05:31:56Z",
"metrics": {},
"provider_names": [
"<string>"
],
"request_models": [
"<string>"
],
"span_count": 0,
"total_cache_creation_input_tokens": 0,
"total_cache_read_input_tokens": 0,
"total_duration_ms": 0,
"total_input_tokens": 0,
"total_output_tokens": 0,
"total_reasoning_tokens": 0
}
],
"spans": [
{
"project_id": "<string>",
"span_id": "<string>",
"trace_id": "<string>",
"agent_description": "<string>",
"agent_id": "<string>",
"agent_name": "<string>",
"agent_version": "<string>",
"artifact_refs": [
"<string>"
],
"cache_creation_input_tokens": 123,
"cache_read_input_tokens": 123,
"compaction_items_after": 123,
"compaction_items_before": 123,
"compaction_summary": "<string>",
"content_refs": [
"<string>"
],
"conversation_id": "<string>",
"conversation_name": "<string>",
"custom_attrs_bool": {},
"custom_attrs_float": {},
"custom_attrs_int": {},
"custom_attrs_string": {},
"ended_at": "2023-11-07T05:31:56Z",
"error_type": "<string>",
"finish_reasons": [
"<string>"
],
"input_messages": [
{
"content": "<string>",
"finish_reason": "",
"role": ""
}
],
"input_tokens": 123,
"object_refs": [
"<string>"
],
"operation_name": "<string>",
"output_messages": [
{
"content": "<string>",
"finish_reason": "",
"role": ""
}
],
"output_tokens": 123,
"output_type": "<string>",
"parent_span_id": "<string>",
"provider_name": "<string>",
"raw_span_dump": "<string>",
"reasoning_content": "<string>",
"reasoning_tokens": 123,
"request_choice_count": 123,
"request_frequency_penalty": 123,
"request_max_tokens": 123,
"request_model": "<string>",
"request_presence_penalty": 123,
"request_seed": 123,
"request_stop_sequences": [
"<string>"
],
"request_temperature": 123,
"request_top_p": 123,
"response_id": "<string>",
"response_model": "<string>",
"server_address": "<string>",
"server_port": 123,
"span_name": "<string>",
"started_at": "2023-11-07T05:31:56Z",
"status_message": "<string>",
"system_instructions": [
"<string>"
],
"tool_call_arguments": "<string>",
"tool_call_id": "<string>",
"tool_call_result": "<string>",
"tool_definitions": "<string>",
"tool_description": "<string>",
"tool_name": "<string>",
"tool_type": "<string>",
"wb_run_id": "<string>",
"wb_run_step": 123,
"wb_run_step_end": 123,
"wb_user_id": "<string>"
}
],
"total_count": 0
}인증
HTTPBasicHTTPBearer
Basic authentication header of the form Basic <encoded-value>, where <encoded-value> is the base64-encoded string username:password.
본문
application/json
프로젝트의 에이전트 span을 쿼리하기 위한 요청입니다.
group_by가 비어 있거나 생략되면 응답의 spans 필드에 원시 span 행을 반환합니다. group_by가 비어 있지 않으면 응답의 groups 필드에 집계된 그룹 행을 반환합니다.
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Maximum array length:
20Show child attributes
Show child attributes
Show child attributes
Show child attributes
필수 범위:
0 <= x <= 10000Show child attributes
Show child attributes
필수 범위:
x >= 0Show child attributes
Show child attributes
Show child attributes
Show child attributes
⌘I