# Use ap-loader to include async-profiler

**URL:** <https://discuss.elastic.co/t/use-ap-loader-to-include-async-profiler/327828>\
**Category:** APM\
**Tags:** java\
**Created:** [March 16, 2023, 8:39am UTC](https://discuss.elastic.co/t/use-ap-loader-to-include-async-profiler/327828 "2023-03-16T08:39:39Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![parttimenerd](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/parttimenerd/32/118518_2.png) [@parttimenerd](https://discuss.elastic.co/u/parttimenerd)\
**Post date:** [March 16, 2023, 8:39am UTC](https://discuss.elastic.co/t/use-ap-loader-to-include-async-profiler/327828/1 "2023-03-16T08:39:39Z")

</div>

I saw that you embed async-profiler binaries yourself. May I propose that you use [ap-loader](https://github.com/jvm-profiling-tools/ap-loader) instead? This is a well tested (and async-profiler creator blessed) packaging of async-profiler into a platform independent JAR. Using it is quite easy, see the project README or [Load AsyncProfiler with ap-loader · Issue #19 · grafana/JPProf · GitHub](https://github.com/grafana/JPProf/issues/19) for the usage in JPProf. I'm happy to create a PR myself for your project.

---

<div class="post-metadata">

**Author:** ![Jack\_Shirazi](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/jack_shirazi/32/91641_2.png) [@Jack\_Shirazi](https://discuss.elastic.co/u/Jack_Shirazi)\
**Post date:** [March 16, 2023, 11:23am UTC](https://discuss.elastic.co/t/use-ap-loader-to-include-async-profiler/327828/2 "2023-03-16T11:23:57Z")

</div>

Thanks Johannes, I'm not sure it benefits us as it means change with no functional benefit in a part of our project that is extremely stable. But we can see the potential maintenance benefit. We'll discuss it in the team and get back on this thread next week.

Nice talks and well done on the JEP 435 proposal!

---

<div class="post-metadata">

**Author:** ![parttimenerd](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/parttimenerd/32/118518_2.png) [@parttimenerd](https://discuss.elastic.co/u/parttimenerd)\
**Post date:** [March 16, 2023, 12:43pm UTC](https://discuss.elastic.co/t/use-ap-loader-to-include-async-profiler/327828/3 "2023-03-16T12:43:24Z")

</div>

It's all about maintenance. If multiple projects use the same library, then it's easier to find any problem that might occur. I'm also committed to testing the library thoroughly and keeping it as stable as possible.

---

<div class="post-metadata">

**Author:** ![Eyal\_Koren](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/eyal_koren/32/36830_2.png) [@Eyal\_Koren](https://discuss.elastic.co/u/Eyal_Koren)\
**Post date:** [March 20, 2023, 8:02am UTC](https://discuss.elastic.co/t/use-ap-loader-to-include-async-profiler/327828/4 "2023-03-20T08:02:05Z")

</div>

We use 1.8.7, doesn't ap-loader support only 2.x?

---

<div class="post-metadata">

**Author:** ![parttimenerd](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/parttimenerd/32/118518_2.png) [@parttimenerd](https://discuss.elastic.co/u/parttimenerd)\
**Post date:** [March 20, 2023, 10:30am UTC](https://discuss.elastic.co/t/use-ap-loader-to-include-async-profiler/327828/5 "2023-03-20T10:30:06Z")

</div>

It does now 🙂

The release is already on [GitHub](https://github.com/jvm-profiling-tools/ap-loader/releases/tag/1.8.7-4) and in the maven snapshot repositories. Should be propagated to maven central in the next few hours.

---

<div class="post-metadata">

**Author:** ![parttimenerd](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/parttimenerd/32/118518_2.png) [@parttimenerd](https://discuss.elastic.co/u/parttimenerd)\
**Post date:** [March 20, 2023, 10:44am UTC](https://discuss.elastic.co/t/use-ap-loader-to-include-async-profiler/327828/6 "2023-03-20T10:44:51Z")

</div>

> **[Maven Central: me.bechberger:ap-loader-all:1.8.7-4](https://central.sonatype.com/artifact/me.bechberger/ap-loader-all/1.8.7-4)**
>
> Maven Central: me.bechberger:ap-loader-all:1.8.7-4

Feel free to ask any other questions, I'm happy to help in any way possible.

---

<div class="post-metadata">

**Author:** ![Eyal\_Koren](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/eyal_koren/32/36830_2.png) [@Eyal\_Koren](https://discuss.elastic.co/u/Eyal_Koren)\
**Post date:** [March 20, 2023, 10:52am UTC](https://discuss.elastic.co/t/use-ap-loader-to-include-async-profiler/327828/7 "2023-03-20T10:52:14Z")

</div>

Sorry, I didn't mean for you to bother and implement that.  
The thing is that the main benefit of using ap-loader is reducing the maintenance burden, but since we are still on 1.x, which is not expected to be updated frequently, there is not such really for us.  
Maybe once we upgrade to 2.x (which requires some effort), this may be included.  
Thanks a lot for proposing! 🙏

---

<div class="post-metadata">

**Author:** ![parttimenerd](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/parttimenerd/32/118518_2.png) [@parttimenerd](https://discuss.elastic.co/u/parttimenerd)\
**Post date:** [March 20, 2023, 10:56am UTC](https://discuss.elastic.co/t/use-ap-loader-to-include-async-profiler/327828/8 "2023-03-20T10:56:06Z")

</div>

It wasn't that much effort. I'm happy to help when you do the upgrading, it should be worthwhile with all the new features and improved stability of async-profiler.

---

<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:** [April 10, 2023, 6:56am UTC](https://discuss.elastic.co/t/use-ap-loader-to-include-async-profiler/327828/9 "2023-04-10T06:56:19Z")

</div>

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