<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Request attributes: Pick a value from comma separated values in Open Q&amp;A</title>
    <link>https://community.dynatrace.com/t5/Open-Q-A/Request-attributes-Pick-a-value-from-comma-separated-values/m-p/299944#M39090</link>
    <description>&lt;P&gt;Thanks&amp;nbsp;&lt;a href="https://community.dynatrace.com/t5/user/viewprofilepage/user-id/67382"&gt;@sujit_k_singh&lt;/a&gt;&amp;nbsp;, I get the following error&lt;/P&gt;&lt;P&gt;{&lt;BR /&gt;"error": {&lt;BR /&gt;"code": 400,&lt;BR /&gt;"message": "Constraints violated.",&lt;BR /&gt;"constraintViolations": [&lt;BR /&gt;{&lt;BR /&gt;"path": "dataSources[0].parameterName",&lt;BR /&gt;"message": "Incompatible with attribute type.",&lt;BR /&gt;"parameterLocation": "PAYLOAD_BODY",&lt;BR /&gt;"location": null&lt;BR /&gt;}&lt;BR /&gt;]&lt;BR /&gt;}&lt;BR /&gt;}&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;When I look at&amp;nbsp;&lt;A href="https://docs.dynatrace.com/docs/dynatrace-api/configuration-api/service-api/request-attributes-api/post-request-attribute#openapi-definition-MethodReference" target="_blank" rel="noopener"&gt;https://docs.dynatrace.com/docs/dynatrace-api/configuration-api/service-api/request-attributes-api/post-request-attribute#openapi-definition-MethodReference&lt;/A&gt;, it is mentioned parameterName&amp;nbsp;&lt;SPAN&gt;Required if the &lt;/SPAN&gt;&lt;STRONG&gt;source&lt;/STRONG&gt;&lt;SPAN&gt; is one of the following: &lt;/SPAN&gt;POST_PARAMETER&lt;SPAN&gt;, &lt;/SPAN&gt;GET_PARAMETER&lt;SPAN&gt;, &lt;/SPAN&gt;REQUEST_HEADER&lt;SPAN&gt;, &lt;/SPAN&gt;RESPONSE_HEADER&lt;SPAN&gt;, &lt;/SPAN&gt;CUSTOM_ATTRIBUTE, but&amp;nbsp;parameterName is&amp;nbsp;&lt;SPAN&gt;METHOD_PARAM in the above case.&lt;/SPAN&gt;&lt;/P&gt;</description>
    <pubDate>Tue, 26 May 2026 09:45:45 GMT</pubDate>
    <dc:creator>ashik_h2k</dc:creator>
    <dc:date>2026-05-26T09:45:45Z</dc:date>
    <item>
      <title>Request attributes: Pick a value from comma separated values</title>
      <link>https://community.dynatrace.com/t5/Open-Q-A/Request-attributes-Pick-a-value-from-comma-separated-values/m-p/299861#M39076</link>
      <description>&lt;P&gt;Currently In Distributed Tracing, I can see the value as below, under&amp;nbsp;&lt;SPAN&gt;Request attributes, using the below mentioned payload.&amp;nbsp;&lt;/SPAN&gt;&lt;BR /&gt;1. [key1,key2,key3] when&amp;nbsp;"argumentIndex": 1&lt;BR /&gt;2. [value1,value2,value3]&amp;nbsp;when&amp;nbsp;"argumentIndex": 2&lt;/P&gt;&lt;P&gt;Please advise on how I can get the value of&amp;nbsp;"&lt;SPAN&gt;Request-attributes-1&lt;/SPAN&gt;" as only "value2"?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;DIV&gt;&lt;PRE&gt;{&lt;BR /&gt;"name": "&lt;SPAN&gt;Request-attributes-1&lt;/SPAN&gt;",&lt;BR /&gt;"enabled": true,&lt;BR /&gt;"dataType": "STRING",&lt;BR /&gt;"dataSources": [&lt;BR /&gt;{&lt;BR /&gt;"enabled": true,&lt;BR /&gt;"source": "METHOD_PARAM",&lt;BR /&gt;"technology": "JAVA",&lt;BR /&gt;"methods": [&lt;BR /&gt;{&lt;BR /&gt;"method": {&lt;BR /&gt;"visibility": "PUBLIC",&lt;BR /&gt;"modifiers": [&lt;BR /&gt;"ABSTRACT"&lt;BR /&gt;],&lt;BR /&gt;"className": "javax.class1.class2",&lt;BR /&gt;"methodName": "setAttribute",&lt;BR /&gt;"argumentTypes": [&lt;BR /&gt;"java.lang.String",&lt;BR /&gt;"java.lang.Object"&lt;BR /&gt;],&lt;BR /&gt;"returnType": "void"&lt;BR /&gt;},&lt;BR /&gt;"capture": "ARGUMENT",&lt;BR /&gt;"argumentIndex": X,&lt;BR /&gt;"deepObjectAccess": "toString().trim()"&lt;BR /&gt;}&lt;BR /&gt;]&lt;BR /&gt;}&lt;BR /&gt;],&lt;BR /&gt;"normalization": "ORIGINAL",&lt;BR /&gt;"aggregation": "ALL_DISTINCT_VALUES",&lt;BR /&gt;"confidential": false,&lt;BR /&gt;"skipPersonalDataMasking": false&lt;BR /&gt;}&lt;/PRE&gt;&lt;/DIV&gt;</description>
      <pubDate>Thu, 21 May 2026 15:53:35 GMT</pubDate>
      <guid>https://community.dynatrace.com/t5/Open-Q-A/Request-attributes-Pick-a-value-from-comma-separated-values/m-p/299861#M39076</guid>
      <dc:creator>ashik_h2k</dc:creator>
      <dc:date>2026-05-21T15:53:35Z</dc:date>
    </item>
    <item>
      <title>Re: Request attributes: Pick a value from comma separated values</title>
      <link>https://community.dynatrace.com/t5/Open-Q-A/Request-attributes-Pick-a-value-from-comma-separated-values/m-p/299904#M39088</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.dynatrace.com/t5/user/viewprofilepage/user-id/81455"&gt;@ashik_h2k&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The setAttribute(String key, Object value) method takes the key as argument 1 and value as argument 2. The issue is that with argumentIndex: 2 you're capturing all values from every setAttribute call, not just the one where key = "key2".&lt;/P&gt;&lt;P&gt;You need to add a condition on your data source so it only captures argument 2 (value) when argument 1 (key) matches your desired key.&lt;/P&gt;&lt;P&gt;Add valueCondition and conditionArgumentIndex to your payload:&lt;/P&gt;&lt;P&gt;{&lt;BR /&gt;"name": "Request-attributes-1",&lt;BR /&gt;"enabled": true,&lt;BR /&gt;"dataType": "STRING",&lt;BR /&gt;"dataSources": [&lt;BR /&gt;{&lt;BR /&gt;"enabled": true,&lt;BR /&gt;"source": "METHOD_PARAM",&lt;BR /&gt;"technology": "JAVA",&lt;BR /&gt;"methods": [&lt;BR /&gt;{&lt;BR /&gt;"method": {&lt;BR /&gt;"visibility": "PUBLIC",&lt;BR /&gt;"modifiers": ["ABSTRACT"],&lt;BR /&gt;"className": "javax.class1.class2",&lt;BR /&gt;"methodName": "setAttribute",&lt;BR /&gt;"argumentTypes": ["java.lang.String", "java.lang.Object"],&lt;BR /&gt;"returnType": "void"&lt;BR /&gt;},&lt;BR /&gt;"capture": "ARGUMENT",&lt;BR /&gt;"argumentIndex": 2,&lt;BR /&gt;"deepObjectAccess": "toString().trim()"&lt;BR /&gt;}&lt;BR /&gt;],&lt;BR /&gt;"valueCondition": {&lt;BR /&gt;"negate": false,&lt;BR /&gt;"operator": "EQUALS",&lt;BR /&gt;"value": "key2"&lt;BR /&gt;},&lt;BR /&gt;"scope": {&lt;BR /&gt;"tagOfProcessGroup": null&lt;BR /&gt;},&lt;BR /&gt;"parameterName": "key2",&lt;BR /&gt;"conditionSource": "METHOD_PARAM",&lt;BR /&gt;"conditionArgumentIndex": 1&lt;BR /&gt;}&lt;BR /&gt;],&lt;BR /&gt;"normalization": "ORIGINAL",&lt;BR /&gt;"aggregation": "FIRST",&lt;BR /&gt;"confidential": false,&lt;BR /&gt;"skipPersonalDataMasking": false&lt;BR /&gt;}&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;This way you'll only get "value2" when the key is "key2".&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Thanks,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Sujit&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 25 May 2026 11:28:41 GMT</pubDate>
      <guid>https://community.dynatrace.com/t5/Open-Q-A/Request-attributes-Pick-a-value-from-comma-separated-values/m-p/299904#M39088</guid>
      <dc:creator>sujit_k_singh</dc:creator>
      <dc:date>2026-05-25T11:28:41Z</dc:date>
    </item>
    <item>
      <title>Re: Request attributes: Pick a value from comma separated values</title>
      <link>https://community.dynatrace.com/t5/Open-Q-A/Request-attributes-Pick-a-value-from-comma-separated-values/m-p/299944#M39090</link>
      <description>&lt;P&gt;Thanks&amp;nbsp;&lt;a href="https://community.dynatrace.com/t5/user/viewprofilepage/user-id/67382"&gt;@sujit_k_singh&lt;/a&gt;&amp;nbsp;, I get the following error&lt;/P&gt;&lt;P&gt;{&lt;BR /&gt;"error": {&lt;BR /&gt;"code": 400,&lt;BR /&gt;"message": "Constraints violated.",&lt;BR /&gt;"constraintViolations": [&lt;BR /&gt;{&lt;BR /&gt;"path": "dataSources[0].parameterName",&lt;BR /&gt;"message": "Incompatible with attribute type.",&lt;BR /&gt;"parameterLocation": "PAYLOAD_BODY",&lt;BR /&gt;"location": null&lt;BR /&gt;}&lt;BR /&gt;]&lt;BR /&gt;}&lt;BR /&gt;}&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;When I look at&amp;nbsp;&lt;A href="https://docs.dynatrace.com/docs/dynatrace-api/configuration-api/service-api/request-attributes-api/post-request-attribute#openapi-definition-MethodReference" target="_blank" rel="noopener"&gt;https://docs.dynatrace.com/docs/dynatrace-api/configuration-api/service-api/request-attributes-api/post-request-attribute#openapi-definition-MethodReference&lt;/A&gt;, it is mentioned parameterName&amp;nbsp;&lt;SPAN&gt;Required if the &lt;/SPAN&gt;&lt;STRONG&gt;source&lt;/STRONG&gt;&lt;SPAN&gt; is one of the following: &lt;/SPAN&gt;POST_PARAMETER&lt;SPAN&gt;, &lt;/SPAN&gt;GET_PARAMETER&lt;SPAN&gt;, &lt;/SPAN&gt;REQUEST_HEADER&lt;SPAN&gt;, &lt;/SPAN&gt;RESPONSE_HEADER&lt;SPAN&gt;, &lt;/SPAN&gt;CUSTOM_ATTRIBUTE, but&amp;nbsp;parameterName is&amp;nbsp;&lt;SPAN&gt;METHOD_PARAM in the above case.&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 26 May 2026 09:45:45 GMT</pubDate>
      <guid>https://community.dynatrace.com/t5/Open-Q-A/Request-attributes-Pick-a-value-from-comma-separated-values/m-p/299944#M39090</guid>
      <dc:creator>ashik_h2k</dc:creator>
      <dc:date>2026-05-26T09:45:45Z</dc:date>
    </item>
    <item>
      <title>Re: Request attributes: Pick a value from comma separated values</title>
      <link>https://community.dynatrace.com/t5/Open-Q-A/Request-attributes-Pick-a-value-from-comma-separated-values/m-p/299965#M39094</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.dynatrace.com/t5/user/viewprofilepage/user-id/81455"&gt;@ashik_h2k&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Ahhh .. my bad, right — parameterName is incompatible with METHOD_PARAM source type. That field is only valid for POST_PARAMETER, GET_PARAMETER, REQUEST_HEADER, RESPONSE_HEADER, or CUSTOM_ATTRIBUTE sources.&lt;/P&gt;&lt;P&gt;Simply remove the "parameterName": "key2" line from the payload. The filtering is handled entirely by valueCondition + conditionArgumentIndex. Here's the corrected version:&lt;/P&gt;&lt;P&gt;{&lt;BR /&gt;"name": "Request-attributes-1",&lt;BR /&gt;"enabled": true,&lt;BR /&gt;"dataType": "STRING",&lt;BR /&gt;"dataSources": [&lt;BR /&gt;{&lt;BR /&gt;"enabled": true,&lt;BR /&gt;"source": "METHOD_PARAM",&lt;BR /&gt;"technology": "JAVA",&lt;BR /&gt;"methods": [&lt;BR /&gt;{&lt;BR /&gt;"method": {&lt;BR /&gt;"visibility": "PUBLIC",&lt;BR /&gt;"modifiers": ["ABSTRACT"],&lt;BR /&gt;"className": "javax.class1.class2",&lt;BR /&gt;"methodName": "setAttribute",&lt;BR /&gt;"argumentTypes": ["java.lang.String", "java.lang.Object"],&lt;BR /&gt;"returnType": "void"&lt;BR /&gt;},&lt;BR /&gt;"capture": "ARGUMENT",&lt;BR /&gt;"argumentIndex": 2,&lt;BR /&gt;"deepObjectAccess": "toString().trim()"&lt;BR /&gt;}&lt;BR /&gt;],&lt;BR /&gt;"valueCondition": {&lt;BR /&gt;"negate": false,&lt;BR /&gt;"operator": "EQUALS",&lt;BR /&gt;"value": "key2"&lt;BR /&gt;},&lt;BR /&gt;"scope": {&lt;BR /&gt;"tagOfProcessGroup": null&lt;BR /&gt;},&lt;BR /&gt;"conditionSource": "METHOD_PARAM",&lt;BR /&gt;"conditionArgumentIndex": 1&lt;BR /&gt;}&lt;BR /&gt;],&lt;BR /&gt;"normalization": "ORIGINAL",&lt;BR /&gt;"aggregation": "FIRST",&lt;BR /&gt;"confidential": false,&lt;BR /&gt;"skipPersonalDataMasking": false&lt;BR /&gt;}&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;The parameterName field was the culprit causing the 400 error. Removing it should resolve the constraint violation.&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Sujit&lt;/P&gt;</description>
      <pubDate>Tue, 26 May 2026 21:38:46 GMT</pubDate>
      <guid>https://community.dynatrace.com/t5/Open-Q-A/Request-attributes-Pick-a-value-from-comma-separated-values/m-p/299965#M39094</guid>
      <dc:creator>sujit_k_singh</dc:creator>
      <dc:date>2026-05-26T21:38:46Z</dc:date>
    </item>
  </channel>
</rss>

