Describe the bug: ...
A parent span being a DroppedSpan is causing an AttributeError to be called within end_span. I cannot find the reason why. Randomly started happening at 4am on a Sunday (in other words not connected to rollout). Happened across many different task contexts. Believe it was connected to some connection issues with the instrumented code. In anycase the code should protect against this type of problem
Here is the trace from Sentry:

To Reproduce
I have not been able to reproduce, but changing the check to a hasattr(parent, "id") should be sufficient.
Expected behavior: ...
Don't throw errors when ending span.
Environment (please complete the following information)
- OS: [e.g. Linux] Ubuntu
- Python version: 2.7
- Framework and version [e.g. Django 2.1]: Flask 0.12
- APM Server version: 6.6.1
- Agent version: 4.1.0
Additional context
Add any other context about the problem here.
-
Agent config options
Click to expand
TRANSACTIONS_IGNORE_PATTERNS = ["^OPTIONS "]
SERVER_URL = "http://apm:8200"
-
requirements.txt:
Click to expand
elastic-apm==4.1.0
Flask==0.12
Describe the bug: ...
A parent span being a DroppedSpan is causing an AttributeError to be called within end_span. I cannot find the reason why. Randomly started happening at 4am on a Sunday (in other words not connected to rollout). Happened across many different task contexts. Believe it was connected to some connection issues with the instrumented code. In anycase the code should protect against this type of problem
Here is the trace from Sentry:

To Reproduce
I have not been able to reproduce, but changing the check to a
hasattr(parent, "id")should be sufficient.Expected behavior: ...
Don't throw errors when ending span.
Environment (please complete the following information)
Additional context
Add any other context about the problem here.
Agent config options
Click to expand
requirements.txt:Click to expand