<?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: Pulling metrics into my app in AppEngine in Developer Q&amp;A Forum</title>
    <link>https://community.dynatrace.com/t5/Developer-Q-A-Forum/Pulling-metrics-into-my-app-in-AppEngine/m-p/229075#M624</link>
    <description>&lt;P&gt;Hi Brett,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;To the best of my knowledge, metrics coming from extensions are already in Grail. You can double check for your specific custom metric by going to the metric screen and finding your metric there. Once you open the metric, you should see the "open with" button. With that, you can query the metric in notebooks&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="sinisa_zubic_1-1700220244736.png" style="width: 400px;"&gt;&lt;img src="https://community.dynatrace.com/t5/image/serverpage/image-id/15619i40554FFFE8A6C6AD/image-size/medium?v=v2&amp;amp;px=400" role="button" title="sinisa_zubic_1-1700220244736.png" alt="sinisa_zubic_1-1700220244736.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;We have a dedicated guide about how to query and visualize any metric within your custom app:&amp;nbsp;&lt;A href="https://developer.dynatrace.com/develop/data/query-and-visualize/" target="_blank"&gt;https://developer.dynatrace.com/develop/data/query-and-visualize/&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Best,&lt;BR /&gt;Sini&lt;/P&gt;</description>
    <pubDate>Fri, 17 Nov 2023 11:24:11 GMT</pubDate>
    <dc:creator>sinisa_zubic</dc:creator>
    <dc:date>2023-11-17T11:24:11Z</dc:date>
    <item>
      <title>Pulling metrics into my app in AppEngine</title>
      <link>https://community.dynatrace.com/t5/Developer-Q-A-Forum/Pulling-metrics-into-my-app-in-AppEngine/m-p/229059#M621</link>
      <description>&lt;P&gt;Hi&lt;/P&gt;&lt;P&gt;I need some help; I am new to AppEngine and development using TypeScript and React.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have a extension I created which is&amp;nbsp;&lt;SPAN&gt;ext:custom.remote.python.dt_generic_sql_timeseries_plugin.database.status:names&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;So the documentation shows this&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&lt;SPAN class=""&gt;&lt;SPAN class=""&gt;So as I understand this would be the query&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&lt;SPAN class=""&gt;&lt;SPAN class=""&gt;&lt;SPAN&gt;&lt;SPAN class=""&gt;const&lt;/SPAN&gt;&lt;SPAN class=""&gt; data &lt;/SPAN&gt;&lt;SPAN class=""&gt;=&lt;/SPAN&gt; &lt;SPAN class=""&gt;await&lt;/SPAN&gt;&lt;SPAN class=""&gt; metricsClient&lt;/SPAN&gt;.&lt;SPAN class=""&gt;query&lt;/SPAN&gt;({&lt;BR /&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;&lt;SPAN&gt;acceptType&lt;/SPAN&gt;&lt;SPAN&gt;:&lt;/SPAN&gt; &lt;SPAN&gt;"application/json; charset=utf-8"&lt;/SPAN&gt;&lt;SPAN&gt;,&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;&lt;SPAN&gt;metricSelector&lt;/SPAN&gt;&lt;SPAN&gt;:&lt;/SPAN&gt; &lt;SPAN&gt;"ext:custom.remote.python.dt_generic_sql_timeseries_plugin.database.status:names"&lt;/SPAN&gt;&lt;SPAN&gt;,&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;&lt;SPAN&gt;resolution&lt;/SPAN&gt;&lt;SPAN&gt;:&lt;/SPAN&gt; &lt;SPAN&gt;"Inf"&lt;/SPAN&gt;&lt;SPAN&gt;,&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;&lt;SPAN&gt;from&lt;/SPAN&gt;&lt;SPAN&gt;:&lt;/SPAN&gt; &lt;SPAN&gt;"now-2h"&lt;/SPAN&gt;&lt;SPAN&gt;,&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;&lt;SPAN&gt;to&lt;/SPAN&gt;&lt;SPAN&gt;:&lt;/SPAN&gt; &lt;SPAN&gt;"now"&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;P&gt;&lt;SPAN&gt;&lt;SPAN class=""&gt;&lt;SPAN class=""&gt;&lt;SPAN&gt;&lt;BR /&gt;});&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&lt;SPAN class=""&gt;&lt;SPAN class=""&gt;&lt;SPAN&gt;My question is how do I display this into the UI of my APP?&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Thank you in advance&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 17 Nov 2023 10:43:59 GMT</pubDate>
      <guid>https://community.dynatrace.com/t5/Developer-Q-A-Forum/Pulling-metrics-into-my-app-in-AppEngine/m-p/229059#M621</guid>
      <dc:creator>brett_schubach1</dc:creator>
      <dc:date>2023-11-17T10:43:59Z</dc:date>
    </item>
    <item>
      <title>Re: Pulling metrics into my app in AppEngine</title>
      <link>https://community.dynatrace.com/t5/Developer-Q-A-Forum/Pulling-metrics-into-my-app-in-AppEngine/m-p/229075#M624</link>
      <description>&lt;P&gt;Hi Brett,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;To the best of my knowledge, metrics coming from extensions are already in Grail. You can double check for your specific custom metric by going to the metric screen and finding your metric there. Once you open the metric, you should see the "open with" button. With that, you can query the metric in notebooks&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="sinisa_zubic_1-1700220244736.png" style="width: 400px;"&gt;&lt;img src="https://community.dynatrace.com/t5/image/serverpage/image-id/15619i40554FFFE8A6C6AD/image-size/medium?v=v2&amp;amp;px=400" role="button" title="sinisa_zubic_1-1700220244736.png" alt="sinisa_zubic_1-1700220244736.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;We have a dedicated guide about how to query and visualize any metric within your custom app:&amp;nbsp;&lt;A href="https://developer.dynatrace.com/develop/data/query-and-visualize/" target="_blank"&gt;https://developer.dynatrace.com/develop/data/query-and-visualize/&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Best,&lt;BR /&gt;Sini&lt;/P&gt;</description>
      <pubDate>Fri, 17 Nov 2023 11:24:11 GMT</pubDate>
      <guid>https://community.dynatrace.com/t5/Developer-Q-A-Forum/Pulling-metrics-into-my-app-in-AppEngine/m-p/229075#M624</guid>
      <dc:creator>sinisa_zubic</dc:creator>
      <dc:date>2023-11-17T11:24:11Z</dc:date>
    </item>
    <item>
      <title>Re: Pulling metrics into my app in AppEngine</title>
      <link>https://community.dynatrace.com/t5/Developer-Q-A-Forum/Pulling-metrics-into-my-app-in-AppEngine/m-p/229124#M625</link>
      <description>&lt;P&gt;Hi Sini,&lt;/P&gt;&lt;P&gt;Doesn't seem to be live in our environments yet&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="brett_schubach1_1-1700229044221.png" style="width: 400px;"&gt;&lt;img src="https://community.dynatrace.com/t5/image/serverpage/image-id/15623iC119A69F783493D2/image-size/medium?v=v2&amp;amp;px=400" role="button" title="brett_schubach1_1-1700229044221.png" alt="brett_schubach1_1-1700229044221.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;hence was trying to use&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="brett_schubach1_2-1700229134567.png" style="width: 400px;"&gt;&lt;img src="https://community.dynatrace.com/t5/image/serverpage/image-id/15624i56102473B3EBCBDB/image-size/medium?v=v2&amp;amp;px=400" role="button" title="brett_schubach1_2-1700229134567.png" alt="brett_schubach1_2-1700229134567.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="brett_schubach1_0-1700228831911.png" style="width: 400px;"&gt;&lt;img src="https://community.dynatrace.com/t5/image/serverpage/image-id/15622i9568E294E2B1C17E/image-size/medium?v=v2&amp;amp;px=400" role="button" title="brett_schubach1_0-1700228831911.png" alt="brett_schubach1_0-1700228831911.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 17 Nov 2023 13:52:46 GMT</pubDate>
      <guid>https://community.dynatrace.com/t5/Developer-Q-A-Forum/Pulling-metrics-into-my-app-in-AppEngine/m-p/229124#M625</guid>
      <dc:creator>brett_schubach1</dc:creator>
      <dc:date>2023-11-17T13:52:46Z</dc:date>
    </item>
    <item>
      <title>Re: Pulling metrics into my app in AppEngine</title>
      <link>https://community.dynatrace.com/t5/Developer-Q-A-Forum/Pulling-metrics-into-my-app-in-AppEngine/m-p/229287#M637</link>
      <description>&lt;P&gt;here you have a simple example showing a cpu metric as a single value chart. just replace the metric selector with your metric.&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;import { metricsClient } from "@dynatrace-sdk/client-classic-environment-v2";
