# Trace Apache Webserver to Python application

**URL:** <https://discuss.elastic.co/t/trace-apache-webserver-to-python-application/337757>\
**Category:** Elastic Observability\
**Created:** [July 6, 2023, 7:13am UTC](https://discuss.elastic.co/t/trace-apache-webserver-to-python-application/337757 "2023-07-06T07:13:11Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![Dixit](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dixit/32/111369_2.png) [@Dixit](https://discuss.elastic.co/u/Dixit)\
**Post date:** [July 6, 2023, 7:13am UTC](https://discuss.elastic.co/t/trace-apache-webserver-to-python-application/337757/1 "2023-07-06T07:13:11Z")

</div>

hi Team,

There is a need to trace the Request from Apache WebServer to Python Backend (Zope).

How can we utilize Elastic APM to trace the request from Apache Webserver (entry point), already ZOPE (python backend) we have tracing enabled.

Application Flow :

Apache Webserver -\> Zope - Python Nodes -\> Backend SQL DB

Apache Webserver am unable to bind/wire it as Elastic APM Agent didn't find suitable.

Thanks,  
Dixit

---

<div class="post-metadata">

**Author:** ![Dixit](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dixit/32/111369_2.png) [@Dixit](https://discuss.elastic.co/u/Dixit)\
**Post date:** [July 17, 2023, 5:42am UTC](https://discuss.elastic.co/t/trace-apache-webserver-to-python-application/337757/2 "2023-07-17T05:42:12Z")

</div>

hi @basepi ,

Appreciate your help here

---

<div class="post-metadata">

**Author:** ![basepi](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/basepi/32/53056_2.png) [@basepi](https://discuss.elastic.co/u/basepi)\
**Post date:** [July 17, 2023, 8:44pm UTC](https://discuss.elastic.co/t/trace-apache-webserver-to-python-application/337757/3 "2023-07-17T20:44:34Z")

</div>

Typically users don't trace the web server itself. There's no established pattern for "middleware" to trace requests inside of Apache web server. Apache would need to add traceparent headers to be included in a distributed trace.

Instead, if you're looking for the entire user experience, you might consider looking into our RUM (real user monitoring) solution: [Performing Real User Monitoring (RUM) with Elastic APM | Elastic Blog](https://www.elastic.co/blog/performing-real-user-monitoring-rum-with-elastic-apm)

Once RUM is implemented, you'll see the entire distributed trace from the user's browser, through your web server, and into the traces you already have from Zope. Then you can see if there are latency issues between the user's request and your Zope application (which might be web server issues).

We do have a [filebeat module](https://www.elastic.co/guide/en/beats/filebeat/7.17/filebeat-module-apache.html) which allows for easy collection of Apache logs.

---

<div class="post-metadata">

**Author:** ![Dixit](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dixit/32/111369_2.png) [@Dixit](https://discuss.elastic.co/u/Dixit)\
**Post date:** [July 20, 2023, 5:17am UTC](https://discuss.elastic.co/t/trace-apache-webserver-to-python-application/337757/4 "2023-07-20T05:17:19Z")

</div>

Thanks @basepi

There is a quite bit challenge in implementing Angular \< 1.2 with RUM. The Javascript code provided by Elastic APM - RUM does have a problem in running.

So had a thought of tracing using the WebServer.

Having said that, will give a try.

Appreciate your help here.

---

<div class="post-metadata">

**Author:** ![basepi](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/basepi/32/53056_2.png) [@basepi](https://discuss.elastic.co/u/basepi)\
**Post date:** [July 20, 2023, 3:03pm UTC](https://discuss.elastic.co/t/trace-apache-webserver-to-python-application/337757/5 "2023-07-20T15:03:44Z")

</div>

I don't think we have an easy way to trace the webserver, unfortunately. We rely on having both sides of the webserver traced, and then we get the webserver (the gap between the traces) for free.

---

<div class="post-metadata">

**Author:** ![Dixit](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dixit/32/111369_2.png) [@Dixit](https://discuss.elastic.co/u/Dixit)\
**Post date:** [August 2, 2023, 4:17pm UTC](https://discuss.elastic.co/t/trace-apache-webserver-to-python-application/337757/6 "2023-08-02T16:17:53Z")

</div>

hi @basepi ,

Having difficulty in RUM understanding (implementation), some examples and pointers would help.

---

<div class="post-metadata">

**Author:** ![basepi](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/basepi/32/53056_2.png) [@basepi](https://discuss.elastic.co/u/basepi)\
**Post date:** [August 8, 2023, 8:06pm UTC](https://discuss.elastic.co/t/trace-apache-webserver-to-python-application/337757/7 "2023-08-08T20:06:56Z")

</div>

Unfortunately, I've never used the RUM agent. I would create a new discuss thread in the `Elastic Observability: APM` section with the `rum` tag.

---

<div class="post-metadata">

**Author:** ![Dixit](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dixit/32/111369_2.png) [@Dixit](https://discuss.elastic.co/u/Dixit)\
**Post date:** [August 9, 2023, 9:41am UTC](https://discuss.elastic.co/t/trace-apache-webserver-to-python-application/337757/8 "2023-08-09T09:41:17Z")

</div>

Please do help me with some pointers - RUM seems to be bit of confusing to understand  
@basepi
