# APM JavaScript Agent linking with backend

**URL:** <https://discuss.elastic.co/t/apm-javascript-agent-linking-with-backend/142683>\
**Category:** APM\
**Created:** [August 2, 2018, 6:20am UTC](https://discuss.elastic.co/t/apm-javascript-agent-linking-with-backend/142683 "2018-08-02T06:20:37Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![gjelenc](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/gjelenc/32/33992_2.png) [@gjelenc](https://discuss.elastic.co/u/gjelenc)\
**Post date:** [August 2, 2018, 6:20am UTC](https://discuss.elastic.co/t/apm-javascript-agent-linking-with-backend/142683/1 "2018-08-02T06:20:37Z")

</div>

Hi,  
I successfully integrated APM JavaScript agent in one of our test applications based on Ionic framework.  
That test application is connected to backend microservices, which are also producing logs and are collected via filebeat to ES.

My question is, what is the common or best practice to pair logs from apm agent and from backend microservices ?

User name or id are not an option.

Best regards,  
Gregor

---

<div class="post-metadata">

**Author:** ![wa7son](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/wa7son/32/21259_2.png) [@wa7son](https://discuss.elastic.co/u/wa7son)\
**Post date:** [August 2, 2018, 8:46am UTC](https://discuss.elastic.co/t/apm-javascript-agent-linking-with-backend/142683/2 "2018-08-02T08:46:42Z")

</div>

Hi Gregor

The process currently depends on your stack. What programing language are your backend microservices written in?

Best,  
Thomas

---

<div class="post-metadata">

**Author:** ![gjelenc](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/gjelenc/32/33992_2.png) [@gjelenc](https://discuss.elastic.co/u/gjelenc)\
**Post date:** [August 2, 2018, 9:56am UTC](https://discuss.elastic.co/t/apm-javascript-agent-linking-with-backend/142683/3 "2018-08-02T09:56:08Z")

</div>

All microservices are written in Java and all context information are logged and collected with filebeat to ES.

Best regards,  
Gregor

---

<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 2, 2018, 1:24pm UTC](https://discuss.elastic.co/t/apm-javascript-agent-linking-with-backend/142683/4 "2018-08-02T13:24:39Z")

</div>

I've created an issue for that: [https://github.com/elastic/apm-agent-java/issues/149](https://github.com/elastic/apm-agent-java/issues/149)

Should be fairly simple to expose these IDs

---

<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 23, 2018, 9:24am UTC](https://discuss.elastic.co/t/apm-javascript-agent-linking-with-backend/142683/5 "2018-08-23T09:24:40Z")

</div>

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