Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save larsgeorge/e5797433a32edd6487886069f150e9c7 to your computer and use it in GitHub Desktop.
Save larsgeorge/e5797433a32edd6487886069f150e9c7 to your computer and use it in GitHub Desktop.
Metric Sequence Diagram
# See: https://www.websequencediagrams.com/
title HBase Metrics Call Sequence Diagramm
MetricsSystem->MetricsSystem: onTimerEvent()
activate MetricsSystem
MetricsSystem->MetricsSystem: publishMetrics()
MetricsSystem->MetricsSystem: sampleMetrics()
MetricsSystem->+MetricsBufferBuilder: constructor
MetricsBufferBuilder->-MetricsSystem: MetricsBufferBuilder
loop Sources Period
MetricsSystem->+MetricsFilter: accept()
MetricsFilter-->-MetricsSystem: boolean
opt Source Filter OK
MetricsSystem->+MetricsSourceAdapter: getValue()
MetricsSourceAdapter-->-MetricsSystem: MetricsSourceAdapter
MetricsSystem->MetricsSystem: snapshotMetrics()
MetricsSystem->+MetricsSourceAdapter: getMetrics(MetricsCollector)
MetricsSourceAdapter->MetricsCollector: setRecordFilter()
MetricsSourceAdapter->MetricsCollector: setMetricsFilter()
MetricsSourceAdapter->MetricsSource: getMetrics(MetricsCollector)
MetricsSource->+MetricsCollector: addRecord()
MetricsCollector-->-MetricsSource: MetricsRecordBuilder
MetricsSource->MetricsRecordBuilder: addCounter/Gauge()
MetricsSource->MetricsRegistry: snapshot()
MetricsSourceAdapter->-MetricsSystem: Iterable<MetricsRecords>
MetricsSystem->+MetricsBufferBuilder: add()
MetricsBufferBuilder-->-MetricsSystem: MetricsBuffer
end
end
loop Sinks Period
MetricsSystem->MetricsSinkAdapter: putMetrics()
MetricsSinkAdapter->SinkQueue: enqueue()
end
deactivate MetricsSystem
loop Sink Queue Thread
MetricsSinkAdapter->+SinkQueue: consumeAll()
activate MetricsSinkAdapter
SinkQueue->-MetricsSinkAdapter: consume()
loop Metrics
MetricsSinkAdapter->+MetricsFilter: accept()
MetricsFilter-->-MetricsSinkAdapter: boolean
opt Sink Filter OK
MetricsSinkAdapter->MetricSink: putMetric()
end
end
MetricsSinkAdapter->MetricSink: flush()
deactivate MetricsSinkAdapter
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment