<?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 Get count of service calls per service consumer in Dynatrace API</title>
    <link>https://community.dynatrace.com/t5/Dynatrace-API/Get-count-of-service-calls-per-service-consumer/m-p/165067#M1554</link>
    <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;We have a service that is called by a dozen consumers all of which are monitored by Dynatrace.&amp;nbsp; I am trying to find a way to get the count of service calls done by each service consumer.&amp;nbsp; &amp;nbsp; I have got as far as setting up the REST API query below however I cannot seem to find any way to group the results by the ClientIP or client host name. Please can someone assist?&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;https://###/e/###/api/v2/metrics/query?metricSelector=builtin%3Aservice.requestCount.total,builtin:service.successes.server.rate&amp;amp;entitySelector=type(SERVICE),entityId(SERVICE-B3D4BBE30B3CE27A)&amp;amp;from=now-1h&amp;amp;resolution=h&lt;/P&gt;</description>
    <pubDate>Wed, 21 Aug 2024 10:20:02 GMT</pubDate>
    <dc:creator>Byronk</dc:creator>
    <dc:date>2024-08-21T10:20:02Z</dc:date>
    <item>
      <title>Get count of service calls per service consumer</title>
      <link>https://community.dynatrace.com/t5/Dynatrace-API/Get-count-of-service-calls-per-service-consumer/m-p/165067#M1554</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;We have a service that is called by a dozen consumers all of which are monitored by Dynatrace.&amp;nbsp; I am trying to find a way to get the count of service calls done by each service consumer.&amp;nbsp; &amp;nbsp; I have got as far as setting up the REST API query below however I cannot seem to find any way to group the results by the ClientIP or client host name. Please can someone assist?&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;https://###/e/###/api/v2/metrics/query?metricSelector=builtin%3Aservice.requestCount.total,builtin:service.successes.server.rate&amp;amp;entitySelector=type(SERVICE),entityId(SERVICE-B3D4BBE30B3CE27A)&amp;amp;from=now-1h&amp;amp;resolution=h&lt;/P&gt;</description>
      <pubDate>Wed, 21 Aug 2024 10:20:02 GMT</pubDate>
      <guid>https://community.dynatrace.com/t5/Dynatrace-API/Get-count-of-service-calls-per-service-consumer/m-p/165067#M1554</guid>
      <dc:creator>Byronk</dc:creator>
      <dc:date>2024-08-21T10:20:02Z</dc:date>
    </item>
    <item>
      <title>Re: How to get count of service calls per service consumer</title>
      <link>https://community.dynatrace.com/t5/Dynatrace-API/Get-count-of-service-calls-per-service-consumer/m-p/165099#M1555</link>
      <description>&lt;P&gt;Currently, I do not believe there is an out of the box way to do this.&lt;BR /&gt;This could be possible if you created a request attribute, capturing either client IP address, a request or response header (if the source or service is tracked in a header), or some other Java/.NET method parameter (again, if this is available in the code).&lt;BR /&gt;Next, you would want to create a calculated service metric around this value that you captured for you to split by, the metric should be request count based.&lt;/P&gt;&lt;P&gt;Then you would want to use the metrics api to query the new metric you created. This does consume DDUs (0.001 * splittings * services that this metric applies to * frequency). There are options when creating this type of metric to isolate it to a group or single service.&lt;/P&gt;</description>
      <pubDate>Wed, 28 Apr 2021 12:58:43 GMT</pubDate>
      <guid>https://community.dynatrace.com/t5/Dynatrace-API/Get-count-of-service-calls-per-service-consumer/m-p/165099#M1555</guid>
      <dc:creator>trevor_masseng1</dc:creator>
      <dc:date>2021-04-28T12:58:43Z</dc:date>
    </item>
  </channel>
</rss>

