Updated on 2024-09-23 GMT+08:00

Configuring a Tracker

Scenario

You can configure key event notifications of trackers on the CTS console no matter whether the trackers are enabled or not. For enabled trackers, you can also configure Transfer to OBS or Transfer to LTS for trace transfer.

  • You can select an existing OBS bucket for trace transfer. CTS will automatically attach a required policy to the OBS bucket.
  • If you modify the trace file prefix of a tracker, the OBS bucket policy will not be affected.

There are three storage classes of OBS buckets, Standard, Infrequent Access, and Archive. You must use Standard OBS buckets for trace transfer because CTS needs to frequently access the OBS buckets.

The configuration will take effect immediately after it is complete.

This section describes how to configure a data tracker.

Prerequisites

You have enabled CTS and created a data tracker.

Procedure

  1. Log in to the management console.
  2. Click in the upper left corner to select the desired region and project.
  3. Click in the upper left corner and choose Management & Deployment > Cloud Trace Service. The CTS console is displayed.
  4. Choose Tracker List in the left navigation pane.
  5. Click Configure in the Operation column in the row of the target data tracker.
    (1) Configure a management tracker.
    • If you select Yes for Transfer to OBS, specify the following transfer parameters:
      1. OBS Bucket Account indicates whether the OBS bucket used for transfer belongs to the current user or other users.
        • The default value for OBS Bucket Account is Logged-in user.
        • If OBS Bucket Account is set to Logged-in user, you can select an existing OBS bucket or create an OBS bucket directly on the Configure Tracker page.
        • If OBS Bucket Account is set to Other users, you need to enter the name of the bucket used for transfer. Ensure that you have the write permissions on the bucket and the bucket name entered is correct.
      2. Create OBS Bucket: If this function is enabled, an OBS bucket will be created automatically with the name you enter. If the function is disabled, select an existing OBS bucket.
      3. OBS Bucket: Select an existing OBS bucket or create an OBS bucket. CTS will automatically attach a required policy to the OBS bucket.

        Traces are retained in CTS for 7 days. You can transfer traces to OBS buckets for long-term storage.

      4. File Prefix: A prefix is used to mark a transferred trace file. Your specified prefix will be automatically added to the beginning of the name of a transferred file, helping you quickly filter files.
      5. Encrypt Trace File indicates whether trace files stored in the OBS bucket are encrypted. If you set it to Yes, you also need to select a KMS key.
      6. Verify Trace File: When this function is enabled, integrity verification will be performed to check whether trace files in OBS buckets have been tampered with. For details about file integrity verification, see Verifying Trace File Integrity.
    • If you select No for Transfer to OBS, you do not need to set the transfer parameters.

    (2) Configure a data tracker.

    • Operation: Select the data operations to record.
    • Transfer to OBS

      If you select Yes, select an existing OBS bucket or create one directly on the Configure Tracker page and set File Prefix.

      If you select No, you do not need to configure the following parameters.

    • Create OBS Bucket: If this function is enabled, an OBS bucket will be created automatically with the name you enter. If the function is disabled, select an existing OBS bucket.
    • OBS Bucket: You can create an OBS bucket or select an existing OBS bucket.
    • Retention Period: Select the duration for storing traces in the OBS bucket.
    • File Prefix: A prefix is used to mark a transferred trace file. Your specified prefix will be automatically added to the beginning of the name of a transferred file, helping you quickly filter files.
    • Verify Trace File: When this function is enabled, integrity verification will be performed to check whether trace files in OBS buckets have been tampered with. For details about file integrity verification, see Verifying Trace File Integrity.
  6. In the Configure Transfer step, you can modify the transfer settings of the tracker. For details about the parameters, see Table 1.
    Table 1 Parameters for configuring a transfer

    Parameter

    Description

    Transfer to OBS

    If you select Yes, select an existing OBS bucket or create one on the Configure Tracker page and set File Prefix.

    When Transfer to OBS is disabled, no operation is required.

    OBS Bucket

    New: If this function is enabled, an OBS bucket will be created automatically with the name you enter.

    Select Existing: Select an existing OBS bucket.

    Select Bucket

    When you select New, enter an OBS bucket name. The OBS bucket name cannot be empty. It can contain 3 to 63 characters, including only lowercase letters, digits, hyphens (-), and periods (.). It cannot contain two consecutive periods (for example, my..bucket). A period (.) and a hyphen (-) cannot be adjacent to each other (for example, my-.bucket and my.-bucket). Do not use an IP address as a bucket name.

    When you select Existing, select an existing OBS bucket.

    Retention Period

    The duration for storing traces in the OBS bucket. This configuration will apply to the selected bucket and all files in it. Different compliance standards require different trace retention periods. You are advised to set the retention period to at least 180 days.
    • For a data tracker, you can set the duration to 30 days, 60 days, 90 days, 180 days, 3 years, or the same as that of OBS.

    File Prefix

    A prefix is used to mark a transferred trace file. Your specified prefix will be automatically added to the beginning of the name of a transferred file, helping you quickly filter files. Enter 0 to 64 characters. Only letters, digits, hyphens (-), underscores (_), and periods (.) are allowed.

    Transfer to LTS

    When Transfer to LTS is enabled, traces are transferred to the log stream.

    Log group name

    When Transfer to LTS is enabled, the default log group name CTS is set. When Transfer to LTS is disabled, no operation is required.

  7. Click Next > Configure to complete the configuration of the data tracker.

    You can then view the tracker details on the Tracker List page.

    Traces recorded by CTS are delivered periodically to the OBS bucket for storage. If you configure an OBS bucket for a tracker, traces generated during the current cycle (usually several minutes) will be delivered to the configured OBS bucket. For example, if the current cycle is from 12:00:00 to 12:05:00 and you configure an OBS bucket for a tracker at 12:02:00, traces received from 12:00:00 to 12:02:00 will also be delivered to the configured OBS bucket for storage at 12:05:00.