Query traces

projectTraces(input: ProjectTracesInput!): TraceQueryResult!

Requires project.logs.read.

Arguments

ArgumentTypeRequired
inputProjectTracesInput!Yes

Input fields

input

ProjectTracesInput

FieldTypeRequiredDescription
projectReferenceString!Yes
startStringNo
endStringNo
limitIntNo
serviceStringNo
statusStringNo
minDurationMsFloatNo
runIdStringNo
environmentStringNo
hostStringNo
sortByTraceSortByNoField to order the returned traces by. Explicit sorts break ties by trace ID ascending. Runtime default: "timestamp". Omitting both sort controls preserves Tempo's nanosecond order.
sortOrderTraceSortOrderNoSort direction. Runtime default: "desc".

Response

Returns TraceQueryResult!. Open the type for its fields and nested types.

Types marked with ! cannot be null. Lists use [Type] notation. The type index lists all published input and response types.

Example

graphql
query ProjectTraces($input: ProjectTracesInput!) {
  projectTraces(input: $input) {
    traces {
      traceId
      projectId
      status
      durationMs
      environment
    }
    stats {
      queryTimeMs
    }
  }
}
json
{
  "input": {
    "projectReference": "00000000-0000-4000-8000-000000000001"
  }
}