Modifying a Tracker

Function

This API is used to modify configurations of a tracker, including trace transfer to OBS buckets, key event notifications, trace file encryption, trace search and analysis using LTS, trace file integrity check, and tracker enablement or disablement. Modifying tracker parameters does not affect the existing operation records. After the modification is complete, the new rules are immediately applied to operation recording.

URI

PUT /v1.0/{project_id}/tracker/{tracker_name}

Table 1 Path parameters

Parameter

Mandatory

Type

Description

project_id

Yes

String

Project ID. For details about how to obtain a project ID, see Obtaining a Project ID.

tracker_name

Yes

String

Tracker name. Currently, only one tracker is allowed for each tenant. The tracker name is system.

Request Parameters

Table 2 Request body parameters

Parameter

Mandatory

Type

Description

bucket_name

No

String

OBS bucket name. The value contains 3 to 63 characters and must start with a digit or lowercase letter. Only lowercase letters, digits, hyphens (-), and periods (.) are allowed.

file_prefix_name

No

String

Prefix of trace files that need to be stored in OBS buckets. The value can contain 0 to 64 characters, including letters, digits, hyphens (-), underscores (_), and periods (.).

status

No

String

Tracker status. The value can be enabled or disabled. If you change the value to disabled, the tracker stops recording traces.

Value:

  • enabled

  • disabled

is_obs_created

No

Boolean

Whether an OBS bucket is created. If the value is true, an OBS bucket will be created to store trace files. If the value is false, trace files will be stored in an existing OBS bucket. A bucket name contains 3 to 64 characters, including digits, letters, and a hyphen (-) or a period (.).

lts

No

Lts object

Dump LTS.

log_file_validate

No

LogFileValidate object

File verification.

Table 3 Lts

Parameter

Mandatory

Type

Description

is_lts_enabled

Yes

Boolean

Indicates whether to enable the function of dumping data to LTS.

log_group_name

Yes

String

Name of the log group that CTS creates in LTS.

log_topic_name

Yes

String

Name of the log topic that CTS creates in LTS.

Table 4 LogFileValidate

Parameter

Mandatory

Type

Description

is_support_validate

Yes

Boolean

Whether to enable trace file verification.

Response Parameters

None

Example Request

PUT https://{endpoint}/v1.0/{project_id}/tracker/system

{
 "bucket_name" : "my_created_bucket",
 "file_prefix_name" : "some_folder",
 "is_obs_created": true,
 "lts": {
   "is_lts_enabled": true,
   "log_group_name": "CTS",
   "log_topic_name": 'system-trace'
 },
 "log_file_validate": {
 "is_support_validate": true
 },
 "status" : "disabled"
}

Example Response

None

Status Codes

Status Code

Description

200

The request is successful.

400

The server failed to process the request.

401

The request is rejected due to authentication failure.

403

The server understood the request but refused to authorize it.

404

The server failed to find the requested resource.

500

The request failed to be executed or some trackers failed to be deleted.

Error Codes

For details, see Error Codes.