News for hackers. Stuff that matters.
Re:Sensenmann: Code Deletion at Scale by jiggawatts on Saturday April 29, 2023 @08:51PM (#35758736)
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.

Re:Sensenmann: Code Deletion at Scale by emptysea on Saturday April 29, 2023 @09:45PM (#35758989)
Another 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

Re:Sensenmann: Code Deletion at Scale by chrnola on Saturday April 29, 2023 @10:57PM (#35759341)
That’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/