<commit_before><?xml version="1.0" encoding="utf-8"?>
<tnt-data-source
        xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
        xsi:noNamespaceSchemaLocation="https://raw.githubusercontent.com/Nastel/tnt4j-streams/master/tnt4j-streams-wmq/config/tnt-data-source-wmq_pcf.xsd">

    <resource-ref id="MQ_PROBE_MAPPINGS" type="ValuesMap" uri="mq_probe_mappings.json"/>

    <java-object name="MQMsgToMQProbeMapPreParser" class="com.jkoolcloud.tnt4j.streams.custom.preparsers.MQMessageToMQProbeStructMap"/>

    <parser name="MqCallContextParser" class="com.jkoolcloud.tnt4j.streams.parsers.ActivityMapParser">
        <field name="EventType" value="EVENT"/>
        <field name="EventName" locator="ApiCall" locator-type="Activity"/>

        <!-- MQ call context fields -->
        <field name="Tag" locator="StrucId" locator-type="Label"/>
        <field name="ApiType" locator="ApiType" locator-type="Label">
            <field-map-ref resource="MQ_PROBE_MAPPINGS.ApiType"/>
        </field>
        <field name="ApiCall" locator="ApiCall" locator-type="Label">
            <field-map-ref resource="MQ_PROBE_MAPPINGS.ApiCall"/>
        </field>
        <field name="CompCode" locator="CompCode" locator-type="Label">
            <field-map-ref resource="MQ_PROBE_MAPPINGS.CompCode"/>
        </field>
        <field name="Severity" locator="CompCode" locator-type="Label">
            <field-map-ref resource="MQ_PROBE_MAPPINGS.Severity"/>
        </field>
        <field name="CompCodeNum" locator="CompCode" locator-type="Label" datatype="Number"/>
        <field name="ReasonCode" locator="Reason" locator-type="Label" datatype="Number"/>
        <field name="HandleConn" locator="HandleConn" locator-type="Label" datatype="Number"/>
        <field name="HandleObj" locator="HandleObj" locator-type="Label" datatype="Number"/>
        <field name="Options" locator="Options" locator-type="Label" datatype="Number"/>
        <field name="DataSize" locator="DataSize" locator-type="Label" datatype="Number"/>
        <field name="QMgrName" locator="QMgrName" locator-type="Label"/>
        <field name="ObjectName" locator="ObjectName" locator-type="Label">    <!-- substring to 48 or first ' ' instead using all 256 -->
            <field-transform lang="groovy"><![CDATA[
                StringUtils.substringBefore ($fieldValue, " ");
            ]]></field-transform>
        </field>
        <field name="ObjectType" locator="ObjectType" locator-type="Label">
            <field-map-ref resource="MQ_PROBE_MAPPINGS.ObjectType"/>
        </field>
        <field name="UserName" locator="UserId" locator-type="Label"/>
        <field name="PId" locator="ProcessId" locator-type="Label"/>
        <field name="TId" locator="ThreadId" locator-type="Label">
            <field-transform lang="groovy" phase="raw"><![CDATA[
                String idStr = $fieldValue == null ? null : Utils.toHexString($fieldValue);
                return "0x00000000000000000000000000000000".equals(idStr) ? null : idStr;
            ]]></field-transform>
        </field>
        <field name="ApplName" locator="ProgramName" locator-type="Label"/>
        <field name="Offset" locator="Offset" locator-type="Label" datatype="Number"/>
        <field name="JobName" locator="JobName" locator-type="Label"/>
        <field name="JobType" locator="JobType" locator-type="Label"/><commit_msg>Add rsource to MQ calls<commit_after><?xml version="1.0" encoding="utf-8"?>
