I'm not entirely sure what you mean by "code spans", but Elastic APM doesn't generate spans for each function call, as that would create too big of an overhead and slow down your application.
What kind of spans besides db and external spans would you expect to see in an app like yours?