Configuring CTS to Upload Traces to LTS

Scenarios

This section describes how to enable trace analysis on the Cloud Trace Service (CTS) console to report traces to LTS, so you can query the traces on the LTS console.

Operation process

**Figure 1** Flowchart

Figure 1 Flowchart

Operations in Figure 1 are performed on different consoles:

  1. CTS console: Enabling CTS and creating and configuring a tracker

  1. LTS console: Viewing traces reported by CTS

Enabling CTS

You can perform the following operations to enable CTS and create a tracker.

  1. Log in to the management console.

  2. In the upper left corner of the management console, select the target region and project.

  3. Click Service List and choose Management & Deployment > Cloud Trace Service.

  4. In the navigation pane on the left, choose Tracker.

  5. On the Tracker page, click Enable CTS.

  6. On the displayed page, set OBS Bucket.

    **Figure 2** Enabling CTS

    Figure 2 Enabling CTS

  7. Click OK.

    After you enable CTS, tracker system is automatically created. All recorded traces are associated with the tracker.

    Currently, only one tracker can be created for each account.

Configuring the Tracker

Follow the directions below to enable transfer to LTS so traces can be reported to LTS:

  1. On the Tracker page, click Configure in the Operation column.

    The Configure Tracker page is displayed.

  2. Enable Transfer to LTS.

    **Figure 3** Configuring a tracker

    Figure 3 Configuring a tracker

    Note

    A log group and a log stream will be created automatically for the reported traces on the LTS console.

  3. Click Next to preview the created tracker.

  4. Click Configure.

Viewing Logs in Real Time

You can perform the following operations to view logs reported by CTS:

  1. Click Service List and choose Management & Deployment > Log Tank Service.

  2. In the log group list, click image1 on the left of a log group name. The log stream list is displayed.

  3. Click Log Stream to go to the log details and view real-time logs.

    **Figure 4** Viewing logs in real time

    Figure 4 Viewing logs in real time

    Logs are reported to LTS once every five seconds. You may wait for at most five seconds before the logs are displayed.

    You can control log display by clicking Clear or Pause in the upper right corner.

    • Clear: clears all logs that are displayed in the log display area.

    • Pause: pauses the real-time log display so that you can view details of the displayed logs.

      After you click Pause, the button changes to Continue. You can click Continue to resume the log display.