<?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: Custom metric metadata on lastest versions in Extensions</title>
    <link>https://community.dynatrace.com/t5/Extensions/Custom-metric-metadata-on-lastest-versions/m-p/232054#M3802</link>
    <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;Put this in the root of the YAML instead of under the sql section:&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;metrics:
  - key: custom_costmosdb.postgres.extension.ingestor.last_inserted_at
    metadata:
      tags:
        - myTag
      displayName: Last Inserted
      unit: Seconds&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Fri, 15 Dec 2023 13:53:48 GMT</pubDate>
    <dc:creator>Mike_L</dc:creator>
    <dc:date>2023-12-15T13:53:48Z</dc:date>
    <item>
      <title>Custom metric metadata on lastest versions</title>
      <link>https://community.dynatrace.com/t5/Extensions/Custom-metric-metadata-on-lastest-versions/m-p/232016#M3795</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;I'm writing an Extension 2.0 for SQL data sources and I want to give custom metric metadata like display name and unit.&lt;/P&gt;
&lt;P&gt;A sample looks like this:&lt;/P&gt;
&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;- group: ingestor_metrics
    featureSet: ingestor
    query: &amp;gt;
      SELECT 
        topic_name,
        EXTRACT(epoch FROM CURRENT_TIMESTAMP AT TIME ZONE 'utc' - max(commit_timestamp))::float AS last_inserted_at
      FROM
        statement_enrichment.ingestion_execution_log c 
      GROUP BY topic_name
    dimensions:
      - key: custom_cosmosdb.postgres.extension.ingestor.topic_name
        value: col:topic_name
    metrics:
      - key: custom_cosmosdb.postgres.extension.ingestor.last_inserted_at
        displayName: Last Inserted
        unit: Seconds
        value: col:last_inserted_at
        type: gauge
        interval:
          minutes: 2​&lt;/LI-CODE&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;I have the VSCode add-on and it throws an error that displayName and unit are not allowed. I tried loading an earlier schema (1.253 instead of 1.279 which I'm working now) and it still doesn't allow it.&lt;/P&gt;
&lt;P&gt;I tried also to pass them as metadata like this:&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;  - group: ingestor_metrics
    featureSet: ingestor
    query: &amp;gt;
      SELECT 
        topic_name,
        EXTRACT(epoch FROM CURRENT_TIMESTAMP AT TIME ZONE 'utc' - max(commit_timestamp))::float AS last_inserted_at
      FROM
        statement_enrichment.ingestion_execution_log c 
      GROUP BY topic_name
    dimensions:
      - key: custom_cosmosdb.postgres.extension.ingestor.topic_name
        value: col:topic_name
    metrics:
      - key: custom_cosmosdb.postgres.extension.ingestor.last_inserted_at
        value: col:last_inserted_at
        type: gauge
        interval:
          minutes: 2
        metadata:
            displayName: Last Inserted
            unit: Seconds&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;and I'm getting the error that metadata is not allowed.&lt;/P&gt;
&lt;P&gt;Am I missing something?&lt;/P&gt;
&lt;P&gt;George&lt;/P&gt;</description>
      <pubDate>Fri, 15 Dec 2023 14:39:50 GMT</pubDate>
      <guid>https://community.dynatrace.com/t5/Extensions/Custom-metric-metadata-on-lastest-versions/m-p/232016#M3795</guid>
      <dc:creator>g_kat</dc:creator>
      <dc:date>2023-12-15T14:39:50Z</dc:date>
    </item>
    <item>
      <title>Re: Custom metric metadata on lastest versions</title>
      <link>https://community.dynatrace.com/t5/Extensions/Custom-metric-metadata-on-lastest-versions/m-p/232054#M3802</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;Put this in the root of the YAML instead of under the sql section:&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;metrics:
  - key: custom_costmosdb.postgres.extension.ingestor.last_inserted_at
    metadata:
      tags:
        - myTag
      displayName: Last Inserted
      unit: Seconds&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 15 Dec 2023 13:53:48 GMT</pubDate>
      <guid>https://community.dynatrace.com/t5/Extensions/Custom-metric-metadata-on-lastest-versions/m-p/232054#M3802</guid>
      <dc:creator>Mike_L</dc:creator>
      <dc:date>2023-12-15T13:53:48Z</dc:date>
    </item>
  </channel>
</rss>

