More granular logging

I'm using a really simple setup of APM, Kibana and Elasticsearch to get visibility on a Django webapp running in a container through Gunicorn. It's performance is stuttering once in a while and I can't see a reason for it from just reading the code. I used this compose file to get a really simple setup: Minimal Elastic Stack + APM Docker Compose · GitHub

I've instrumented my app to deliver data to APM and that works. There is some useful information in seeing how the app spends it time in Django, pyodbc and my app and the timelines offer some clues as well but what is really missing is the same functionality one saw in Opbeat where you got line-level tracing. I recall seeing a screenshot in the marketing documentation where that would be possible.

Is there some way of configuring for this granularity level?

Hi @Beltiras

can you explain a bit more what you mean by line level tracing? We do capture stack traces with spans, same as we did with the Opbeat agent. However, we introduced a few settings to fine tune when exactly we capture stack traces and set them to relatively conservative default values, with the goal of balancing storage/processing costs with usability. You can read more on the topic in the docs: Performance tuning | APM Python Agent Reference [5.x] | Elastic

Hope this helps!

This is the "full trace" windows:

It's useful to see the division between SQL, app and rendering but I'm suspecting that several python lines are responsible for a large section of the undeclared part of the gantt chart. I need to be able to get a breakdown of where the app spends time on the python side. That's what was phenomenally good about Opbeat. I read through the page you link (and several linked from it) and I can't see any configuration for collecting more granular data and displaying it, only how many lines if there's an error. Error logging is done by Sentry (which I am very happy with). What am I not understanding?

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