# Queries on internals of APM

**URL:** <https://discuss.elastic.co/t/queries-on-internals-of-apm/244294>\
**Category:** APM\
**Tags:** java\
**Created:** [August 9, 2020, 8:58am UTC](https://discuss.elastic.co/t/queries-on-internals-of-apm/244294 "2020-08-09T08:58:50Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![manohar\_deepu](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/manohar_deepu/32/72797_2.png) [@manohar\_deepu](https://discuss.elastic.co/u/manohar_deepu)\
**Post date:** [August 9, 2020, 8:58am UTC](https://discuss.elastic.co/t/queries-on-internals-of-apm/244294/1 "2020-08-09T08:58:51Z")

</div>

Hi,

I was wondering purely from academic purposes on how the APM attacher intercepts network and DB calls. Since there is no AOP involved as we explicitly don't annotate any of our methods/classes, does the APM do some magic with byte code, if not how does it know what to intercept and get data like queries fired etc?

---

<div class="post-metadata">

**Author:** ![felixbarny](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/felixbarny/32/27341_2.png) [@felixbarny](https://discuss.elastic.co/u/felixbarny)\
**Post date:** [August 10, 2020, 7:12am UTC](https://discuss.elastic.co/t/queries-on-internals-of-apm/244294/2 "2020-08-10T07:12:11Z")

</div>

Hi and thanks for your question!

It should be answered in this FAQ: [https://www.elastic.co/guide/en/apm/agent/java/current/faq.html#faq-how-does-it-work](https://www.elastic.co/guide/en/apm/agent/java/current/faq.html#faq-how-does-it-work)

If something is still unclear don't hesitate asking 🙂

---

<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:** [August 31, 2020, 3:12am UTC](https://discuss.elastic.co/t/queries-on-internals-of-apm/244294/3 "2020-08-31T03:12:19Z")

</div>

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