# APM server not getting events from Django

**URL:** <https://discuss.elastic.co/t/apm-server-not-getting-events-from-django/139709>\
**Category:** APM\
**Created:** [July 12, 2018, 9:27am UTC](https://discuss.elastic.co/t/apm-server-not-getting-events-from-django/139709 "2018-07-12T09:27:23Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![kmcdeogracias](https://avatars.discourse-cdn.com/v4/letter/k/ee7513/32.png) [@kmcdeogracias](https://discuss.elastic.co/u/kmcdeogracias)\
**Post date:** [July 12, 2018, 9:27am UTC](https://discuss.elastic.co/t/apm-server-not-getting-events-from-django/139709/1 "2018-07-12T09:27:24Z")

</div>

I setup the apm agent in my django app,verified that the configs are working but I'm not getting any transactions saved in elastic. I created a script that calls a GET endpoint 100x but no transaction is captured.

I only get transactions if there's an error (404, 500). The python manage.py elasticapm test sends the event to apm server too.

Am I missing some configs?

Thanks!

---

<div class="post-metadata">

**Author:** ![beniwohli](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/beniwohli/32/21256_2.png) [@beniwohli](https://discuss.elastic.co/u/beniwohli)\
**Post date:** [July 12, 2018, 9:57am UTC](https://discuss.elastic.co/t/apm-server-not-getting-events-from-django/139709/2 "2018-07-12T09:57:24Z")

</div>

Hi Karmela

can you double check if you added the `elasticapm.contrib.django.middleware.TracingMiddleware` to your `MIDDLEWARE` list? This might also be called `MIDDLEWARE_CLASSES` if you use Django 1.11 or lower.

Cheers,  
Beni

---

<div class="post-metadata">

**Author:** ![kmcdeogracias](https://avatars.discourse-cdn.com/v4/letter/k/ee7513/32.png) [@kmcdeogracias](https://discuss.elastic.co/u/kmcdeogracias)\
**Post date:** [July 12, 2018, 10:00am UTC](https://discuss.elastic.co/t/apm-server-not-getting-events-from-django/139709/3 "2018-07-12T10:00:13Z")

</div>

Hi Beni,

Yes, I added it in the MIDDLEWARE\_CLASSES. I already tried setting DEBUG=False in my app.. Still the agent is not receiving any event.

My Django version is 1.9.7

---

<div class="post-metadata">

**Author:** ![beniwohli](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/beniwohli/32/21256_2.png) [@beniwohli](https://discuss.elastic.co/u/beniwohli)\
**Post date:** [July 13, 2018, 7:58am UTC](https://discuss.elastic.co/t/apm-server-not-getting-events-from-django/139709/5 "2018-07-13T07:58:01Z")

</div>

Hmm, that's weird. Another possible cause could be that due to some bug, the agent creates invalid requests to the apm-server. Can you try and run the `apm-server` with the `-e` flag? This should make it output any errors it encounters while processing requests from the agent.

---

<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 3, 2018, 3:58am UTC](https://discuss.elastic.co/t/apm-server-not-getting-events-from-django/139709/6 "2018-08-03T03:58:51Z")

</div>

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