Provide sample code to illustrate how metrics are used by: 1) Code emitting metircs 2) Code managing the contexts in which metrics are emmitted 3) Code recording metrics, and how to deal with aggregations