curl https://pulse.brainzlab.ai/api/v1/traces \
-H "Authorization: Bearer sk_live_xxx" \
-H "Content-Type: application/json" \
-d '{
"trace_id": "abc123",
"name": "GET /users/123",
"kind": "request",
"started_at": "2024-01-15T10:30:00.000Z",
"ended_at": "2024-01-15T10:30:00.245Z",
"request_method": "GET",
"request_path": "/users/123",
"status": 200,
"spans": [
{
"span_id": "span_1",
"name": "User.find",
"kind": "db",
"started_at": "2024-01-15T10:30:00.010Z",
"ended_at": "2024-01-15T10:30:00.015Z",
"data": {
"sql": "SELECT * FROM users WHERE id = $1",
"table": "users"
}
},
{
"span_id": "span_2",
"name": "Redis GET",
"kind": "cache",
"started_at": "2024-01-15T10:30:00.016Z",
"ended_at": "2024-01-15T10:30:00.017Z",
"data": {
"command": "GET",
"key": "user:123:settings"
}
},
{
"span_id": "span_3",
"name": "render show.html.erb",
"kind": "view",
"started_at": "2024-01-15T10:30:00.020Z",
"ended_at": "2024-01-15T10:30:00.240Z"
}
]
}'