From 0c301d25c6bec67699d2d79aaa88bb332eaa78de Mon Sep 17 00:00:00 2001 From: quzard <1191890118@qq.com> Date: Wed, 13 Nov 2024 09:52:47 +0800 Subject: [PATCH] Changed the endpoint source type from LOCAL to REMOTE in the Init method of FlusherSLS (#1873) --- core/application/Application.cpp | 3 ++- core/plugin/flusher/sls/FlusherSLS.cpp | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/core/application/Application.cpp b/core/application/Application.cpp index 11fe230a67..70d095c4a8 100644 --- a/core/application/Application.cpp +++ b/core/application/Application.cpp @@ -114,6 +114,7 @@ void Application::Init() { // Initialize basic information: IP, hostname, etc. LogFileProfiler::GetInstance(); #ifdef __ENTERPRISE__ + EnterpriseConfigProvider::GetInstance()->Init("enterprise"); EnterpriseConfigProvider::GetInstance()->LoadRegionConfig(); if (GlobalConf::Instance()->mStartWorkerStatus == "Crash") { LogtailAlarm::GetInstance()->SendAlarm(LOGTAIL_CRASH_ALARM, "Logtail Restart"); @@ -222,7 +223,7 @@ void Application::Start() { // GCOVR_EXCL_START } #ifdef __ENTERPRISE__ - EnterpriseConfigProvider::GetInstance()->Init("enterprise"); + EnterpriseConfigProvider::GetInstance()->Start(); LegacyConfigProvider::GetInstance()->Init("legacy"); #else InitRemoteConfigProviders(); diff --git a/core/plugin/flusher/sls/FlusherSLS.cpp b/core/plugin/flusher/sls/FlusherSLS.cpp index 524b4550b9..b6cf23fdf4 100644 --- a/core/plugin/flusher/sls/FlusherSLS.cpp +++ b/core/plugin/flusher/sls/FlusherSLS.cpp @@ -379,7 +379,7 @@ bool FlusherSLS::Init(const Json::Value& config, Json::Value& optionalGoPipeline SLSClientManager::GetInstance()->AddEndpointEntry(mRegion, StandardizeEndpoint(mEndpoint, mEndpoint), false, - SLSClientManager::EndpointSourceType::LOCAL); + SLSClientManager::EndpointSourceType::REMOTE); } } #ifdef __ENTERPRISE__