# APM Java agent: How to customize transaction sample rates based on different controllers

**URL:** <https://discuss.elastic.co/t/apm-java-agent-how-to-customize-transaction-sample-rates-based-on-different-controllers/366360>\
**Category:** Elastic Observability\
**Created:** [September 10, 2024, 8:26pm UTC](https://discuss.elastic.co/t/apm-java-agent-how-to-customize-transaction-sample-rates-based-on-different-controllers/366360 "2024-09-10T20:26:35Z")\
**Posts on this page:** 1\
**Showing post:** 4

<div class="post-metadata">

**Author:** ![Wolfram\_Haussig](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/wolfram_haussig/32/70528_2.png) [@Wolfram\_Haussig](https://discuss.elastic.co/u/Wolfram_Haussig)\
**Post date:** [September 12, 2024, 4:24am UTC](https://discuss.elastic.co/t/apm-java-agent-how-to-customize-transaction-sample-rates-based-on-different-controllers/366360/4 "2024-09-12T04:24:04Z")

</div>

> [@Guoqing\_Yu](#):
>
> I doubt if it's a version incompatibility issue

Tailbased sampling is available in 7.x, but it was made generally available in 8.1: [APM version 8.1 | Elastic Observability [8.15] | Elastic](https://www.elastic.co/guide/en/observability/current/apm-release-notes-8.1.html#_added_18)

Maybe you should consider upgrading your stack some time.

> [@Guoqing\_Yu](#):
>
> index template matching [traces-apm] not found

I think you need to install the assets for the Elastic APM integration from Fleet - even if you use the standalone APM server: [Install and uninstall Elastic Agent integration assets | Fleet and Elastic Agent Guide [7.17] | Elastic](https://www.elastic.co/guide/en/fleet/7.17/install-uninstall-integration-assets.html)

Here is someone, that had a similar issue: [APM Server index template matching [traces-apm.sampled] not found - #2 by simitt](https://discuss.elastic.co/t/apm-server-index-template-matching-traces-apm-sampled-not-found/319677/2)

---

_[View the full topic](https://discuss.elastic.co/t/apm-java-agent-how-to-customize-transaction-sample-rates-based-on-different-controllers/366360)._
