Skip to content

Jobs.QuerySpansPage

func (jobClient) QuerySpansPage(
ctx context.Context,
jobID uuid.UUID,
options ...job.TelemetryQueryOption,
) (*workflows.SpanPage, error)

Query a single page of spans emitted while running a job.

jobID uuid.UUID required

The ID of the job to query spans for.

options []job.TelemetryQueryOption

Options for querying spans.

job.WithCursor(cursor *job.Cursor)

Start the query after the cursor returned by a previous page.

job.WithLimit(limit int64)

Limit the number of spans returned in this page.

job.WithSortDirection(direction job.SortDirection)

Sort spans by start time. Use job.Ascending for oldest first or job.Descending for newest first.

A SpanPage with spans and an optional NextCursor for the next page.