Get hands-on experience with 20+ free Google Cloud products and $300 in free credit for new customers.

Data Collector: multiple data fields in a single policy

Data Collector: multiple data fields in a single policy.

Is it possible to have multiple data fields collected in a single Data Capture policy?

e.g.

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<DataCapture name="DC-DWP-167" continueOnError="false" enabled="true">
    <DisplayName>Multiple Data Fields</DisplayName>
    <IgnoreUnresolvedVariables>false</IgnoreUnresolvedVariables>
    <Capture>
        <Collect ref="response.header.Date" default="0"/>
        <DataCollector>dc_response_header_date</DataCollector>
        
        <Collect ref="jwt.Verify-Firebase-JWT.claim.name" default="0"/>
        <DataCollector>dc_req_username</DataCollector>
        
        <Collect ref="some third data field to capture" default="0"/>
        <DataCollector>dc_req_data_field_3</DataCollector>
    </Capture>
</DataCapture>

thanks,

BR, Optimism

0 1 330
1 REPLY 1

@optimism yes, as per the current documentation states, it's possible, with some limitations

quote:

  • You can use multiple <Capture> elements, provided they use distinct values for the respective child <DataCollector elements. For example, if you define two data collector resources named dc_data_collector and dc_data_collector2, you can include the following <Capture> blocks in a policy:
     
        <Capture>
            <DataCollector>dc_data_collector</DataCollector>
            <Collect ref="my_data_variable" />
        </Capture>
        <Capture>
            <DataCollector>dc_data_collector2</DataCollector>
            <Collect ref="my_data_variable2" />
        </Capture>

    However, you cannot include two <Capture> elements that refer to the same data collector resource in the same policy.

  • If you use a data collector in multiple policies, the captured data will be overwritten by the last policy that executes.

Br,

Marcello