Learn R Programming

openmetrics (version 0.3.0)

register_shiny_metrics: Metrics for Shiny Applications

Description

Automatically wrap a Shiny app, adding metrics for the current session count and the duration of reactive flushes, and then expose them on a /metrics endpoint.

The endpoint will check the METRICS_HTTP_AUTHORIZATION environment variable, and if present will use it as the expected Authorization header of the request to the /metrics endpoint. This can be used to implement basic HTTP authentication for access to runtime metrics.

Usage

register_shiny_metrics(app, registry = openmetrics::global_registry())

Arguments

app

An object created with shiny::shinyApp().

registry

A Registry object. See registry().

Value

A modified Shiny app object.