Updated on 2024-11-19 GMT+08:00

Trace Structure

A trace consists of multiple key fields shown in Table 1.

  • This section describes the key trace fields displayed on the CTS console.
  • When some fields are displayed on the CTS console, their formats are optimized for easy understanding.
Table 1 Key trace fields

Field

Mandatory

Type

Description

time

Yes

Long

Timestamp when a trace was generated. The value is the local standard time, for example, 1660927593570. This field is transmitted and stored in the form of a timestamp. It is the total number of milliseconds from 00:00:00, January 1, 1970 to the current time.

user

Yes

UserInfo object

Information of the user who performed the operation that triggered the trace.

request

No

Structure

Request of an operation on resources.

response

No

Structure

Response to a user request, that is, the returned information for an operation on resources.

service_type

Yes

String

Type of a cloud service whose traces are to be queried. The value must be the acronym of a cloud service that has been connected with CTS. It is a word composed of uppercase letters.

event_type

Yes

String

Trace type.

project_id

Yes

String

ID of the project to which the trace belongs.

resource_type

Yes

String

Type of the resource on which the operation was performed.

resource_account_id

No

String

ID of the account to which the resource belongs. This parameter has a value only when resources are operated across tenants. For example, if tenant A operates resources of tenant B, the value is the account ID of account B.

Note: In the cross-tenant scenario, CTS copies an audit log so that both tenants can view the trace on the CTS console.

read_only

No

boolean

Whether a user request is read-only.

tracker_name

No

String

Name of the tracker that records the trace.

  • When trace_type is set to system, the default value system is used.
  • When trace_type is set to data, the value is the name of the corresponding data tracker.

operation_id

Yes

String

Operation ID of the trace.

resource_name

No

String

Name of a resource on which the recorded operation was performed.

resource_id

No

String

ID of a cloud resource on which the recorded operation was performed.

source_ip

Yes

String

IP address of the tenant who performed the operation that triggered the trace. The value of this parameter is empty if the operation is triggered by the system.

domain_id

Yes

String

ID of the account that triggers the trace.

trace_name

Yes

String

Trace name.

trace_rating

Yes

String

Trace status. The value can be normal, warning, or incident.

  • normal: The operation succeeded.
  • warning: The operation failed.
  • incident: The operation caused a serious consequence, for example, a node failure or service interruption.

trace_type

Yes

String

Trace source. For management traces, the value can be ApiCall, ConsoleAction, or SystemAction. For data traces, the value can be ObsSDK or ObsAPI.

api_version

No

String

Version of the API called in a trace.

message

No

Structure

Remarks added by other cloud services to a trace.

record_time

Yes

Number

Timestamp when a trace was recorded by CTS.

trace_id

Yes

String

Trace ID. The value is the UUID generated by the system.

code

No

String

HTTP status code returned by the associated API.

request_id

No

String

Request ID.

location_info

No

String

Additional information required for fault locating after a request error.

endpoint

No

String

Endpoint in the detail page URL of the cloud resource on which a recorded operation was performed.

resource_url

No

String

Detail page URL (excluding the endpoint) of the cloud resource on which a recorded operation was performed.

enterprise_project_id

Yes

String

ID of the enterprise project to which the resource belongs.

user_agent

No

String

ID of the request client agent.

content_length

No

Number

Length of the request message body.

total_time

No

Number

Request response time.

Table 2 UserInfo

Field

Mandatory

Type

Description

type

Yes

String

Operator identity type.

principal_id

Yes

String

ID of the user who performs the operation.

  • For an IAM user, the format is <user-id>.
  • For an IAM agency session identity, the format is <agency-id>:<agency-session-name>.
  • For an IAM federated identity, the format is <idp_id>:<user-session-name>.

principal_urn

Yes

String

URN of the operator.

  • For an IAM user, the format is iam::<account-id>:user:<user-name>.
  • For an IAM agency session identity, the format is sts::<account-id>:assumed-agency:<agency-name>/<agency-session-name>.
  • For an IAM federated identity, the format is sts::<account-id>:external-user:<idp_id>/<user-session-name>.

account_id

Yes

String

Account ID. To obtain it, hover over the username in the upper right corner of the console, select My Credentials from the drop-down menu, and locate the ID on the right of Account ID.

access_key_id

Yes

String

Access key ID.

id

Yes

String

User ID. To obtain it, hover over the username in the upper right corner of the console, select My Credentials from the drop-down menu, and locate the ID on the right of IAM User ID.

name

Yes

String

Username. To obtain it, hover over the username in the upper right corner of the console, select My Credentials from the drop-down menu, and locate the name on the right of IAM User Name.

domain

Yes

BaseUser object

Domain information of the user who performed the operation generating the trace.

user_name

Yes

String

Username.

The meaning of user_name is the same as that of name.

principal_is_root_user

Yes

String

Whether the operator is a root user.

  • If the value is true, the operator is a root user.
  • If the value is false, the operator is an IAM user of an entrusted session identity, a federated identity, or a non-root user.

invoked_by

Yes

Array of strings

Name of the service that sends the request. The value is ["service.console"] for console operations.

session_context

No

SessionContext object

Temporary security credential attribute.

Table 3 BaseUser

Field

Mandatory

Type

Description

id

Yes

String

Account ID. To obtain it, hover over the username in the upper right corner of the console, select My Credentials from the drop-down menu, and locate the ID on the right of Account ID.

name

Yes

String

Account name. To obtain it, hover over the username in the upper right corner of the console, select My Credentials from the drop-down menu, and locate the name on the right of Account Name.

Table 4 SessionContext

Field

Mandatory

Type

Description

attributes

No

Attributes object

Temporary security credential attribute.

Table 5 Attributes

Field

Mandatory

Type

Description

mfa_authenticated

No

String

Whether MFA identity authentication has been passed.

created_at

No

String

Time when a temporary security credential is issued.