All Products
Search
Document Center

Enterprise Distributed Application Service:Create rules to extract custom parameters

Last Updated:Jul 11, 2023

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. In the left-side navigation pane, choose Application Management > Applications. In the top navigation bar, select a region. In the upper part of the page, select a microservice namespace. From the Cluster Type drop-down list, select Kubernetes Cluster. Then, find the application that you want to manage and click the name in the Application Name column.

  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
    ParameterDescription
    Rule nameThe name of the extraction rule.
    Interface typeThe type of APIs. Only HTTP is supported.
    Parameter extraction rulesThe 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 interfaceThe 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 collectionSpecifies 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.