import { Page, SingleValue } from "@dynatrace/strato-components-preview";
import React, { useEffect, useState } from "react";

export const App = () =&amp;gt; {
  const [result, setResult] = useState&amp;lt;any&amp;gt;();
  useEffect(() =&amp;gt; {
    metricsClient.query({
      acceptType: "application/json; charset=utf-8",
      metricSelector: "builtin:host.cpu.idle:splitBy():sort(value(auto,descending)):limit(20)",
      resolution: "inf",
      from: "now-2h",
      to: "now"
    }).then(resp =&amp;gt; { setResult(resp.result[0].data[0].values[0]) });
  }, []);

  return (
    &amp;lt;Page&amp;gt;
      &amp;lt;Page.Main&amp;gt;
        {result &amp;amp;&amp;amp; &amp;lt;SingleValue data={result} /&amp;gt;}
      &amp;lt;/Page.Main&amp;gt;
    &amp;lt;/Page&amp;gt;
  );
};&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;And don't forget to add the scope&amp;nbsp;&lt;SPAN&gt;&lt;FONT face="courier new,courier"&gt;environment-api:metrics:read&lt;/FONT&gt; to the app config file&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 20 Nov 2023 10:14:59 GMT</pubDate>
      <guid>https://community.dynatrace.com/t5/Developer-Q-A-Forum/Pulling-metrics-into-my-app-in-AppEngine/m-p/229287#M637</guid>
      <dc:creator>sinisa_zubic</dc:creator>
      <dc:date>2023-11-20T10:14:59Z</dc:date>
    </item>
    <item>
      <title>Re: Pulling metrics into my app in AppEngine</title>
      <link>https://community.dynatrace.com/t5/Developer-Q-A-Forum/Pulling-metrics-into-my-app-in-AppEngine/m-p/229289#M638</link>
      <description>&lt;P&gt;Thank you so much&amp;nbsp;&lt;SPAN&gt;Sini, appreciate this.&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 20 Nov 2023 10:18:51 GMT</pubDate>
      <guid>https://community.dynatrace.com/t5/Developer-Q-A-Forum/Pulling-metrics-into-my-app-in-AppEngine/m-p/229289#M638</guid>
      <dc:creator>brett_schubach1</dc:creator>
      <dc:date>2023-11-20T10:18:51Z</dc:date>
    </item>
  </channel>
</rss>

