tencent cloud

APIs

DescribeGeneralSpanList

Download
Focus Mode
Font Size
Last updated: 2026-05-12 19:25:22

1. API Description

Domain name for API request: apm.intl.tencentcloudapi.com.

General Query Call Chain List.

A maximum of 20 requests can be initiated per second for this API.

We recommend you to use API Explorer
Try it
API Explorer provides a range of capabilities, including online call, signature authentication, SDK code generation, and API quick search. It enables you to view the request, response, and auto-generated examples.

2. Input Parameters

The following request parameter list only provides API request parameters and some common parameters. For the complete common parameter list, see Common Request Parameters.

Parameter Name Required Type Description
Action Yes String Common Params. The value used for this API: DescribeGeneralSpanList.
Version Yes String Common Params. The value used for this API: 2021-06-22.
Region Yes String Common Params. For more information, please see the list of regions supported by the product.
InstanceId Yes String

Business system ID

StartTime Yes Integer

Span query start timestamp (unit: seconds)

EndTime Yes Integer

Span query end timestamp (unit: s)

Filters.N No Array of Filter

Universal filter parameters supported filter key such as service.name

OrderBy No OrderBy

Sort
Keys now supported:

  • startTime
  • endTime
  • duration

Values now supported:

  • desc (sort in descending order)
  • asc (ascending order)
BusinessName No String

Business service name. Console users please enter taw

Limit No Integer

Count of single-page projects. Defaults to 1000. Valid value range is 1–1000.

Offset No Integer

Page

3. Output Parameters

Parameter Name Type Description
TotalCount Integer

Total number

Spans Array of Span

Span pagination list

RequestId String The unique request ID, generated by the server, will be returned for every request (if the request fails to reach the server for other reasons, the request will not obtain a RequestId). RequestId is required for locating a problem.

4. Example

Example1 Common Query Call Chain List

This example shows you how to query spans in batches based on a Trace ID list by setting the Type to in and using a comma as the separator in the Filters query parameter.

Input Example

POST / HTTP/1.1
Host: apm.intl.tencentcloudapi.com
Content-Type: application/json
X-TC-Action: DescribeGeneralSpanList
<Common request parameters>

{
    "OrderBy": {
        "Value": "startTime",
        "Key": "desc"
    },
    "Filters": [
        {
            "Key": "traceID",
            "Type": "in",
            "Value": "663727c6d5d4436dd1fcaa509d0f4dc0,6c2c8ebff420a8e5b2276ec799446f98,68d3062a4c559ba212a36f61c97ba8ac"
        }
    ],
    "Limit": 0,
    "Offset": 10,
    "InstanceId": "apm-52Dpv13GR",
    "StartTime": 1742374000,
    "EndTime": 1742374331,
    "BusinessName": "tdmq"
}

Output Example

{
    "Response": {
        "TotalCount": 0,
        "RequestId": "test-test-test",
        "Spans": [
            {
                "TraceID": "663727c6d5d4436dd1fcaa509d0f4dc0,6c2c8ebff420a8e5b2276ec799446f98,68d3062a4c559ba212a36f61c97ba8ac",
                "Logs": [
                    {
                        "Timestamp": 0,
                        "Fields": [
                            {
                                "Type": "service.name",
                                "Value": "=",
                                "Key": "java-order-service"
                            }
                        ]
                    }
                ],
                "Tags": [
                    {
                        "Type": "service.name",
                        "Value": "=",
                        "Key": "java-order-service"
                    }
                ],
                "Process": {
                    "ServiceName": "java-order-service",
                    "Tags": [
                        {
                            "Type": "service.name",
                            "Value": "=",
                            "Key": "java-order-service"
                        }
                    ]
                },
                "Timestamp": 0,
                "OperationName": "/test",
                "References": [
                    {
                        "RefType": "1",
                        "SpanID": "4q6549c49aaa",
                        "TraceID": "663727c6d5d4436dd1fcaa509d0f4dc0,6c2c8ebff420a8e5b2276ec799446f98,68d3062a4c559ba212a36f61c97ba8ac"
                    }
                ],
                "StartTime": 0,
                "Duration": 0,
                "SpanID": "1q23w1q32165",
                "StartTimeMillis": 0
            }
        ]
    }
}

Example2 Common Query Call Chain List 2

This example shows you how to get a Span list by specifying Tag filter conditions.

Input Example

POST / HTTP/1.1
Host: apm.intl.tencentcloudapi.com
Content-Type: application/json
X-TC-Action: DescribeGeneralSpanList
<Common request parameters>

{
    "OrderBy": {
        "Value": "startTime",
        "Key": "desce"
    },
    "Filters": [
        {
            "Key": "pulsar:sub_name",
            "Type": "=",
            "Value": "participants"
        }
    ],
    "Limit": 0,
    "Offset": 10,
    "InstanceId": "52Dpv13GR",
    "BusinessName": "tdmq",
    "StartTime": 1621923035,
    "EndTime": 1621923038
}

Output Example

{
    "Response": {
        "TotalCount": 0,
        "RequestId": "test-test-test",
        "Spans": [
            {
                "TraceID": "663727c6d5d4436dd1fcaa509d0f4dc0,6c2c8ebff420a8e5b2276ec799446f98,68d3062a4c559ba212a36f61c97ba8ac",
                "Logs": [
                    {
                        "Timestamp": 0,
                        "Fields": [
                            {
                                "Type": "job",
                                "Value": "=",
                                "Key": "test1"
                            }
                        ]
                    }
                ],
                "Tags": [
                    {
                        "Type": "=",
                        "Value": "java-order-service",
                        "Key": "service.name"
                    }
                ],
                "Process": {
                    "ServiceName": "java-order-service",
                    "Tags": [
                        {
                            "Type": "job",
                            "Value": "=",
                            "Key": "test2"
                        }
                    ]
                },
                "Timestamp": 0,
                "OperationName": "/testOperation",
                "References": [
                    {
                        "RefType": "1",
                        "SpanID": "qertuytw",
                        "TraceID": "663727c6d5d4436dd1fcaa509d0f4dc0,6c2c8ebff420a8e5b2276ec799446f98,68d3062a4c559ba212a36f61c97ba8ac"
                    }
                ],
                "StartTime": 0,
                "Duration": 0,
                "SpanID": "xasfvava",
                "StartTimeMillis": 0
            }
        ]
    }
}

5. Developer Resources

SDK

TencentCloud API 3.0 integrates SDKs that support various programming languages to make it easier for you to call APIs.

Command Line Interface

6. Error Code

The following only lists the error codes related to the API business logic. For other error codes, see Common Error Codes.

Error Code Description
AuthFailure CAM signature/authentication error.
AuthFailure.UnauthorizedOperation AuthFailure.UnauthorizedOperation
FailedOperation Operation failed.
FailedOperation.AppIdNotMatchInstanceInfo The appid does not match the business system information.
FailedOperation.InstanceIdIsEmpty Business system id is empty.
FailedOperation.InstanceNotFound The apm business system does not exist.
InternalError Internal error.

Help and Support

Was this page helpful?

Help us improve! Rate your documentation experience in 5 mins.

Feedback