-
Notifications
You must be signed in to change notification settings - Fork 46
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
feat(image-tag): Add image name and tag to meta object #436
Conversation
Summary: Parsing out container image and tag from appropriate container, sending via _meta object Test Plan: Manually test on web application Unit tests Ref: Log-10828
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks great, can we get an integration test for it? Or maybe just add the check to one of the existing kubernetes ones?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This LGTM.
let meta_object = | ||
extract_image_name_and_tag(parse_result.container_name, pod.as_ref()); | ||
if line.set_meta(json!(meta_object)).is_err() { | ||
return Status::Skip; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
just skip?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
following the pattern of how the rest of the fields are set.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Afair it's like that to avoid the metadata middleware from blocking the sending of actual log lines
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
how about logging the error? if meta got lost then the line that gets sent is invalid.
how will we know about this issue?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would normally agree but the error that is returned from this is actually nothing. It would be just as helpful to not have a log for it.
However - in the spirit of this i am going to add
This looks great, can we get an integration test for it? Or maybe just add the check to one of the existing kubernetes ones?
added
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@dkhokhlov added some more logic around your suggestion.
Summary:
Parsing out container image and tag from appropriate container, sending via _meta object
Test Plan:
Manually test on web application
Unit tests
Ref: Log-10828