That's an interesting use case! I'm afraid at the moment, your best option will be to completely disable instrumentation of Django templates. You can do this by setting the environment variable
SKIP_INSTRUMENT_DJANGO_TEMPLATE to any value for your Django processes(es).
A bit more long term, I was considering extending our processors to not just modify events, but be able to completely drop an event by returning
False. If/Once that is implemented, a processor to drop these spans would look like this:
from elasticapm.conf.constants import SPAN
from elasticapm.processors import for_events
def drop_table_includes(client, event):
if event["name"] == "quarter_cell_tool_tip.htm":
I'll open an issue to propose this change with our processors.