-
Notifications
You must be signed in to change notification settings - Fork 51
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
logs both in Grafana and through Jenkins config - breaks displayed logs (colors?) #918
Comments
We probably know the limitation but I would like to double check please: can you provide a description of the color highlighting and hyperlinks that you are looking for, ideally with an annotated screenshot of pipeline logs with the formatting you are looking for. The cause is likely to be that Elasticsearch, the first OTel logs backend we supported, didn't support ANSI color invisible chars so we had to extract the rich text formatting annotations from the plain text. See : |
Hi @cyrille-leclerc sure, here is a screenshot using regular console logs with no otel integration then, when enabling
|
Update: dealing with logs formatting in logs backends that support ANSI color encoding is more complex than anticipated because Jenkins log formatting is no ANSI color encoding or is more than just ANSI color encoding. @ArieLevs can you please open a bug about the issue
It seems to be specific to your Loki version. Do you use self managed Loki? Which version please? |
It was a designed decision to store logs without the format flags; if you want to keep that format in the Jenkins console view, you can use the mirror option. In this way you send the logs to Loky and keep a local copy in the original way so the format is not lost. |
Done #946 |
this actually worked very well, the only thing is I can no long see a "link" to Grafana, similar to how its used with I'll mark issue as closed as all is actually working as expected, it just feels like end uses of Jenkins will never use this feature, as they don't have a direct link from Jenkins <-> Grafana this way. (but this is still good enough for our infra team to investigate Jenkins and get insights) |
Jenkins and plugins versions report
Environment
What Operating System are you using (both controller, and any agents involved in the problem)?
Jenkins 2.452.2
Jenkins in kubernetes, default agent is
jenkins/inbound-agent:jdk17
Reproduction steps
Store pipeline logs In Loki and visualize logs both in Grafana and through Jenkins
optionExpected Results
logs should keep appearing as usual both in Grafana and Jenkins UI
Actual Results
logs are missing colors, links are not clickable (from Jenkins UI), seems that anything that has special characters no longer appears in logs
for example, printed error from tools like tflint, flake8, etc no longer appear to the user
Anything else?
No response
Are you interested in contributing a fix?
No response
The text was updated successfully, but these errors were encountered: