Adding Custom Tags

This function is available only in CN East-Shanghai1.

By adding custom tags, you can view the custom tags on the log page. After AOM logs are connected to LTS, you can enter the keywords of the custom tags to search for logs.

  1. Edit the YAML file. Specifically, add the following field under spec:template:metadata:annotations: in the YAML file of the workload:

    kubernetes.AOM.log.relabel: '{"key1":"value1", "key2":"value2"}

  2. Restrictions on custom tags:
    1. A maximum of 16 "key:value" pairs can be set.
    2. The key or value can contain up to 64 characters.
    3. Custom tags are case insensitive and cannot be the same as default tags. For example, if the default tag is po, your custom tag cannot be PO, Po, or pO.

    Default tags:

    "podName", "appName", "containerName", "clusterId","clusterName", "serverlessPkg", "serverlessFunc", "projectId", "serviceID","nameSpace", "pid", "hostId", "hostName", "hostIP", "hostIPv6"