agent
agent copied to clipboard
Make FlowMetric mostly immutable
PR Description
Make FlowMetrics semi-immutable, before a flowmetric could be easily changed. There could be more memory alloc/gced due to LabelsCopy() but that is likely unavoidable.
Simplified the flowmetric and the surface area of the GlobalRefMapping, GlobalRefMapping now uses the fact its in the same space as the FlowMetric to access the internal labels. It knows that it is safe to do this. Was able to remove several function calls or unexport them for smaller surface area. Finally made the globalrefid its own type so it wasn't easy to confuse a local id for a global.
This PR has been automatically marked as stale because it has not had any activity in the past 30 days. The next time this stale check runs, the stale label will be removed if there is new activity. The issue will be closed in 7 days if there is no new activity. Thank you for your contributions!