Skip to main content
Monitoring & Collection/Logging
POSTLoggingSince 1.0SynchronousAuth Required

QueryByTraceID

Query all log entries associated with a specific trace ID

Execution Availability

Try It Out

Submit a mock request using the current auth context and example-driven inputs.

Request Inputs

Body Fields

  • traceIdStringRequired

    Distributed trace identifier to query logs for

    Example: abc123def456

  • startTimeStringRequired

    RFC3339 start time for the query window

    Example: 2024-01-01T00:00:00Z

  • endTimeStringRequired

    RFC3339 end time for the query window

    Example: 2024-01-01T01:00:00Z

  • servicesListRequired

    Services for this resource

    Example: item1,item2

  • maxResultsIntegerRequired

    Maximum number of log entries to return

    Example: 500

Responses

200 OK

On success, this API returns the following response structure.

  • traceIdString

    Distributed trace identifier used to correlate all returned logs

    Example: abc123def456

  • totalLogsInteger

    Total number of log entries found for this trace

    Example: 120

  • durationMsString

    Total elapsed time in milliseconds between first and last log entry

    Example: 3450

  • servicesList

    Services for this resource

    Example: (nested array)

    • serviceString

      Name of the service that emitted logs for this trace

      Example: payment-service

    • logCountInteger

      Total number of log entries from this service for the trace

      Example: 42

    • firstLogTimeString

      First log time

      Example: 2026-01-15T08:00:00Z

    • lastLogTimeString

      Last log time

      Example: 2026-01-15T08:00:00Z

  • logsList

    The logs value

    Example: (nested array)

    • timestampString

      Timestamp for this resource

      Example: 2026-01-15T08:00:00Z

    • serviceString

      Name of the service that emitted this log entry

      Example: order-service

    • levelString

      Severity level of the log entry

      Example: error

    • messageString

      Human-readable log message content

      Example: Failed to process payment: timeout

    • traceIdString

      Distributed trace identifier linking correlated log entries

      Example: abc123def456

    • sourceString

      Log source path or identifier (e.g. file path or stream name)

      Example: /var/log/app/service.log

Endpoint

POST/api/v1/logging/traces/query

/api/v1/logging/traces/query

Operation ID

QueryByTraceID

Permalink

Request Example

curl -X POST '{host}/api/v1/logging/traces/query' -H 'Authorization: Bearer {token}' -H 'Content-Type: application/json' -d '{"traceId":"abc123def456","startTime":"2024-01-01T00:00:00Z","endTime":"2024-01-01T01:00:00Z","services":"item1,item2","maxResults":500}'

Response Example

200
{
  "traceId": "abc123def456",
  "totalLogs": 120,
  "durationMs": 3450,
  "services": [
    {}
  ],
  "logs": [
    {}
  ]
}

Change History

This API has no change history records yet.

View all change history