elastic / elastic/apm-agent-python
Aiobotocore invalid timings
- Vorherrschende Sprache
- Python
- Sterne
- 431
- Forks
- 239
- Ø Merge
- 5 T. 10 Std.
- Gemergte PRs (30 T.)
- 7
Beschreibung
## **Description of the bug**
The Elastic APM agent reports incorrect timing for operations involving aiobotocore. Because aiobotocore performs asynchronous I/O using boto3, the measured span duration reflects only a small part (1–2 seconds) of the actual time required to download a file. As a result, the reported duration is significantly shorter than the true elapsed time.
## **To Reproduce**
1. Set up Elastic APM agent in a project using aioboto3 or aiobotocore.
2. Upload a large file (e.g. >50 MB) and download it from code using `await s3_client.get_object(...)` (you also need to read the response) or similar.
3. Observe the reported span duration in the APM dashboard (e.g. Kibana).
4. Compare it with the actual download time measured independently (e.g. `await` + `time.perf_counter_ns()`).
## **Environment**
- OS: Linux
- Python version: 3.12
- Framework and version: FastAPI 0.115.14
- APM Server version: N/A
- Agent version: 6.22.3
Beitragsleitfaden
Rechercherichtung
Beginnen Sie damit, das Problem über den Einstiegspunkt `await s3_client.get_object(...)` zu reproduzieren und die Antwort zu lesen. Vergleichen Sie anschließend den gemeldeten Span mit der verstrichenen Zeit, die mit `await` und `time.perf_counter_ns()` gemessen wurde. Das Issue nennt keine Repository-Dateien oder Tests; abgeschlossen ist die Arbeit, wenn die Span-Dauer den tatsächlichen Dateidownload abdeckt und nicht nur die anfängliche Operation.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Bewertung
- Tech-Stack
- fastapi, python
- Bereich
- backend, observability-sre
- Issue-Typ
- Bug
- Schwierigkeit
- 4/5
- Geschätzter Aufwand
- 3-5 Tage
- Aktivitätsstatus
- Veraltet
- Klarheit
- Muss geklärt werden
- Anfängerfreundlichkeit
- 30/100