Skip to content
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

Highlight searched value in logs #2366

Open
nityanandagohain opened this issue Feb 23, 2023 · 7 comments
Open

Highlight searched value in logs #2366

nityanandagohain opened this issue Feb 23, 2023 · 7 comments
Assignees

Comments

@nityanandagohain
Copy link
Member

When something is searched, it should be highlighted in the logs.

@ankitnayan ankitnayan changed the title Hight searched value in logs Highlight searched value in logs Feb 23, 2023
@ankitnayan ankitnayan added frontend enhancement New feature or request logs labels Feb 23, 2023
@nityanandagohain
Copy link
Member Author

nityanandagohain commented Feb 23, 2023

@ankitnayan to have a scope here.

We are highlighting text in the log body if it's a full-text search. Else if it's a selected field in the filter then the selected field is highlighted in the log (the field won't be highlighted in raw view as it is not displayed).

let me know if there are any thoughts.

@ankitnayan
Copy link
Collaborator

That should be fine. The selected fields are removed from the body?

@nityanandagohain
Copy link
Member Author

yes depends on the case, ex- k8s_namespace_name is not a part of log body.

@ankitnayan
Copy link
Collaborator

hmm... not keeping k8s_namespace_name in the body makes sense? When is a selected field kept in the body then?

@nityanandagohain
Copy link
Member Author

nityanandagohain commented May 24, 2023

any kind of field is present again in the body if the user has not cleaned up the body after extracting the attributes.

But it also depends on the user and the logs that they are printing.

Ex 1:-

{"ts": "1000...", "level":"info", "message":"this is my log"}

is parsed to

{
"ts": "1000...",
"body": "this is my log",
"attributes": {
   "level": "info"
  .....
 }
}

So in this case the body doesn't contain any attributes and is properly cleaned up.

Ex 2:-

{"ts": "1000...", "level":"asdasd", "message":"this is my log"}

is parsed to

{
"ts": "1000...",
"body": "{"ts": "1000...", "level":"info", "message":"this is my log"}",
"attributes": {
   "level": "info"
  .....
 }
}

In this case, the body is not cleaned up.

So actually it depends on the user how they are keeping it. But ideally it should be ex 1

@pranay01
Copy link
Collaborator

@palashgdev Can you also share a note on what input you need from me on this?

@nityanandagohain
Copy link
Member Author

Will prioritise this is the next sprint.

@nityanandagohain nityanandagohain added the events-pod events pod label Jan 15, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants