package Ġio . h nd rs . slack . broker . metrics Ċ Ċ import Ġio . micro meter . core . instrument . Counter Ċ import Ġio . micro meter . core . instrument . Meter Registry Ċ import Ġio . micro meter . core . instrument . binder . Meter Binder Ċ Ċ /** Ċ Ġ* ĠCollect s Ġmetrics Ġfor Ġincoming Ġinstall ations Ċ Ġ*/ Ċ interface ĠInstallation Metrics Collector Ġ{ ĊĠĠĠ Ġ/** ĊĠĠĠĠ Ġ* ĠIn crements Ġsuccessful Ġinstallation Ġmetric ĊĠĠĠĠ Ġ*/ ĊĠĠĠ Ġfun Ġsuccessful Installation () ĊĊĠĠĠ Ġ/** ĊĠĠĠĠ Ġ* ĠIn crements Ġerror Ġduring Ġinstallation Ġmetric ĊĠĠĠĠ Ġ*/ ĊĠĠĠ Ġfun Ġerror During Installation () ĊĊĊĠĠĠ Ġ/** ĊĠĠĠĠ Ġ* ĠIn crements Ġinstallation Ġattempt Ġmetric ĊĠĠĠĠ Ġ*/ ĊĠĠĠ Ġfun Ġinstallation Attempt () ĊĊĠĠĠ Ġ/** ĊĠĠĠĠ Ġ* ĠIn crements Ġreceiver Ġexecution Ġmetric ĊĠĠĠĠ Ġ*/ ĊĠĠĠ Ġfun Ġreceiver Executed () ĊĊĠĠĠ Ġ/** ĊĠĠĠĠ Ġ* ĠIn crements Ġreceiver Ġexecution Ġmetric ĊĠĠĠĠ Ġ*/ ĊĠĠĠ Ġfun Ġreceiver Execution Error () Ċ } Ċ Ċ /** Ċ Ġ* ĠIn crements Ġmetrics Ġfor Ġinstall ations Ċ Ġ*/ Ċ class ĠInstallation Metrics Ġ: ĠMeter Binder , ĠInstallation Metrics Collector Ġ{ ĊĊĠĠĠ Ġprivate Ġlateinit Ġvar Ġinstallation Success Counter : ĠCounter ĊĠĠĠ Ġprivate Ġlateinit Ġvar Ġinstallation Error Counter : ĠCounter ĊĠĠĠ Ġprivate Ġlateinit Ġvar Ġinstallation Counter : ĠCounter ĊĠĠĠ Ġprivate Ġlateinit Ġvar Ġinstallation Receiver Execution Errors : ĠCounter ĊĠĠĠ Ġprivate Ġlateinit Ġvar Ġinstallation Receiver Execution s : ĠCounter ĊĊĠĠĠ Ġoverride Ġfun Ġbind To ( registry : ĠMeter Registry ) Ġ{ ĊĊĠĠĠĠĠĠĠ Ġinstallation Success Counter Ġ= ĠCounter . builder (" slack . installation . success ") ĊĠĠĠĠĠĠĠĠĠĠĠ Ġ. description (" Number Ġof Ġsuccessful Ġinstall ations ") ĊĠĠĠĠĠĠĠĠĠĠĠ Ġ. register ( registry ) ĊĊĠĠĠĠĠĠĠ Ġinstallation Error Counter Ġ= ĠCounter . builder (" slack . installation . error ") ĊĠĠĠĠĠĠĠĠĠĠĠ Ġ. description (" Number Ġof Ġerrors Ġduring Ġinstall ations ") ĊĠĠĠĠĠĠĠĠĠĠĠ Ġ. register ( registry ) ĊĊĠĠĠĠĠĠĠ Ġinstallation Counter Ġ= ĠCounter . builder (" slack . installation . count ") ĊĠĠĠĠĠĠĠĠĠĠĠ Ġ. description (" Number Ġof Ġinstallation Ġattempts ") ĊĠĠĠĠĠĠĠĠĠĠĠ Ġ. register ( registry ) ĊĊĠĠĠĠĠĠĠ Ġinstallation Receiver Execution s Ġ= ĠCounter . builder (" slack . installation . receiver . executions ") ĊĠĠĠĠĠĠĠĠĠĠĠ Ġ. description (" Total Ġnumber Ġof Ġinstallation Ġreceiv ers Ġexecution s ") ĊĠĠĠĠĠĠĠĠĠĠĠ Ġ. register ( registry ) ĊĊĠĠĠĠĠĠĠ Ġinstallation Receiver Execution Errors Ġ= ĠCounter . builder (" slack . installation . receiver . errors ") ĊĠĠĠĠĠĠĠĠĠĠĠ Ġ. description (" Number Ġof Ġerrors Ġduring Ġinstallation Ġreceiver Ġexecution ") ĊĠĠĠĠĠĠĠĠĠĠĠ Ġ. register ( registry ) ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġoverride Ġfun Ġsuccessful Installation () Ġ= Ġinstallation Success Counter . increment () ĊĊĠĠĠ Ġoverride Ġfun Ġerror During Installation () Ġ= Ġinstallation Error Counter . increment () ĊĊĠĠĠ Ġoverride Ġfun Ġinstallation Attempt () Ġ= Ġinstallation Counter . increment () ĊĊĠĠĠ Ġoverride Ġfun Ġreceiver Executed () Ġ= Ġinstallation Receiver Execution s . increment () ĊĊĠĠĠ Ġoverride Ġfun Ġreceiver Execution Error () Ġ= Ġinstallation Receiver Execution Errors . increment () Ċ } Ċ