<?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 How to delete Grail metric in Open Q&amp;A</title>
    <link>https://community.dynatrace.com/t5/Open-Q-A/How-to-delete-Grail-metric/m-p/272744#M36007</link>
    <description>&lt;P&gt;How can a grail metric or Grail metric data points be deleted? The classic metrics can be deleted using the Classic Metric v2 API (&amp;nbsp;&lt;A href="https://docs.dynatrace.com/docs/shortlink/api-metrics-v2-del-metric" target="_blank" rel="noopener"&gt;https://docs.dynatrace.com/docs/shortlink/api-metrics-v2-del-metric&lt;/A&gt;), but deleting them does not delete the Grail counterpart metric (speaking about metric created using OpenPipeline or ingestion).&lt;BR /&gt;&lt;BR /&gt;Grail metrics can't be assigned to a bucket (so the bucket can be dropped), also you can't delete data from the default metric bucket or create a new metrics bucket.&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;There is a record deletion API (&amp;nbsp;&lt;A href="https://docs.dynatrace.com/docs/shortlink/record-deletion-in-grail" target="_blank" rel="noopener"&gt;https://docs.dynatrace.com/docs/shortlink/record-deletion-in-grail&lt;/A&gt;&amp;nbsp;), however, it does not support metric data either.&lt;BR /&gt;&lt;BR /&gt;Any ideas?&lt;/P&gt;</description>
    <pubDate>Fri, 21 Mar 2025 13:20:18 GMT</pubDate>
    <dc:creator>Julius_Loman</dc:creator>
    <dc:date>2025-03-21T13:20:18Z</dc:date>
    <item>
      <title>How to delete Grail metric</title>
      <link>https://community.dynatrace.com/t5/Open-Q-A/How-to-delete-Grail-metric/m-p/272744#M36007</link>
      <description>&lt;P&gt;How can a grail metric or Grail metric data points be deleted? The classic metrics can be deleted using the Classic Metric v2 API (&amp;nbsp;&lt;A href="https://docs.dynatrace.com/docs/shortlink/api-metrics-v2-del-metric" target="_blank" rel="noopener"&gt;https://docs.dynatrace.com/docs/shortlink/api-metrics-v2-del-metric&lt;/A&gt;), but deleting them does not delete the Grail counterpart metric (speaking about metric created using OpenPipeline or ingestion).&lt;BR /&gt;&lt;BR /&gt;Grail metrics can't be assigned to a bucket (so the bucket can be dropped), also you can't delete data from the default metric bucket or create a new metrics bucket.&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;There is a record deletion API (&amp;nbsp;&lt;A href="https://docs.dynatrace.com/docs/shortlink/record-deletion-in-grail" target="_blank" rel="noopener"&gt;https://docs.dynatrace.com/docs/shortlink/record-deletion-in-grail&lt;/A&gt;&amp;nbsp;), however, it does not support metric data either.&lt;BR /&gt;&lt;BR /&gt;Any ideas?&lt;/P&gt;</description>
      <pubDate>Fri, 21 Mar 2025 13:20:18 GMT</pubDate>
      <guid>https://community.dynatrace.com/t5/Open-Q-A/How-to-delete-Grail-metric/m-p/272744#M36007</guid>
      <dc:creator>Julius_Loman</dc:creator>
      <dc:date>2025-03-21T13:20:18Z</dc:date>
    </item>
    <item>
      <title>Re: Delete grail metric</title>
      <link>https://community.dynatrace.com/t5/Open-Q-A/How-to-delete-Grail-metric/m-p/272866#M36021</link>
      <description>&lt;P&gt;I don't think this capability exists yet within the API, mainly because the raw metric data points are not accessible via any fetch command, which by extension places them beyond the reach of the current record deletion API. I haven't tried this, but it's worth trying whether the API will allow deletion of a metric series using a query like the below.&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;fetch metric.series
| filter startsWith(metric.key, "&amp;lt;Grail metric key here&amp;gt;")&lt;/LI-CODE&gt;&lt;P&gt;If that doesn't work then I suspect that support/engineering would have to do this in the back-end on a case-by-case basis.&lt;/P&gt;</description>
      <pubDate>Wed, 19 Mar 2025 01:27:14 GMT</pubDate>
      <guid>https://community.dynatrace.com/t5/Open-Q-A/How-to-delete-Grail-metric/m-p/272866#M36021</guid>
      <dc:creator>marco_irmer</dc:creator>
      <dc:date>2025-03-19T01:27:14Z</dc:date>
    </item>
    <item>
      <title>Re: Delete grail metric</title>
      <link>https://community.dynatrace.com/t5/Open-Q-A/How-to-delete-Grail-metric/m-p/272960#M36030</link>
      <description>&lt;P&gt;&lt;a href="https://community.dynatrace.com/t5/user/viewprofilepage/user-id/19769"&gt;@marco_irmer&lt;/a&gt;&amp;nbsp;no, unfortunately it can't be deleted:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;{
  "error": {
    "code": 400,
    "message": "metric.series doesn't allow record deletion.",
    "errorDetails": []
  }
}&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;What happened and why this is needed:&amp;nbsp;&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;I have a metric based on business events, split by HTTP status&lt;/LI&gt;&lt;LI&gt;HTTP status is, wondering why, stored as Double which is automatically casted to string, however has a decimal point. See more &lt;A href="https://community.dynatrace.com/t5/Open-Q-A/Bizevents-http-status-type-and-metric-dimension/m-p/272636/highlight/true#M35998" target="_self"&gt;here&lt;/A&gt;.&lt;/LI&gt;&lt;LI&gt;I converted it to long&lt;/LI&gt;&lt;LI&gt;This metric how has the same dimension with different types&lt;/LI&gt;&lt;LI&gt;This breaks visualizations since numeric dimension values can be used for legend (&amp;nbsp;&lt;a href="https://community.dynatrace.com/t5/user/viewprofilepage/user-id/23400"&gt;@zietho&lt;/a&gt;&amp;nbsp;FYI&amp;nbsp;&lt;span class="lia-unicode-emoji" title=":grinning_face:"&gt;😀&lt;/span&gt;, more on this &lt;A href="https://community.dynatrace.com/t5/Product-ideas/Allow-numeric-dimensions-in-tile-legend/idi-p/272677" target="_self"&gt;here&lt;/A&gt; ). If you select a timeframe, your tiles lose the legend and it never comes back unless you edit the tiles.&amp;nbsp;&lt;/LI&gt;&lt;/UL&gt;</description>
      <pubDate>Wed, 19 Mar 2025 15:15:00 GMT</pubDate>
      <guid>https://community.dynatrace.com/t5/Open-Q-A/How-to-delete-Grail-metric/m-p/272960#M36030</guid>
      <dc:creator>Julius_Loman</dc:creator>
      <dc:date>2025-03-19T15:15:00Z</dc:date>
    </item>
    <item>
      <title>Re: Delete grail metric</title>
      <link>https://community.dynatrace.com/t5/Open-Q-A/How-to-delete-Grail-metric/m-p/273011#M36039</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.dynatrace.com/t5/user/viewprofilepage/user-id/3364"&gt;@Julius_Loman&lt;/a&gt;,&lt;/P&gt;&lt;P&gt;I read through the links you posted and I would like to suggest a workaround for your issue with the different types in the dimension. In this query, there are two added commands.&lt;/P&gt;&lt;P&gt;1. fieldsAdd is used to override the existing dimension field so that all timeseries elements have the same format and type&lt;/P&gt;&lt;P&gt;2. summarize is used to re-summarize the timeseries events to actually group the data by the status dimension.&lt;/P&gt;&lt;P&gt;DQL:&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;data record(timestamp = toTimestamp("2025-03-17T08:30:00.000+0100"),status=200),
     record(timestamp = toTimestamp("2025-03-17T08:31:00.000+0100"),status=200),
     record(timestamp = toTimestamp("2025-03-17T08:32:00.000+0100"),status=500),
     record(timestamp = toTimestamp("2025-03-17T08:33:00.000+0100"),status="200"),
     record(timestamp = toTimestamp("2025-03-17T08:34:00.000+0100"),status=200),
     record(timestamp = toTimestamp("2025-03-17T08:34:00.000+0100"),status=200)
| makeTimeseries count = count(), 
    by:{status}
| fieldsAdd status = substring(toString(status),to:3) // take the first three characters
| summarize {takeFirst(timeframe), takeFirst(interval), takefirst(count)}, by: {status} // summarize again (being sure not to skip over any relevant fields/dimensions)&lt;/LI-CODE&gt;&lt;P&gt;The query in its current form the above is limited to 'count' aggregations, but could probably be adapted for more complex use cases. I tested this query in a notebook and the legend worked fine for me.&lt;/P&gt;</description>
      <pubDate>Wed, 19 Mar 2025 23:27:45 GMT</pubDate>
      <guid>https://community.dynatrace.com/t5/Open-Q-A/How-to-delete-Grail-metric/m-p/273011#M36039</guid>
      <dc:creator>marco_irmer</dc:creator>
      <dc:date>2025-03-19T23:27:45Z</dc:date>
    </item>
    <item>
      <title>Re: Delete grail metric</title>
      <link>https://community.dynatrace.com/t5/Open-Q-A/How-to-delete-Grail-metric/m-p/273019#M36042</link>
      <description>&lt;P&gt;Sure it's possible by using DQL directly, but not using explore metric. For non-DQL-savvy users, it's much straightforward to use metric explorer to display metrics. Suppose you have dozens of tiles across your dashboards. In that case, you have to redo them from scratch including visualization options as you can't convert the metric explorer source to DQL (DQL for the metric explorer is just displayed, you can't edit it).&lt;BR /&gt;&lt;BR /&gt;Anyway deleting metrics by metric key is pretty much needed anyway.&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 20 Mar 2025 07:11:46 GMT</pubDate>
      <guid>https://community.dynatrace.com/t5/Open-Q-A/How-to-delete-Grail-metric/m-p/273019#M36042</guid>
      <dc:creator>Julius_Loman</dc:creator>
      <dc:date>2025-03-20T07:11:46Z</dc:date>
    </item>
  </channel>
</rss>

