Skip to content
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

refactor sls client manager #1954

Merged
merged 47 commits into from
Dec 31, 2024
Merged

refactor sls client manager #1954

merged 47 commits into from
Dec 31, 2024

Conversation

henryzhx8
Copy link
Collaborator

@henryzhx8 henryzhx8 commented Dec 10, 2024

  1. 废除了原sdk目录,原目录下的部分函数分别转移到其它地方,原有调用点全部做相应调整:
  • Client与创建请求相关的移到SLSClientManager和FlusherSLS中,其余全部移到内部的EnterpriseSLSClientManager
  • Common工具函数移到SLSConstant、SLSUtil、common/http/Constant、common/HashUtil、common/EndcodingUtil
  • Result工具函数移到SLSReponse
  • CurImp废除,功能由common/http/Curl替代
  1. FlusherSLS的Init和BuildRequest进行了调整,适配新的机制

@henryzhx8 henryzhx8 marked this pull request as ready for review December 10, 2024 08:34
@henryzhx8 henryzhx8 added enhancement Feature enhancement core Core feature labels Dec 13, 2024
@henryzhx8 henryzhx8 added this to the v3.0 milestone Dec 13, 2024
core/monitor/Monitor.cpp Outdated Show resolved Hide resolved
message LogtailBufferMeta
{
required string project = 1;
required string endpoint = 2;
required string region = 2;
Copy link
Collaborator

Choose a reason for hiding this comment

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

这个改了没有兼容问题?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

这个没有,只是改了pb的名字,pb的string里面是不带这个信息的

@@ -14,9 +14,45 @@

#include "common/http/HttpRequest.h"

DEFINE_FLAG_INT32(default_http_request_timeout_secs, "", 15);
DEFINE_FLAG_INT32(default_http_request_timeout_sec, "", 15);
Copy link
Collaborator

Choose a reason for hiding this comment

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

外部不用的参数?

这个原则可能得明确下。这些参数是否希望用户修改?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

这个是新加参数,后缀名统一都改成sec结尾,不存在兼容问题。目前现行的操作都是通过gflag引入,避免出现之前超时截断把时间写死后期发现不妥无法调整的问题。

core/plugin/flusher/sls/SLSClientManager.cpp Show resolved Hide resolved
core/application/Application.cpp Show resolved Hide resolved
core/common/http/Curl.cpp Show resolved Hide resolved
core/common/http/Curl.cpp Show resolved Hide resolved
core/common/http/Curl.cpp Show resolved Hide resolved
core/runner/sink/http/HttpSink.cpp Show resolved Hide resolved
core/plugin/flusher/sls/DiskBufferWriter.cpp Show resolved Hide resolved
core/plugin/flusher/sls/DiskBufferWriter.cpp Show resolved Hide resolved
core/plugin/flusher/sls/DiskBufferWriter.cpp Show resolved Hide resolved
core/plugin/flusher/sls/DiskBufferWriter.cpp Outdated Show resolved Hide resolved
core/plugin/flusher/sls/FlusherSLS.cpp Show resolved Hide resolved
@henryzhx8 henryzhx8 merged commit 62c55e4 into main Dec 31, 2024
17 checks passed
@henryzhx8 henryzhx8 deleted the feat/client branch December 31, 2024 08:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
core Core feature enhancement Feature enhancement
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants