Skip to main content
Monitoring & Collection/Logging

QueryByTraceID

Query all log entries associated with a specific trace ID

POST/api/v1/logging/traces/query

Operation ID

QueryByTraceID

Since

1.0.0

Execution Mode

Synchronous

Auth Context

Auth Required

Auth Context

Send these values as request headers when calling this API.

AuthorizationstringRequired

Bearer Token

X-Tenant-IDstring

X-Tenant-ID

Request Inputs

application/json

Body Fields

  • traceId
    StringRequired

    Distributed trace identifier to query logs for

    Example: abc123def456

  • startTime
    StringRequired

    RFC3339 start time for the query window

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

  • endTime
    StringRequired

    RFC3339 end time for the query window

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

  • services
    ListRequired

    Services for this resource

    Example: item1,item2

  • maxResults
    IntegerRequired

    Maximum number of log entries to return

    Example: 500

Responses

200 OK
200 OK

On success, this API returns the following response structure.

  • traceId
    String

    Distributed trace identifier used to correlate all returned logs

    Example: abc123def456

  • totalLogs
    Integer

    Total number of log entries found for this trace

    Example: 120

  • durationMs
    String

    Total elapsed time in milliseconds between first and last log entry

    Example: 3450

  • services
    List

    Services for this resource

    Example: (nested array)

    • service
      String

      Name of the service that emitted logs for this trace

      Example: payment-service

    • logCount
      Integer

      Total number of log entries from this service for the trace

      Example: 42

    • firstLogTime
      String

      First log time

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

    • lastLogTime
      String

      Last log time

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

  • logs
    List

    The logs value

    Example: (nested array)

    • timestamp
      String

      Timestamp for this resource

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

    • service
      String

      Name of the service that emitted this log entry

      Example: order-service

    • level
      String

      Severity level of the log entry

      Example: error

    • message
      String

      Human-readable log message content

      Example: Failed to process payment: timeout

    • traceId
      String

      Distributed trace identifier linking correlated log entries

      Example: abc123def456

    • source
      String

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

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