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
I am running victoria metrics operator v0.50.0; and I have noticed the log format can be a bit inconsistent.
I have noticed these log fields:
namespace
controller
desiredVersion
podMustRecreate
sts.name
vmcluster
vmalert
vmalertmanager
rules
secret_for
len
' len ' (contains spaces)
'map names'
'invalid rules'
'invalid configs'
'desired version'
Some of them perhaps should stay, some of them should most likely be merged with the msg field instead. The spaces should also be removed from the keys as log collectors usually add a _ or . and it can be a bit weird.
I would expect msg, level and ts to exist as well as a few other consistent log fields which helps to understand the context of the log.
The text was updated successfully, but these errors were encountered:
Current logger lig `logr` doesn't support formatted message field. Because of that
we had to use structured logging with key-value pairs. It has performance benefits.
But it also produces additional load into the logging systems. And the most importantly
it creats additional congnitive load on users. Since it's hard to join json fields
to get the context of the log message.
This commit adds the following changes:
* use fmt.Sprintf in order to add more context to the message body.
* remove irrelevant fields from WithValues, like `secret_for` field
* change logger name to `controller.CRD_NAME` format.
* change child objects parent_NAME: OBJECT_NAMe to simple NAME: OBJECT_NAME. It allows to easily query
log messages by pattern.
Related issue:
#1191
Signed-off-by: f41gh7 <[email protected]>
Hi,
I am running victoria metrics operator v0.50.0; and I have noticed the log format can be a bit inconsistent.
I have noticed these log fields:
Some of them perhaps should stay, some of them should most likely be merged with the
msg
field instead. The spaces should also be removed from the keys as log collectors usually add a_
or.
and it can be a bit weird.I would expect
msg
,level
andts
to exist as well as a few other consistent log fields which helps to understand the context of the log.The text was updated successfully, but these errors were encountered: