[core] feature-flag server.metrics-high-precision

server.feature-flags += ("server.metrics-high-precision" => "enable")
(default: "disable")

enables high-resolution timestamps,
currently used for request start time

This is automatically enabled if mod_accesslog log record format uses
high-resolution format specifiers in the template, but this feature
needs to be enabled if that is not the case and a high-resolution
request start time is desired for use in lua scripts run by mod_magnet,
e.g. to measure time-to-first-byte
Glenn Strauss 2022-05-10 11:48:01 -04:00
parent 2a7d3a2751
commit 58e1b61f5b
1 changed files with 3 additions and 1 deletions

View File

@ -1196,7 +1196,9 @@ int config_finalize(server *srv, const buffer *default_server_tag) {
/* settings might be enabled during plugins_call_set_defaults() */
p->defaults.high_precision_timestamps =
srv->srvconf.high_precision_timestamps =
config_feature_bool(srv, "server.metrics-high-precision",
/* configure default server_tag if not set
* (if configured to blank, unset server_tag)*/