Collection of various off-CPU metadata for profiles to provide additional context during analysis. These metadata are applied as labels to each pprof sample, and will be used to enable rich filtering of profiles on the backend UI.
Changes
Define a MetadataProvider trait and a GlobalMetadataProvider to encapsulate the logic for retrieving task metadata.
Move the existing labels into the provider, and hook up the provider in main.
Implement basic LRU caching to limit the number of processes for which labels are held in memory.
Context
Changes
MetadataProvider
trait and aGlobalMetadataProvider
to encapsulate the logic for retrieving task metadata.Future changes for a follow-up PR
Test Plan