<tnt-data-source
        xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
        xsi:noNamespaceSchemaLocation="https://raw.githubusercontent.com/Nastel/tnt4j-streams/master/tnt4j-streams-wmq/config/tnt-data-source-wmq_pcf.xsd">

    <resource-ref id="MQ_PROBE_MAPPINGS" type="ValuesMap" uri="mq_probe_mappings.json"/>

    <java-object name="MQMsgToMQProbeMapPreParser" class="com.jkoolcloud.tnt4j.streams.custom.preparsers.MQMessageToMQProbeStructMap"/>

    <parser name="MqCallContextParser" class="com.jkoolcloud.tnt4j.streams.parsers.ActivityMapParser">
        <field name="EventType" value="EVENT"/>
        <field name="EventName" locator="ApiCall" locator-type="Activity"/>

        <!-- MQ call context fields -->
        <field name="Tag" locator="StrucId" locator-type="Label"/>
        <field name="ApiType" locator="ApiType" locator-type="Label">
            <field-map-ref resource="MQ_PROBE_MAPPINGS.ApiType"/>
        </field>
        <field name="ApiCall" locator="ApiCall" locator-type="Label">
            <field-map-ref resource="MQ_PROBE_MAPPINGS.ApiCall"/>
        </field>
        <field name="CompCode" locator="CompCode" locator-type="Label">
            <field-map-ref resource="MQ_PROBE_MAPPINGS.CompCode"/>
        </field>
        <field name="Severity" locator="CompCode" locator-type="Label">
            <field-map-ref resource="MQ_PROBE_MAPPINGS.Severity"/>
        </field>
        <field name="CompCodeNum" locator="CompCode" locator-type="Label" datatype="Number"/>
        <field name="ReasonCode" locator="Reason" locator-type="Label" datatype="Number"/>
        <field name="HandleConn" locator="HandleConn" locator-type="Label" datatype="Number"/>
        <field name="HandleObj" locator="HandleObj" locator-type="Label" datatype="Number"/>
        <field name="Options" locator="Options" locator-type="Label" datatype="Number"/>
        <field name="DataSize" locator="DataSize" locator-type="Label" datatype="Number"/>
        <field name="QMgrName" locator="QMgrName" locator-type="Label"/>
        <field name="ObjectName" locator="ObjectName" locator-type="Label">    <!-- substring to 48 or first ' ' instead using all 256 -->
            <field-transform lang="groovy"><![CDATA[
                StringUtils.substringBefore ($fieldValue, " ");
            ]]></field-transform>
        </field>
        <field name="ObjectType" locator="ObjectType" locator-type="Label">
            <field-map-ref resource="MQ_PROBE_MAPPINGS.ObjectType"/>
        </field>
		<field name="ResourceName" formattingPattern="{0}={1}">
            <field-locator locator="ObjectType" locator-type="Activity"/>
            <field-locator locator="ObjectName" locator-type="Activity"/>
        </field>
        <field name="UserName" locator="UserId" locator-type="Label"/>
        <field name="PId" locator="ProcessId" locator-type="Label"/>
        <field name="TId" locator="ThreadId" locator-type="Label">
            <field-transform lang="groovy" phase="raw"><![CDATA[
                String idStr = $fieldValue == null ? null : Utils.toHexString($fieldValue);
                return "0x00000000000000000000000000000000".equals(idStr) ? null : idStr;
            ]]></field-transform>
        </field>
        <field name="ApplName" locator="ProgramName" locator-type="Label"/>
        <field name="Offset" locator="Offset" locator-type="Label" datatype="Number"/>
        <field name="JobName" locator="JobName" locator-type="Label"/>
        <field name="JobType" locator="JobType" locator-type="Label"/>
{'fraction_non_alphanumeric': 0.16274089935760172, 'fraction_numerical': 0.014561027837259101, 'mean_word_length': 3.555266579973992, 'pattern_counts': {'":': 0, '<': 103, '<?xml version=': 2, '>': 103, 'https://': 2, 'lorem ipsum': 0, 'www.': 2, 'xml': 4}, 'pii_count': 0, 'substrings_counts': 2, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6537046', 'n_tokens_mistral': 2275, 'n_tokens_neox': 2153, 'n_words': 339}