Skip to content

feat: add loki-logger plugin#9399

Merged
juststillthinking merged 24 commits into
apache:masterfrom
bzp2010:feat-loki-logger
May 29, 2023
Merged

feat: add loki-logger plugin#9399
juststillthinking merged 24 commits into
apache:masterfrom
bzp2010:feat-loki-logger

Conversation

@bzp2010

@bzp2010 bzp2010 commented Apr 29, 2023

Copy link
Copy Markdown
Contributor

Description

Create the loki-logger plugin.

Add: #9072

Checklist

  • I have explained the need for this PR and the problem it solves
  • I have explained the changes or the new features added to this PR
  • I have added tests corresponding to this change
  • I have updated the documentation to reflect this change
  • I have verified that this change is backward compatible (If not, please discuss on the APISIX mailing list first)

@bzp2010 bzp2010 self-assigned this Apr 29, 2023
@bzp2010 bzp2010 added enhancement New feature or request plugin labels Apr 30, 2023
@bzp2010
bzp2010 marked this pull request as ready for review April 30, 2023 07:18
@bzp2010
bzp2010 requested a review from leslie-tsang April 30, 2023 07:28
@bzp2010 bzp2010 linked an issue Apr 30, 2023 that may be closed by this pull request
Comment thread docs/en/latest/plugins/loki-logger.md Outdated
Gallardot
Gallardot previously approved these changes May 6, 2023
Comment thread apisix/plugins/loki-logger.lua
Comment thread t/plugin/loki-logger.t


=== TEST 4: check loki log
--- config

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We can write a public function to query the log

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

good idea

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@soulbird please help to check

@bzp2010
bzp2010 requested review from Gallardot and soulbird May 8, 2023 02:39
@Revolyssup

Revolyssup commented May 23, 2023

Copy link
Copy Markdown
Contributor

@bzp2010 Instead of fetching the loki logs in our function in the tests, what if we use https://vector.dev/docs/reference/configuration/sinks/loki/ ? This is being used in tcp-logger, and there are other pull requests to add the same for other loggers as well. What do you think?

@juststillthinking

Copy link
Copy Markdown
Contributor

@Sn0rt please help to review

Comment thread docs/en/latest/plugins/loki-logger.md Outdated
Comment thread docs/en/latest/plugins/loki-logger.md Outdated
Comment thread docs/en/latest/plugins/loki-logger.md Outdated
@juststillthinking

Copy link
Copy Markdown
Contributor

LGTM, could you provide the chinese doc?

@juststillthinking juststillthinking added wait for update wait for the author's response in this issue/PR and removed enhancement New feature or request plugin labels May 23, 2023
@bzp2010

bzp2010 commented May 26, 2023

Copy link
Copy Markdown
Contributor Author

Hi, @monkeyDluffy6017

Since I'm busy with some other things, I can't afford to finish the Chinese document for now. But I think if the code and test of this PR are fine, we can merge it first, and once it is merged, I will create an issue and mark it as the good first issue, expecting some potential contributor to help finish it.

@bzp2010

bzp2010 commented May 26, 2023

Copy link
Copy Markdown
Contributor Author

Hi, @Revolyssup.

I'd like to understand where this essentially lies in terms of consideration.

I don't know much about vectors, but I think it makes sense to track upstream (i.e. Grafana Loki itself). If we use vector to receive logs, we may have to wait for it once the protocol is upgraded.

@bzp2010
bzp2010 requested a review from juststillthinking May 26, 2023 07:22
@juststillthinking juststillthinking added approved and removed wait for update wait for the author's response in this issue/PR labels May 26, 2023
@juststillthinking

Copy link
Copy Markdown
Contributor

@Revolyssup please help to check

@juststillthinking

Copy link
Copy Markdown
Contributor

Since I'm busy with some other things, I can't afford to finish the Chinese document for now. But I think if the code and test of this PR are fine, we can merge it first, and once it is merged, I will create an issue and mark it as the good first issue, expecting some potential contributor to help finish it.

Please remember to create a issue

@juststillthinking
juststillthinking merged commit 66cd80f into apache:master May 29, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

feat: loki-logger plugin

6 participants