All Products
Search
Document Center

Managed Service for OpenTelemetry:GetTrace

Last Updated:Mar 19, 2024

Queries the details of a trace.

Debugging

OpenAPI Explorer automatically calculates the signature value. For your convenience, we recommend that you call this operation in OpenAPI Explorer.

Authorization information

There is currently no authorization information disclosed in the API.

Request parameters

ParameterTypeRequiredDescriptionExample
TraceIDstringYes

The unique ID of the trace.

1c6881aab84191a4
AppTypestringNo

The type of the application. You can set the value to XTRACE or leave this parameter unspecified.

XTRACE
RegionIdstringYes

The ID of the region.

cn-beijing

Response parameters

ParameterTypeDescriptionExample
object
RequestIdstring

The ID of the request.

1E2B6A4C-6B83-4062-8B6F-AEEC1F******
Spansobject []

The details of the trace.

SpanIdstring

Span ID.

fec891bb8f8XXX
HaveStackboolean

Indicates whether the span has child spans. Valid values:

  • true: The span has child spans.
  • false: The span has no child spans.
false
ServiceIpstring

The IP address of the server where the span resides.

192.168.XXX.XXX
OperationNamestring

The name of the span.

/api
ParentSpanIdstring

The ID of the parent span.

fec891bb8f8XXX
ResultCodestring

The status code.

200
Durationlong

The time used to call the trace. Unit: milliseconds.

1000
RpcIdstring

The parent-child and sibling relationship between spans. For example, span 1.1 is the parent of span 1.1.1, and span 1.1.2 and span 1.1.1 are siblings.

1.1
Timestamplong

The timestamp when the span was generated. Unit: microseconds.

1689845513298000
ServiceNamestring

The name of the application.

server1
TraceIDstring

The unique ID of the trace.

1c6881aab84191a4****
TagEntryListobject []

The tags in the span.

Keystring

The tag key in the span.

logLevel
Valuestring

The tag value in the span.

Warning
LogEventListobject []

The log events in the trace.

Timestamplong

The timestamp when the log event was generated.

1583683202047000
TagEntryListobject []

The tags in the log event.

Keystring

The tag key in the log event.

logLevel
Valuestring

The tag value in the log event.

Warning

Examples

Sample success responses

JSONformat

{
  "RequestId": "1E2B6A4C-6B83-4062-8B6F-AEEC1F******",
  "Spans": {
    "Span": [
      {
        "SpanId": "fec891bb8f8XXX",
        "HaveStack": false,
        "ServiceIp": "192.168.XXX.XXX",
        "OperationName": "/api",
        "ParentSpanId": "fec891bb8f8XXX",
        "ResultCode": "200",
        "Duration": 1000,
        "RpcId": "1.1",
        "Timestamp": 1689845513298000,
        "ServiceName": "server1",
        "TraceID": "1c6881aab84191a4****",
        "TagEntryList": {
          "TagEntry": [
            {
              "Key": "logLevel",
              "Value": "Warning"
            }
          ]
        },
        "LogEventList": {
          "LogEvent": [
            {
              "Timestamp": 1583683202047000,
              "TagEntryList": {
                "TagEntry": [
                  {
                    "Key": "logLevel",
                    "Value": "Warning"
                  }
                ]
              }
            }
          ]
        }
      }
    ]
  }
}

Error codes

For a list of error codes, visit the Service error codes.

Change history

Change timeSummary of changesOperation
No change history