Send Logs To Loki while Still Preserving Console Output
What feature do you want to see added?
In the Grafana Visualization Observability Backend, you currently must choose between:
- Don't store pipeline logs in Loki
- Store pipeline logs In Loki and visualize logs exclusively in Grafana (logs no longer visible through Jenkins screens)
While I do want the logs to be sent to Loki, I still need for the Console Output to exist, for other Jenkins plugins such as BlueOcean, Pipeline Overview and others.
Upstream changes
No response
Are you interested in contributing this feature?
No response
I believe this may be related. https://github.com/jenkinsci/opentelemetry-plugin/issues/773
I now see that configuring otel.logs.mirror_to_disk=true in the plugin configuration does achieve my goal.
However, It is very strange that for me to collect the build logs to loki, I have to add a Grafana Visualization Backend, and under its advanced option choose:
Store pipeline logs in Loki and visualize logs exclusively in Grafana (logs no longer visible through Jenkins Controler)
Which I then supposed to cancel out with the configuration otel.logs.mirror_to_disk=true
FYI
- https://github.com/jenkinsci/opentelemetry-plugin/pull/858
PR above is about mirroring pipeline logs in Jenkins and Loki. A subsequent improvement would be to display in Jenkins logs stored in Loki so we no longer need to mirror logs in order to display logs in Jenkins GUIs
FYI PR above is merged and released
FYI New feature in progress to close the gap:
- https://github.com/jenkinsci/opentelemetry-plugin/pull/865
Solved by
- https://github.com/jenkinsci/opentelemetry-plugin/releases/tag/3.1261.v46101e2a_3660