Skip to content

feat: support Tencent Cloud Log Service #7593

Merged
spacewander merged 26 commits into
apache:masterfrom
ychensha:feature/cls-logger
Aug 25, 2022
Merged

feat: support Tencent Cloud Log Service #7593
spacewander merged 26 commits into
apache:masterfrom
ychensha:feature/cls-logger

Conversation

@ychensha

@ychensha ychensha commented Aug 2, 2022

Copy link
Copy Markdown
Contributor

Description

product doc

apisix log util is more powerfull than nginx access log, and it's useful for debugging and replaying later.

Fixes #7592

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)

@ychensha
ychensha force-pushed the feature/cls-logger branch from 272f561 to 698adc5 Compare August 2, 2022 08:45
add tencent-cloud-cls

add tencent-cloud-cls

add tencent-cloud-cls

add tencent-cloud-cls

add tencent-cloud-cls
@ychensha
ychensha force-pushed the feature/cls-logger branch from 698adc5 to bd8c579 Compare August 2, 2022 08:45
@ychensha ychensha changed the title [WIP]support Tencent Cloud Log Service support Tencent Cloud Log Service Aug 2, 2022
@soulbird soulbird changed the title support Tencent Cloud Log Service feat: support Tencent Cloud Log Service Aug 3, 2022
@soulbird

soulbird commented Aug 3, 2022

Copy link
Copy Markdown
Contributor

Thanks for your contribution. But please add a license to each file and add test cases first.

@ychensha

ychensha commented Aug 3, 2022

Copy link
Copy Markdown
Contributor Author

any doc for testing? I have no exp for env setup & PERL testing framework...

@soulbird

soulbird commented Aug 3, 2022

Copy link
Copy Markdown
Contributor

@ychensha

ychensha commented Aug 3, 2022

Copy link
Copy Markdown
Contributor Author

any doc for testing? I have no exp for env setup & PERL testing framework...

See: https://github.com/apache/apisix/blob/master/docs/en/latest/internal/testing-framework.md

tried.. I work on Mac, and now trapped in etcd configuration for more tesing case

add ut
@ychensha
ychensha force-pushed the feature/cls-logger branch 2 times, most recently from 78579de to 2ab9eef Compare August 4, 2022 01:23
fix lint

fix lint
@ychensha
ychensha force-pushed the feature/cls-logger branch from 2ab9eef to f57cc30 Compare August 4, 2022 01:23
Comment thread apisix/plugins/tencent-cloud-cls.lua Outdated
Comment thread apisix/plugins/tencent-cloud-cls.lua Outdated
Comment thread apisix/plugins/tencent-cloud-cls.lua Outdated
Comment thread apisix/plugins/tencent-cloud-cls/cls-sdk.lua Outdated
Comment thread apisix/plugins/tencent-cloud-cls/cls-sdk.lua Outdated
Comment thread apisix/plugins/tencent-cloud-cls/cls-sdk.lua
Comment thread apisix/plugins/tencent-cloud-cls/cls-sdk.lua Outdated
Comment thread apisix/plugins/tencent-cloud-cls/cls-sdk.lua Outdated
Comment thread apisix/plugins/tencent-cloud-cls/cls-sdk.lua
Comment thread apisix/plugins/tencent-cloud-cls/cls-sdk.lua Outdated
Comment thread apisix/plugins/tencent-cloud-cls/cls.proto Outdated
Comment thread apisix/plugins/tencent-cloud-cls/cls.proto Outdated
@ychensha
ychensha force-pushed the feature/cls-logger branch from 7b9e2d7 to fd30d49 Compare August 9, 2022 12:48
Comment thread apisix/plugins/tencent-cloud-cls.lua Outdated
properties = {
cls_host = { type = "string" },
cls_topic = { type = "string" },
-- https://console.cloud.tencent.com/capi

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

what is this link for?

Comment thread apisix/plugins/tencent-cloud-cls.lua Outdated
@tzssangglass

Copy link
Copy Markdown
Member

I have a question: Is it that we can't do the test case to verify that this plugin is working correctly?
Because it requires a Tencent account and to make sure that this account is always available.

@spacewander

Copy link
Copy Markdown
Member

I have a question: Is it that we can't do the test case to verify that this plugin is working correctly? Because it requires a Tencent account and to make sure that this account is always available.

We can inject a hook or mock into the code? Like:

my $extra_init_by_lua = <<_EOC_;

--- extra_init_by_lua

@ychensha

Copy link
Copy Markdown
Contributor Author

I have same question too. But same question can be applie to other plugins that have env matters

@ychensha

Copy link
Copy Markdown
Contributor Author

I have same question too. But same question can be applie to other plugins that have env matters

@ychensha ychensha closed this Aug 10, 2022
@ychensha

ychensha commented Aug 10, 2022

Copy link
Copy Markdown
Contributor Author

@spacewander @tzssangglass after code related conversations closed, I will do the function test again for the related code modification.

@spacewander spacewander left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Comment thread apisix/plugins/tencent-cloud-cls/cls-sdk.lua Outdated
Comment thread apisix/plugins/tencent-cloud-cls/cls-sdk.lua Outdated
@ychensha
ychensha force-pushed the feature/cls-logger branch from e3bff97 to 5d86522 Compare August 18, 2022 12:13
@ychensha
ychensha force-pushed the feature/cls-logger branch from d83df93 to f4dd849 Compare August 18, 2022 12:53
@tzssangglass

Copy link
Copy Markdown
Member

@ychensha pls don't use force-push to update code, or reviews' comments may be ignore.

Comment thread t/plugin/tencent-cloud-cls.t
Comment thread t/plugin/tencent-cloud-cls.t Outdated
Comment thread t/plugin/tencent-cloud-cls.t Outdated
Comment thread t/plugin/tencent-cloud-cls.t Outdated
Comment thread apisix/plugins/tencent-cloud-cls.lua Outdated
Comment thread apisix/plugins/tencent-cloud-cls.lua
Comment thread apisix/plugins/tencent-cloud-cls/cls-sdk.lua
Comment thread apisix/plugins/tencent-cloud-cls/cls-sdk.lua Outdated
Comment thread t/plugin/tencent-cloud-cls.t Outdated
Comment thread t/plugin/tencent-cloud-cls.t Outdated
Comment thread t/plugin/tencent-cloud-cls.t
@spacewander

Copy link
Copy Markdown
Member

Let's merge master to make CI pass.

spacewander
spacewander previously approved these changes Aug 23, 2022

@spacewander spacewander left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

@spacewander

Copy link
Copy Markdown
Member

As this PR is big enough, let's open another PR for the doc.

@spacewander
spacewander merged commit 3c07574 into apache:master Aug 25, 2022
Liu-Junlin pushed a commit to Liu-Junlin/apisix that referenced this pull request Nov 4, 2022
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: Support Tencent Cloud Log Service

4 participants