traces
Creates, updates, deletes, gets or lists a traces resource.
Overview
| Name | traces |
| Type | Resource |
| Id | vercel.projects.traces |
Fields
The following fields are returned by SELECT queries:
- get
| Name | Datatype | Description |
|---|---|---|
root_span_id | string | (wire: rootSpanId) |
trace_id | string | (wire: traceId) |
resources | array | |
spans | array |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
get | select | project_id, request_id | team_id, slug | Returns the OTEL trace for a given Vercel CLI request. |
create_session | exec | projectId, hostname | teamId, slug | Mints a short-lived HS256 JWT scoped to a deployment hostname. The Vercel CLI presents this JWT to the Vercel proxy on requests it wants traced. |
Parameters
Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.
| Name | Datatype | Description |
|---|---|---|
project_id | string | The project ID (wire: projectId) |
request_id | string | The Vercel CLI request ID associated with the trace (wire: requestId) |
slug | string | The Team slug to perform the request on behalf of. |
teamId | string | The Team identifier to perform the request on behalf of. |
team_id | string | The Team identifier to perform the request on behalf of. (wire: teamId) |
SELECT examples
- get
Returns the OTEL trace for a given Vercel CLI request.
SELECT
root_span_id,
trace_id,
resources,
spans
FROM vercel.projects.traces
WHERE project_id = '{{ project_id }}' -- required
AND request_id = '{{ request_id }}' -- required
AND team_id = '{{ team_id }}'
AND slug = '{{ slug }}'
;
Lifecycle Methods
EXEC variables use wire (API) names.
- create_session
Mints a short-lived HS256 JWT scoped to a deployment hostname. The Vercel CLI presents this JWT to the Vercel proxy on requests it wants traced.
EXEC vercel.projects.traces.create_session
@teamId='{{ teamId }}',
@slug='{{ slug }}'
@@json=
'{
"projectId": "{{ projectId }}",
"hostname": "{{ hostname }}"
}'
;