Class FcDashboardJson
java.lang.Object
org.frontcache.resilience.stream.FcDashboardJson
Serializes
FcCommandMetrics and FcThreadPools into the Hystrix dashboard's JSON,
replacing SerialHystrixDashboardData.
This is the compatibility contract of the whole migration, and the reason it is hand-written rather
than adapted from a metrics library: the consumer is vendored JavaScript whose validateData()
throws on the first missing field, blanking the panel with a console error and no server-side
symptom. The field names, their types and the percentile map's shape are frozen by
dashboard-json-keys.txt and asserted by FcDashboardJsonTest - 48 keys on a command
frame and 18 on a thread-pool frame, which is the full set Hystrix emitted, not just the 36 and 16
the dashboard happens to assert. An external Turbine or a custom dashboard may read the rest.
Written by hand with a StringBuilder rather than through Jackson for one reason: field ORDER is
stable and reviewable this way, which makes a diff of an old and a new frame readable during the
cut-over. See proposal sections 7.1-7.3.-
Method Summary
Modifier and TypeMethodDescriptionstatic StringcommandFrame(FcCommandMetrics metrics) frames()One frame per command plus one per thread pool.static StringthreadPoolFrame(String poolKey, ThreadPoolExecutor pool)
-
Method Details
-
frames
One frame per command plus one per thread pool. Thread-pool frames are NOT filtered by anything. A pool is a node-level resource shared by every THREAD-isolated command, so there is no per-domain answer to give - the old code compared the pool name against the caller's domain, which is false for every domain that can exist, which is why the console's thread-pool panel has never rendered. Proposal section 6.6, defect 1. -
commandFrame
-
threadPoolFrame
-