Missing Transactions in New APM Versions - Python with FastAPI

Kibana version: 8.13

Elasticsearch version: 8.13

APM Server version: 8.13

APM Agent language and version: python, 6.22.3

Is there anything special in your setup? Using AWS ALB as a load balancer for the service.

Description of the problem including expected versus actual behavior. Please include screenshots (if relevant):

We've set up APM via FastAPI as follows:

from elasticapm.contrib.starlette import ElasticAPM

app = FastAPI({configs})
app.add_middleware(ElasticAPM)

We have multiple routers that are included in the FastAPI app, and all but one appear to be working correctly. One route will not appear in APM in our transactions or visually as data points in our dashboards. Oddly enough, it appears in the legend but even when it's the only visible item, there is no data in the graph.

There is no notable difference in the code between the different transactions in the service.

It all works locally with versions 7.17 for Kibana, APM, & Elasticsearch, but when we upgrade locally, the transactions for that route disappear there as well.

Also notable, we recently upgraded our Python runtime (from 3.11.8 to 3.11.9) and APM is not populating with the new runtime version.

Any ideas?

Hi @mindyzwan , welcome to our community!

Have you followed this recommendations for FastAPI?

[Starlette/FastAPI Support | APM Python Agent Reference [6.x] | Elastic](https://Starlette/FastAPI Support)

Thanks for the welcome! I did follow those recommendations, yes.

Update on this, we did get it working locally with 8.13.

It started working in one of our environments (magically - we changed nothing), but still not on production. Notably, the environment it started working in now has a Python runtime of 3.11.9, while production is still stuck at 3.11.8.

Is the fastapi version the same? Which one?
I don't see anything in the Python 3.11.9 release notes that may explain a change in behavior though. Does upgrading the apm agent to 6.23.0 change something?