The built-in query parameters supported by the trace query feature of Application Real-Time Monitoring Service (ARMS) are not business-related and may not meet the query requirements of specific business scenarios. You can configure extraction rules for the custom parameters of your application. Then, the application monitoring feature of ARMS can obtain the custom parameters and add them to traces. You can query the traces based on these parameters.

Create an extraction rule

  1. Log on to the EDAS console.
  2. Go to the Application Overview page by using one of the following methods:
    • In the left-side navigation pane, choose Resource Management > Container Service Kubernetes Clusters or Resource Management > Serverless Kubernetes Clusters. In the top navigation bar, select a region. In the upper part of the page, select a microservice namespace. On the Container Service Kubernetes Clusters or Serverless Kubernetes Clusters page, click a cluster ID. In the Applications section of the Cluster Details page, click the name of the application that you want to manage.
    • In the left-side navigation pane, click Applications. In the top navigation bar, select a region. In the upper part of the page, select a microservice namespace. Select Container Service or Serverless Kubernetes Cluster from the Cluster Type drop-down list and click the name of the application that you want to manage.
  3. In the left-side navigation pane, choose Application Settings > Application Settings.
  4. On the Application Settings page, click the Custom parameters tab.
  5. On the Custom parameters tab, click Add custom parameter in the upper-right corner.
  6. In the Add custom parameter dialog box, set the parameters as needed and click OK.
    Add custom parameter dialog box
    Parameter Description
    Rule name The name of the extraction rule.
    Interface type The type of APIs. Only HTTP is supported.
    Parameter extraction rules The one or more conditions used to extract parameters. For HTTP APIs, you can select Parameter, Cookie, Method, or Header from the drop-down list and specify a value. Multiple conditions are supported in a single rule.
    For example, if you want to extract the brand and account parameters from the API whose URL is curl "http://{domain}/api/buy?brand=SIEMENS" -H "account: 123456", you can set conditions in the following ways:
    • Select Parameter from the drop-down list and enter brand in the field.
    • Select Header from the drop-down list and enter account in the field.
    Advanced setting
    Applicable interface The APIs to which the extraction rule is applied. By default, the key is specified as pattern matching and the value is set to /**, which indicates that the rule applies to all APIs. Set this parameter based on your business requirements.
    Call chain full collection Specifies whether to carry out the full trace collection. After you turn on this switch, the sample rate of traces is ignored and the full collection is carried out. By default, this switch is turned off.