MetricOrchestrator

uk.gov.hmrc.mongo.metrix.MetricOrchestrator
class MetricOrchestrator(metricSources: List[MetricSource], lockService: LockService, metricRepository: MetricRepository, metricRegistry: MetricRegistry)

Attributes

Graph
Supertypes
class Object
trait Matchable
class Any

Members list

Value members

Concrete methods

def attemptMetricRefresh(skipReportingFor: Option[PersistedMetric => Boolean], resetToZeroFor: Option[PersistedMetric => Boolean])(implicit ec: ExecutionContext): Future[MetricOrchestrationResult]

Attempt to hold the mongo-lock to update the persisted metrics (only one node will be successful doing this at a time). Whether successful or not acquiring the lock, refresh the internal metric cache from the metrics persisted in the repository.

Attempt to hold the mongo-lock to update the persisted metrics (only one node will be successful doing this at a time). Whether successful or not acquiring the lock, refresh the internal metric cache from the metrics persisted in the repository.

Value parameters

ec

execution context

resetToZeroFor

optional filter; set to true for any metric that should be reset to zero during the refresh

skipReportingFor

optional filter; set to true for any metric that should be ignored from the refresh

Attributes