Get a project trace by request ID
GET
https://api.vercel.com/v1/projects/tracesReturns the OTEL trace for a given Vercel CLI request.
https://api.vercel.com/v1/projects/traces
const response = await fetch('https://api.vercel.com/v1/projects/traces?projectId=string&requestId=string&teamId=string&slug=string', { method: 'GET', headers: { 'Authorization': 'Bearer YOUR_ACCESS_TOKEN', 'Content-Type': 'application/json', },});
const data = await response.json();console.log(data);Response
{ "trace": { "resources": [ { "attributes": "value", "name": "Example Name" } ], "rootSpanId": "example_id", "spans": [ { "attributes": "value", "duration": [], "endTime": [], "events": [ { "attributes": "value", "name": "Example Name", "timestamp": [] } ], "kind": "123", "library": { "name": "Example Name", "version": "string" }, "links": [ "value" ], "name": "Example Name", "parentSpanId": "example_id", "resource": "string", "spanId": "example_id", "startTime": [], "status": { "code": "123", "message": "string" }, "traceFlags": "123", "traceState": "string" } ], "traceId": "example_id" }}AuthorizationbearerToken
Default authentication mechanism