-
Notifications
You must be signed in to change notification settings - Fork 1.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Include level in JSON log messages (useful for automatic status mapping in DataDog) #1426
Comments
/assign @dgrisonnet |
Hi folks, I looked a bit into this issue. The sad part is that k8s.io/component-base doesn't expose relevant options to configure the References:
What could be the fix then?
LevelKey: "level",
EncodeLevel: zapcore.LowercaseLevelEncoder,
|
Update: I have raised an issue in component-base to address this issue as well as linked just before this comment |
@dashpole @dgrisonnet would you folks mind re-assigning this issue to me, just considering no updates on before my comments? |
I believe the component-base repo is synced from kubernetes/kubernetes/staging. I would open an issue in k/k itself |
Sure @dashpole Would you mind assigning me the issue when you open that issue considering I have already navigated the component-base fairly enough to realise where the changes would potentially be needed to be made. Would love to contribute on this one! |
Hello folks, any news about this request? Many thanks for your support |
this would be very useful |
What would you like to be added:
Include the
level
in the JSON log messages.Why is this needed:
So that it's clear what type of log messages are these, e.g
info
,warning
,error
, etc.At the moment these JSON log messages:
are detected in DataDog as errors. Adding
![image](https://private-user-images.githubusercontent.com/123649699/305963117-c6d3807d-540f-4a39-8df0-d0028e3e90a1.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MjYwMDg5NjQsIm5iZiI6MTcyNjAwODY2NCwicGF0aCI6Ii8xMjM2NDk2OTkvMzA1OTYzMTE3LWM2ZDM4MDdkLTU0MGYtNGEzOS04ZGYwLWQwMDI4ZTNlOTBhMS5wbmc_WC1BbXotQWxnb3JpdGhtPUFXUzQtSE1BQy1TSEEyNTYmWC1BbXotQ3JlZGVudGlhbD1BS0lBVkNPRFlMU0E1M1BRSzRaQSUyRjIwMjQwOTEwJTJGdXMtZWFzdC0xJTJGczMlMkZhd3M0X3JlcXVlc3QmWC1BbXotRGF0ZT0yMDI0MDkxMFQyMjUxMDRaJlgtQW16LUV4cGlyZXM9MzAwJlgtQW16LVNpZ25hdHVyZT1jY2U5NjEzYjI5ZjE3ZTA5YzA5ZjJlOGI3YWI1YjE0MWU4YTM3ZmJiNjU4MzczOTM3NDgwMDExNjQxOTFjZmU1JlgtQW16LVNpZ25lZEhlYWRlcnM9aG9zdCZhY3Rvcl9pZD0wJmtleV9pZD0wJnJlcG9faWQ9MCJ9.VrSSe_YloG91avPdfMDQIeuYyvAcJD0do6iSZJpIM48)
level
would allow automatic mapping to correct status.Used args:
/kind feature
The text was updated successfully, but these errors were encountered: