Skip to content

[NGSOK-1826] Metrics for Spark History Server#47

Merged
giggsoff merged 2 commits into
develop/4.3.0/3.5.4.4from
feature/3/NGSOK-1826
Jun 29, 2026
Merged

[NGSOK-1826] Metrics for Spark History Server#47
giggsoff merged 2 commits into
develop/4.3.0/3.5.4.4from
feature/3/NGSOK-1826

Conversation

@giggsoff

Copy link
Copy Markdown
Collaborator

Wire a metrics system into the Spark History Server, which previously had none, exposing its internal state to the standard Spark metrics sinks (e.g. the Prometheus servlet).

@giggsoff giggsoff self-assigned this Jun 26, 2026
@giggsoff giggsoff closed this Jun 26, 2026
@giggsoff giggsoff force-pushed the feature/3/NGSOK-1826 branch from 044d298 to 172ab38 Compare June 26, 2026 14:34
@giggsoff giggsoff reopened this Jun 26, 2026
giggsoff added 2 commits June 29, 2026 09:47
Start an optional MetricsSystem for the History Server, gated by the new
spark.history.metrics.enabled config (disabled by default so existing
deployments are unaffected unless opted in). When enabled it exposes the
existing application cache counters and a small set of cheap server-wide
gauges (HistoryServerSource) through the configured sinks, e.g. the
Prometheus servlet at /metrics/applicationHistory/prometheus.

Also register the ApplicationCache counters/timer into its MetricRegistry
under plain-noun names so the metrics system's own count suffix is not
duplicated; toString output is unchanged.

JVM heap/GC metrics for the History Server process are available opt-in via
the standard source config (applicationHistory.source.jvm.class=JvmSource),
exactly like the other Spark instances; covered by the metrics test.

Signed-off-by: Petr Fedchenkov <giggsoff@gmail.com>
Expose byte-valued disk and in-memory store usage of the FsHistoryProvider
through the History Server metrics system. A new getMetricsSources hook on
ApplicationHistoryProvider (default empty) lets a provider contribute its
own metric sources without leaking internals; FsHistoryProvider supplies
FsHistoryProviderSource with diskStore/memoryStore byte gauges, each guarded
so it only appears when the backing store is active.

Signed-off-by: Petr Fedchenkov <giggsoff@gmail.com>
@giggsoff giggsoff force-pushed the feature/3/NGSOK-1826 branch from 172ab38 to ee77a16 Compare June 29, 2026 07:57
@giggsoff giggsoff merged commit dd28607 into develop/4.3.0/3.5.4.4 Jun 29, 2026
13 of 19 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant