You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
Telemetry errors do not follow the log format set in the Vault configuration file or environment variable.
To Reproduce
$ vault server -config vault.hcl
WARNING: storage configured to use "inmem" which should NOT be used in
production
==> Vault server configuration:
Administrative Namespace:
Cgo: disabled
Environment Variables: DBUS_SESSION_BUS_ADDRESS, GOTRACEBACK, HOME, LANG, LESSCLOSE, LESSOPEN, LOGNAME, LS_COLORS, OLDPWD, PATH, PWD, SHELL, SHLVL, SSH_CLIENT, SSH_CONNECTION, SSH_TTY, TERM, USER, VAULT_ADDR, VAULT_TOKEN, XDG_DATA_DIRS, XDG_RUNTIME_DIR, XDG_SESSION_CLASS, XDG_SESSION_ID, XDG_SESSION_TYPE, _
Go Version: go1.22.8
Listener 1: tcp (addr: "0.0.0.0:8200", cluster address: "0.0.0.0:8201", disable_request_limiter: "false", max_request_duration: "1m30s", max_request_size: "33554432", tls: "disabled")
Log Level: info
Mlock: supported: true, enabled: true
Recovery Mode: false
Storage: inmem
Version: Vault v1.18.2, built 2024-11-20T11:24:56Z
Version Sha: e36bac59ddb8e10e8912c0ddb44416c850939855
==> Vault server started! Log data will stream in below:
{"@level":"info","@message":"proxy environment","@timestamp":"2024-12-13T10:58:12.889236-06:00","http_proxy":"","https_proxy":"","no_proxy":""}
{"@level":"info","@message":"incrementing seal generation","@timestamp":"2024-12-13T10:58:12.889389-06:00","generation":1}
{"@level":"warn","@message":"no `api_addr` value specified in config or in VAULT_API_ADDR; falling back to detection if possible, but this value should be manually set","@timestamp":"2024-12-13T10:58:12.889403-06:00"}
{"@level":"info","@message":"Initializing version history cache for core","@module":"core","@timestamp":"2024-12-13T10:58:12.910885-06:00"}
{"@level":"info","@message":"Starting event system","@module":"events","@timestamp":"2024-12-13T10:58:12.910898-06:00"}
2024-12-13 10:58:14.021923 I | [ERR] Error flushing to statsd! Err: write udp 127.0.0.1:51053->127.0.0.1:8125: write: connection refused
2024-12-13 10:58:19.118196 I | [ERR] Error flushing to statsd! Err: write udp 127.0.0.1:55100->127.0.0.1:8125: write: connection refused
2024-12-13 10:58:24.323977 I | [ERR] Error flushing to statsd! Err: write udp 127.0.0.1:45287->127.0.0.1:8125: write: connection refused
2024-12-13 10:58:31.311091 I | [ERR] Error flushing to statsd! Err: write udp 127.0.0.1:48204->127.0.0.1:8125: write: connection refused
Expected behavior
Telemetry errors should follow the log format defined in the VAULT_LOG_FORMAT environment variable or log_format set in the Vault configuration file.
Environment:
Description: Ubuntu 24.04.1 LTS
Architecture: aarch64
Version: Vault v1.18.2, built 2024-11-20T11:24:56Z
Version Sha: e36bac59ddb8e10e8912c0ddb44416c850939855
Hi @michaelkosir! Thanks for submitting this issue! Yes it does appear as this is the case. It looks like this is due to the underlying go-metrics library performing a log.Printf directly which bypasses the formatting in place by Vault and its hclogger. I'm taking a look to see how best to handle this situation here as these particular logs are from a longer running goroutine to routinely flush these metrics so its not something we can just bubble any underlying errors up to the caller in this case.
Describe the bug
Telemetry errors do not follow the log format set in the Vault configuration file or environment variable.
To Reproduce
Expected behavior
Telemetry errors should follow the log format defined in the
VAULT_LOG_FORMAT
environment variable orlog_format
set in the Vault configuration file.Environment:
Vault server configuration file(s):
The text was updated successfully, but these errors were encountered: