AFS_AETHER_LOG_SAMPLE_PREFETCH
Deep-dive reference for:
AFS_AETHER_LOG_SAMPLE_PREFETCH
Status
active
Audience
production/user
Type and Default
- Type: unsigned integer divisor (
u32). - Default:
64. - Normalization: values are clamped to at least
1(0becomes1).
What It Does
Controls debug/trace log sampling for prefetch-related log targets.
Specifically, this applies to log targets beginning with:
aether::runtime::read_service
Sampling is 1-in-N:
1=> log every matching debug/trace event64=> log approximately every 64th matching debug/trace event (default)- higher values => less verbose logs
Input Surfaces
- Env:
AFS_AETHER_LOG_SAMPLE_PREFETCH=<N> - Config file (
aether.toml):[logging.sampling]
prefetch_debug_every = 64
There is currently no dedicated CLI flag for this setting.
Resolution and Override Order
- Built-in default (
64) aether.toml([logging.sampling].prefetch_debug_every)- Environment (
AFS_AETHER_LOG_SAMPLE_PREFETCH)
Sampling Scope Details
- Only affects matching debug/trace-level targets.
- Log records at
infolevel and above are always emitted (not sampled away). - Non-matching targets are unaffected.
Validation and Normalization
- Non-numeric env values fail config load.
0is accepted but normalized to1.- In config file parsing,
0is also normalized to1.
Reload Behavior (SIGHUP)
Changes to log sampling config are detected but not hot-applied; restart is required.
Examples
- Disable sampling for prefetch debug logs:
AFS_AETHER_LOG_SAMPLE_PREFETCH=1 aether mount --session-id s1 --mount-dir /mnt/aether
- Reduce prefetch debug volume:
AFS_AETHER_LOG_SAMPLE_PREFETCH=200 aether mount --session-id s1 --mount-dir /mnt/aether
Related Variables
AFS_AETHER_LOG_SAMPLE_INVALIDATIONAFS_AETHER_LOGAFS_AETHER_LOG_FORMAT
Primary Implementation Sources
packages/aether/src/config/types/model_defaults.rspackages/aether/src/config/types/file_config_loader.rspackages/aether/src/config/types/config_resolution.rspackages/aether/src/config/types/apply_env.rspackages/aether/src/observability/logging.rspackages/aether/src/config/reload.rs