Skip to main content

Module diagnostics

Module diagnostics 

Source
Expand description

Passive diagnostics for attributing high-frequency async polling.

Diagnostics are disabled unless HOPR_RUNTIME_POLL_DIAGNOSTICS=1 is set. When enabled, warnings are rate-limited by HOPR_RUNTIME_POLL_WARN_EVERY and start after HOPR_RUNTIME_POLL_WARN_AFTER polls or child futures.

Structsยง

ConcurrentDiagnosticFuture
Child-future wrapper for concurrent stream diagnostics.
ConcurrentDiagnosticState ๐Ÿ”’
ConcurrentDiagnostics
Shared diagnostics for for_each_concurrent/try_for_each_concurrent child futures.
DiagnosticsConfig ๐Ÿ”’
PollDiagnosticFuture
Future wrapper that counts polls and emits rate-limited warnings.
PollDiagnosticState ๐Ÿ”’

Constantsยง

DEFAULT_WARN_AFTER ๐Ÿ”’
DEFAULT_WARN_EVERY ๐Ÿ”’
ENV_ENABLED ๐Ÿ”’
ENV_WARN_AFTER ๐Ÿ”’
ENV_WARN_EVERY ๐Ÿ”’

Staticsยง

CONFIG ๐Ÿ”’

Functionsยง

config ๐Ÿ”’
enabled
Returns whether runtime poll diagnostics are enabled for this process.
instrument
Instruments a future using callsite metadata.
location ๐Ÿ”’
parse_bool ๐Ÿ”’
parse_duration ๐Ÿ”’
should_warn ๐Ÿ”’
warn_high_child_rate ๐Ÿ”’
warn_high_poll_rate ๐Ÿ”’