# Recommended setup for Rest service monitoring

**URL:** <https://discuss.elastic.co/t/recommended-setup-for-rest-service-monitoring/196875>\
**Category:** APM\
**Tags:** dotnet\
**Created:** [August 27, 2019, 5:50am UTC](https://discuss.elastic.co/t/recommended-setup-for-rest-service-monitoring/196875 "2019-08-27T05:50:47Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Chris\_Gilligan](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/chris_gilligan/32/46494_2.png) [@Chris\_Gilligan](https://discuss.elastic.co/u/Chris_Gilligan)\
**Post date:** [August 27, 2019, 5:50am UTC](https://discuss.elastic.co/t/recommended-setup-for-rest-service-monitoring/196875/1 "2019-08-27T05:50:48Z")

</div>

Hi,  
We have some rest enpoints we want to use the APM on that get between 50 to 1k requests a second. Being REST the ID of the item they want in in the URL and i generally different for every request. We had to set the capture rate to 0.001 but this means each request shows as a seperate transaction and they are not grouped and it is impossible to find the ones with the actual detailed timings in it. Where as if they were groups on the URL excluding the ID in the URL this would be very easy to do.

Is there something i am meant to be doing to group these transactions together even though the ID in the URL makes them look like different endpoint or service to the APM?

This is on the dotnet version.

Regards,  
Chris

---

<div class="post-metadata">

**Author:** ![Sergey\_Kleyman](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/sergey_kleyman/32/39333_2.png) [@Sergey\_Kleyman](https://discuss.elastic.co/u/Sergey_Kleyman)\
**Post date:** [August 27, 2019, 6:13am UTC](https://discuss.elastic.co/t/recommended-setup-for-rest-service-monitoring/196875/2 "2019-08-27T06:13:28Z")

</div>

Hi @Chris_Gilligan,

I assume that the application in question uses [ASP.NET](http://ASP.NET) (the classic one for Full .NET Framework not [ASP.NET](http://ASP.NET) Core), is that correct? If so we do have [an issue](https://github.com/elastic/apm-agent-dotnet/issues/201) in the backlog to name transactions based on route (assuming it's [ASP.NET](http://ASP.NET) MVC). Does your application use [ASP.NET](http://ASP.NET) MVC? if so which version?  
Regarding what you can do at the moment, before the feature above is implemented, the only way to avoid having IDs in the transaction name is to manually capture transactions by using [agent's public API](https://www.elastic.co/guide/en/apm/agent/dotnet/current/public-api.html#api-start-transaction) instead of relying on automatic capture in ElasticApmModule.

---

<div class="post-metadata">

**Author:** ![Chris\_Gilligan](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/chris_gilligan/32/46494_2.png) [@Chris\_Gilligan](https://discuss.elastic.co/u/Chris_Gilligan)\
**Post date:** [August 27, 2019, 9:49pm UTC](https://discuss.elastic.co/t/recommended-setup-for-rest-service-monitoring/196875/3 "2019-08-27T21:49:29Z")

</div>

Hi @Sergey_Kleyman,  
We run on both 4.6.1 and dotnet core 2.2 with the same codebase so we currently use ServiceStack that sits on top of [ASP.NET](http://ASP.NET) Core webserver.

The system does such a good job of capturing the info it would be a shame to duplicated it. Is there a way i could just manipulate the Transaction in my service to group them at that point? Would changing the Name on the transaction do that?

---

<div class="post-metadata">

**Author:** ![Sergey\_Kleyman](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/sergey_kleyman/32/39333_2.png) [@Sergey\_Kleyman](https://discuss.elastic.co/u/Sergey_Kleyman)\
**Post date:** [August 28, 2019, 4:54am UTC](https://discuss.elastic.co/t/recommended-setup-for-rest-service-monitoring/196875/4 "2019-08-28T04:54:15Z")

</div>

@Chris_Gilligan You are right - an alternative approach would be to leave automatic transaction capturing as is but to change the name during transaction execution. You can access the current transaction using [CurrentTransaction](https://www.elastic.co/guide/en/apm/agent/dotnet/current/public-api.html#api-current-transaction) agent's public API.

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [September 18, 2019, 12:54am UTC](https://discuss.elastic.co/t/recommended-setup-for-rest-service-monitoring/196875/5 "2019-09-18T00:54:26Z")

</div>

This topic was automatically closed 20 days after the last reply. New replies are no longer allowed.
