Querying Archived Traces
Scenarios
CTS periodically sends trace files to OBS buckets. A trace file is a collection of traces. CTS generates trace files based on services and transfer cycle, and adjusts the number of traces contained in each trace file as needed.
This section describes how to obtain historical operation records from trace files downloaded from the OBS bucket.
Prerequisites
You have configured a tracker. For details, see section "Configuring a Tracker" in the Cloud Trace Service User Guide.
Procedure
- Log in to the management console.
- Click in the upper left corner and choose Management & Deployment > Cloud Trace Service. The CTS console is displayed.
- Choose Tracker List in the navigation pane on the left.
- Click a bucket in the OBS Bucket column.
- Select the target trace by choosing in sequence an OBS bucket, the CloudTraces directory, a region, a year, a month, a day, a tracker name, and a service directory. Download the trace file to the default path by clicking Download in the Operation column. To download the trace file to a customized path, click More > Download As.
- The trace file storage path is as follows:
OBS bucket name > CloudTraces > Region > Year > Month > Day > Tracker name > Service directory
An example is User-defined name > CloudTraces > Region > 2016 > 5 > 19 > system > ECS.
- The trace file naming format is as follows:
Trace file prefix_CloudTrace_Region/Region-project_Time when the trace file was uploaded to OBS: Year-Month-DayTHour-Minute-SecondZ_Random characters.json.gz
An example is File Prefix_CloudTrace_region_2016-05-30T16-20-56Z_21d36ced8c8af71e.json.gz.
The OBS bucket name and trace file prefix are user-defined, and other parameters are automatically generated.
For details about key fields in the CTS trace structure, see section "Trace Structure" in the Cloud Trace Service User Guide and section "Example Traces" in the Cloud Trace Service User Guide.
Figure 1 Viewing trace file content
- The trace file storage path is as follows:
- Decompress the downloaded package to obtain a JSON file with the same name as the package. Open the JSON file using a text file editor to view traces.
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.