3 ms·
I wonder if APM performance traces could be used to determine unused code paths. A lot of these tools sample stack traces at intervals, collecting statistics o
by jiggawatts 4y ago
I wonder if APM performance traces could be used to determine unused code paths.
A lot of these tools sample stack traces at intervals, collecting statistics of how often functions are used. If you had enough samples, then with very high confidence you could find code paths that are never used in production.
- emptysea 4y agoAnother option is tail based sampling which allows you to make the choice at the end of the request whether to keep the trace. With that you could configure the APM to keep the first $N traces for all endpoints and then start sampling after that
- chrnola 4y agoThat’s an interesting idea! Reminds me of how Pyroscope’s continuous profiling data can be linked to OpenTelemetry traces[1]. [1]: https://pyroscope.io/docs/java-tracing/ https://pyroscope.io/docs/java-tracing/