file.d icon indicating copy to clipboard operation
file.d copied to clipboard

631 loki output

Open romanchechyotkin opened this issue 1 year ago • 6 comments

Loki

Added loki output plugin

Fixes #631

romanchechyotkin avatar Jul 22 '24 14:07 romanchechyotkin

Hello, thanks for feedback, yesterday i found out that there is loki-go client by Grafana, i tried to create my wheel as Loki HTTP client, may be rewrite using this library? https://github.com/grafana/loki-client-go I can see the the phrase DONT USE IT by authors, but this client is used by this library https://github.com/samber/slog-loki

What do you think, rewrite using library or make a little bit refactoring

romanchechyotkin avatar Aug 01 '24 13:08 romanchechyotkin

but what do you thnk about current logs output image image

romanchechyotkin avatar Aug 01 '24 14:08 romanchechyotkin

Hello, thanks for feedback, yesterday i found out that there is loki-go client by Grafana, i tried to create my wheel as Loki HTTP client, may be rewrite using this library? https://github.com/grafana/loki-client-go I can see the the phrase DONT USE IT by authors, but this client is used by this library https://github.com/samber/slog-loki

What do you think, rewrite using library or make a little bit refactoring

I think it's better to not use libraries (to avoid using dependencies) and make some fixes.

DmitryRomanov avatar Aug 02 '24 07:08 DmitryRomanov

but what do you thnk about current logs output image image

looks good to me. try searching by labels and others logql examples

DmitryRomanov avatar Aug 02 '24 07:08 DmitryRomanov

all logs image

select where kind=normal22 image

romanchechyotkin avatar Aug 02 '24 14:08 romanchechyotkin

Firefox_Screenshot_2024-08-16T07-42-05 592Z

Here is example of logs from Promtail to Loki. We have fields app, container, node_name, pod and you can search by them. And our k8s input plugin adds those labels as well.

DmitryRomanov avatar Aug 16 '24 07:08 DmitryRomanov

Codecov Report

Attention: Patch coverage is 87.45387% with 34 lines in your changes missing coverage. Please review.

Project coverage is 74.56%. Comparing base (b85c502) to head (37aac78). Report is 13 commits behind head on master.

Files with missing lines Patch % Lines
plugin/output/loki/loki.go 83.91% 25 Missing and 7 partials :warning:
e2e/file_loki/file_loki.go 97.05% 2 Missing :warning:
Additional details and impacted files
@@            Coverage Diff             @@
##           master     #661      +/-   ##
==========================================
+ Coverage   73.95%   74.56%   +0.60%     
==========================================
  Files         157      166       +9     
  Lines       16498    17182     +684     
==========================================
+ Hits        12201    12811     +610     
- Misses       3614     3675      +61     
- Partials      683      696      +13     

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

:rocket: New features to boost your workflow:
  • :snowflake: Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

codecov[bot] avatar Mar 25 '25 11:03 codecov[bot]