Skip to content

APM agent not sending event requests to the APM server with gunicorn wsgi. #624

Description

@umarriqbal

I'm running a flask application and everything works fine if I'm running the application in dev environment i.e. directly from command line or my IDE aka Pycharm.

But when I run the same app on production via gunicorn, it only sends agents requests and no events requests so in APM in kibana, no service shows up.

Reproduction steps:

  1. Create a basic flask app and call client.begin_transaction and client.end_transaction before and after each request so as to log time of each request.
  2. Run the app via gunicorn.
  3. Make a request to the app via browser or postman.

Expected behavior:

The apm server logs show /intake/v2/events requests as well as /config/v1/agents request.

Environment/

  • OS: macOS
  • Python version: 3.5
  • Framework and version: Flask 1.0.2
  • Elasticsearch version: 7.4.1
  • Kibana version: 7.4.1
  • APM Server version: 7.4.1
  • Agent version: 5.2.2

Additional context

I'm running Elasticsearch on 0.0.0.0:9200, Kibana on 0.0.0.0:5601, and APM on 0.0.0.0.8200.

A curl request to all these shows the desired result.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions