<?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: [Extension 2.0] Python : Issue with text metrics in Extensions</title>
    <link>https://community.dynatrace.com/t5/Extensions/Extension-2-0-Python-Issue-with-text-metrics/m-p/260350#M5419</link>
    <description>&lt;P&gt;&lt;a href="https://community.dynatrace.com/t5/user/viewprofilepage/user-id/3364"&gt;@Julius_Loman&lt;/a&gt;&amp;nbsp;thanks for the explanation.&lt;/P&gt;&lt;P&gt;On Extension 1.0, we had "&lt;STRONG&gt;state metric&lt;/STRONG&gt;", which allow to have "OK/KO" metric (&lt;EM&gt;with the state_metric method&lt;/EM&gt;).&lt;BR /&gt;So you are saying that with EF2 we lost the state metric ?&lt;/P&gt;&lt;P&gt;If so, I have a huge rework on all my extension...&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;It's a shame that the simulator is useless regarding the metric.&lt;/P&gt;</description>
    <pubDate>Wed, 23 Oct 2024 15:27:45 GMT</pubDate>
    <dc:creator>MathieuB</dc:creator>
    <dc:date>2024-10-23T15:27:45Z</dc:date>
    <item>
      <title>[Extension 2.0] Python : Issue with text metrics</title>
      <link>https://community.dynatrace.com/t5/Extensions/Extension-2-0-Python-Issue-with-text-metrics/m-p/260316#M5415</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;Text metrics seem not working.&lt;/P&gt;&lt;P&gt;&lt;U&gt;Context&lt;/U&gt;: I develop python extensions on my machine, build and upload to Dynatrace. Then the extensions are running on a cloud cluster.&lt;/P&gt;&lt;P&gt;I send 2 metrics :&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="python"&gt;# __main__.py file

