in the 1.0.0-beta1 we only capture stack traces for outgoing HttpClient requests, but we recently merged a couple of PRs addressing exactly your questions. Those will be included in the next release.
In sum, we'll do in .NET what other agents do:
Every span that takes at least 5ms will contain a stacktrace
we add the ELASTIC_APM_STACK_TRACE_LIMIT config to limit the depth of the stack trace
we add the ELASTIC_APM_SPAN_FRAMES_MIN_DURATION config to change the 5ms default to capture stack traces for shorter (or only for longer) spans.
Apache, Apache Lucene, Apache Hadoop, Hadoop, HDFS and the yellow elephant
logo are trademarks of the
Apache Software Foundation
in the United States and/or other countries.