<commit_before># Health Check support

    Health check support is available since metrics-scala v3.0.3.

Metrics also has the ability to centralize your service’s health checks with the metrics-healthchecks module.

Metrics-healthchecks requires health checks to be registered in an application wide `HealthCheckRegistry`. Metrics-scala hides use of it, but you do need to create an `Checked` trait that refers to that registry. Your `Checked` needs to extends `CheckedBuilder`. (See also [About Checked](#about-checked-and-instrumented) below.)

```scala
object YourApplication {
  /** The application wide health check registry. */
  val healthChecksRegistry = new com.codahale.metrics.health.HealthCheckRegistry();
}
trait Checked extends nl.grons.metrics.scala.CheckedBuilder {
  val registry = Application.healthCheckRegistry
}
```

Now you can easily create and register health checks by using the `healthCheck` factory method:

```scala<commit_msg>fix val access on docs<commit_after># Health Check support

    Health check support is available since metrics-scala v3.0.3.

Metrics also has the ability to centralize your service’s health checks with the metrics-healthchecks module.

Metrics-healthchecks requires health checks to be registered in an application wide `HealthCheckRegistry`. Metrics-scala hides use of it, but you do need to create an `Checked` trait that refers to that registry. Your `Checked` needs to extends `CheckedBuilder`. (See also [About Checked](#about-checked-and-instrumented) below.)

```scala
object YourApplication {
  /** The application wide health check registry. */
  val healthChecksRegistry = new com.codahale.metrics.health.HealthCheckRegistry();
}
trait Checked extends nl.grons.metrics.scala.CheckedBuilder {
  val registry = YourApplication.healthChecksRegistry
}
```

Now you can easily create and register health checks by using the `healthCheck` factory method:

```scala
{'fraction_non_alphanumeric': 0.07476635514018691, 'fraction_numerical': 0.003115264797507788, 'mean_word_length': 5.078864353312303, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2067652', 'n_tokens_mistral': 500, 'n_tokens_neox': 476, 'n_words': 213}