self.report_metric("my_metric_text", "OK")
self.report_metric("my_metric_num", 1)&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I run the simulation with the SDK, all is ok :&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;$ dt-sdk run my_extension
...
send_metric: my_metric_text gauge,OK
send_metric: my_metric_num gauge,1
Sent 2 metric lines to EEC: [MintResponse(lines_ok=2, lines_invalid=0, error=None, warnings=None)]
...&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I run the build and the upload, also no error.&lt;/P&gt;&lt;P&gt;Then, when the extension run on the target environnement, I get this error from the log :&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;_send_metrics: 1 invalid metric lines found&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;When I check the metrics data, I only saw the numerical metric. So this is the text metric that is considered as '&lt;STRONG&gt;invalid&lt;/STRONG&gt;'.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I checked the documentation, the 'value' parameter can be a text :&lt;BR /&gt;&lt;EM&gt;&lt;SPAN class=""&gt;&lt;SPAN class=""&gt;value&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN class=""&gt;&lt;SPAN class=""&gt;:&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN class=""&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN class=""&gt;&lt;SPAN class=""&gt;float&lt;/SPAN&gt;&lt;SPAN class=""&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN class=""&gt;&lt;SPAN class=""&gt;|&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN class=""&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN class=""&gt;str&lt;/SPAN&gt;&lt;SPAN class=""&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN class=""&gt;&lt;SPAN class=""&gt;|&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN class=""&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN class=""&gt;int&lt;/SPAN&gt;&lt;SPAN class=""&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN class=""&gt;&lt;SPAN class=""&gt;|&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN class=""&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN class=""&gt;SummaryStat&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="https://dynatrace-extensions.github.io/dt-extensions-python-sdk/api/extension.html#dynatrace_extension.Extension.report_metric" target="_blank" rel="noopener"&gt;https://dynatrace-extensions.github.io/dt-extensions-python-sdk/api/extension.html#dynatrace_extension.Extension.report_metric&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;SPAN class=""&gt;I am missing something ?&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class=""&gt;I am very concerned about the difference between the local run (&lt;EM&gt;with the dt-sdk run command&lt;/EM&gt;) and the 'true' run in production.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class=""&gt;We are at the end of our migration from extension 1.0 to 2.0 and we run all the new extension on local, to not impact production metrics.&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 23 Oct 2024 13:40:41 GMT</pubDate>
      <guid>https://community.dynatrace.com/t5/Extensions/Extension-2-0-Python-Issue-with-text-metrics/m-p/260316#M5415</guid>
      <dc:creator>MathieuB</dc:creator>
      <dc:date>2024-10-23T13:40:41Z</dc:date>
    </item>
    <item>
      <title>Re: [Extension 2.0] Python : Issue with text metrics</title>
      <link>https://community.dynatrace.com/t5/Extensions/Extension-2-0-Python-Issue-with-text-metrics/m-p/260346#M5417</link>
      <description>&lt;P&gt;&lt;a href="https://community.dynatrace.com/t5/user/viewprofilepage/user-id/57910"&gt;@MathieuB&lt;/a&gt;&amp;nbsp;there is no such thing as string metrics in Dynatrace. It accepts the&amp;nbsp;&lt;EM&gt;&lt;SPAN class=""&gt;SummaryStat &lt;/SPAN&gt;&lt;/EM&gt;&lt;SPAN class=""&gt;which is a structure to allow sending min/max/sum/count in a single call. It's not a string.&lt;BR /&gt;&lt;BR /&gt;The &lt;EM&gt;dt-sdk run&lt;/EM&gt; does not include EEC which does the metric value validation, that's why you see different outcomes between the simulator and real deployment.&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 23 Oct 2024 15:02:31 GMT</pubDate>
      <guid>https://community.dynatrace.com/t5/Extensions/Extension-2-0-Python-Issue-with-text-metrics/m-p/260346#M5417</guid>
      <dc:creator>Julius_Loman</dc:creator>
      <dc:date>2024-10-23T15:02:31Z</dc:date>
    </item>
    <item>
      <title>Re: [Extension 2.0] Python : Issue with text metrics</title>
      <link>https://community.dynatrace.com/t5/Extensions/Extension-2-0-Python-Issue-with-text-metrics/m-p/260350#M5419</link>
      <description>&lt;P&gt;&lt;a href="https://community.dynatrace.com/t5/user/viewprofilepage/user-id/3364"&gt;@Julius_Loman&lt;/a&gt;&amp;nbsp;thanks for the explanation.&lt;/P&gt;&lt;P&gt;On Extension 1.0, we had "&lt;STRONG&gt;state metric&lt;/STRONG&gt;", which allow to have "OK/KO" metric (&lt;EM&gt;with the state_metric method&lt;/EM&gt;).&lt;BR /&gt;So you are saying that with EF2 we lost the state metric ?&lt;/P&gt;&lt;P&gt;If so, I have a huge rework on all my extension...&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;It's a shame that the simulator is useless regarding the metric.&lt;/P&gt;</description>
      <pubDate>Wed, 23 Oct 2024 15:27:45 GMT</pubDate>
      <guid>https://community.dynatrace.com/t5/Extensions/Extension-2-0-Python-Issue-with-text-metrics/m-p/260350#M5419</guid>
      <dc:creator>MathieuB</dc:creator>
      <dc:date>2024-10-23T15:27:45Z</dc:date>
    </item>
    <item>
      <title>Re: [Extension 2.0] Python : Issue with text metrics</title>
      <link>https://community.dynatrace.com/t5/Extensions/Extension-2-0-Python-Issue-with-text-metrics/m-p/260352#M5420</link>
      <description>&lt;P&gt;No... Actually the state metric was a little bit "fake". It used a dimension for reporting the status and a constant value of 1.&lt;BR /&gt;So the metric was reported with either status=OK or status=KO dimension in your example.&amp;nbsp; So you just need to send a dummy metric with the value of 1 with the dimension value of your choice.&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;The simulator is not useless. Just this would require an EEC running along with the simulator.&amp;nbsp;&lt;a href="https://community.dynatrace.com/t5/user/viewprofilepage/user-id/26013"&gt;@michal_nalezin&lt;/a&gt;&amp;nbsp; maybe a product idea for you? Simulator is mostly about being able to collect and process the data. It does not valide the results you are sending.&lt;/P&gt;</description>
      <pubDate>Wed, 23 Oct 2024 15:36:44 GMT</pubDate>
      <guid>https://community.dynatrace.com/t5/Extensions/Extension-2-0-Python-Issue-with-text-metrics/m-p/260352#M5420</guid>
      <dc:creator>Julius_Loman</dc:creator>
      <dc:date>2024-10-23T15:36:44Z</dc:date>
    </item>
    <item>
      <title>Re: [Extension 2.0] Python : Issue with text metrics</title>
      <link>https://community.dynatrace.com/t5/Extensions/Extension-2-0-Python-Issue-with-text-metrics/m-p/260356#M5421</link>
      <description>&lt;P&gt;in Extensions v2 as the following figure&lt;/P&gt;&lt;P&gt;1st argument for the metrics name&lt;BR /&gt;2nd argument for the metric value it should be numeric and &lt;FONT color="#FF0000"&gt;cannot be string&lt;/FONT&gt;&lt;BR /&gt;3rd argument is array of dimensions for the current reported data point&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="MostafaHussein_0-1729698220694.png" style="width: 609px;"&gt;&lt;img src="https://community.dynatrace.com/t5/image/serverpage/image-id/24039i7E88E1ADD9D93A70/image-dimensions/609x268?v=v2" width="609" height="268" role="button" title="MostafaHussein_0-1729698220694.png" alt="MostafaHussein_0-1729698220694.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;try to imagine that the data points for getting percentage of cpu usage is&lt;/P&gt;&lt;P&gt;7:45:00pm = 98&lt;BR /&gt;7:46:00pm = 95&lt;BR /&gt;7:47:00pm = 'fully_utilized'&lt;/P&gt;&lt;P&gt;how dynatrace going to give you average value over last 5 minutes ?!!&lt;/P&gt;</description>
      <pubDate>Wed, 23 Oct 2024 15:47:16 GMT</pubDate>
      <guid>https://community.dynatrace.com/t5/Extensions/Extension-2-0-Python-Issue-with-text-metrics/m-p/260356#M5421</guid>
      <dc:creator>MostafaHussein</dc:creator>
      <dc:date>2024-10-23T15:47:16Z</dc:date>
    </item>
    <item>
      <title>Re: [Extension 2.0] Python : Issue with text metrics</title>
      <link>https://community.dynatrace.com/t5/Extensions/Extension-2-0-Python-Issue-with-text-metrics/m-p/260357#M5422</link>
      <description>&lt;P&gt;So all my work was a fake with EF1&amp;nbsp;&lt;span class="lia-unicode-emoji" title=":face_with_tears_of_joy:"&gt;😂&lt;/span&gt; (&lt;FONT size="1 2 3 4 5 6 7"&gt;&lt;EM&gt;please don't tell my compagny&lt;/EM&gt;&lt;/FONT&gt;)&lt;/P&gt;&lt;P&gt;Thanks a lot for your time, I will try to play with the dimensions to retrieve the behaviour I use with EF1.&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Mathieu&lt;/P&gt;</description>
      <pubDate>Wed, 23 Oct 2024 15:47:26 GMT</pubDate>
      <guid>https://community.dynatrace.com/t5/Extensions/Extension-2-0-Python-Issue-with-text-metrics/m-p/260357#M5422</guid>
      <dc:creator>MathieuB</dc:creator>
      <dc:date>2024-10-23T15:47:26Z</dc:date>
    </item>
    <item>
      <title>Re: [Extension 2.0] Python : Issue with text metrics</title>
      <link>https://community.dynatrace.com/t5/Extensions/Extension-2-0-Python-Issue-with-text-metrics/m-p/260372#M5423</link>
      <description>&lt;P&gt;Your work was not fake, the way how DT did that in extension V1 was sort of a hack &lt;span class="lia-unicode-emoji" title=":winking_face_with_tongue:"&gt;😜&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;You should be able to get the exactly same behaviour with Extension V2, just use the same dimensions and values.&lt;/P&gt;</description>
      <pubDate>Wed, 23 Oct 2024 16:46:47 GMT</pubDate>
      <guid>https://community.dynatrace.com/t5/Extensions/Extension-2-0-Python-Issue-with-text-metrics/m-p/260372#M5423</guid>
      <dc:creator>Julius_Loman</dc:creator>
      <dc:date>2024-10-23T16:46:47Z</dc:date>
    </item>
  </channel>
</rss>

