diff --git a/core/flusher/FlusherSLS.cpp b/core/flusher/FlusherSLS.cpp index 72389f3c8c..ea42599e6a 100644 --- a/core/flusher/FlusherSLS.cpp +++ b/core/flusher/FlusherSLS.cpp @@ -520,7 +520,7 @@ void FlusherSLS::SerializeAndPush(BatchedEventsList&& groupList) { if (enablePackageList) { string errorMsg; mGroupListSerializer->Serialize(std::move(compressedLogGroups), serializedData, errorMsg); - PushToQueue(std::move(compressedData), packageSize, RawDataType::EVENT_GROUP_LIST); + PushToQueue(std::move(serializedData), packageSize, RawDataType::EVENT_GROUP_LIST); } } diff --git a/core/flusher/FlusherSLS.h b/core/flusher/FlusherSLS.h index 387c7cce92..3bb4f933dc 100644 --- a/core/flusher/FlusherSLS.h +++ b/core/flusher/FlusherSLS.h @@ -24,19 +24,22 @@ #include #include -#include "batch/Batcher.h" #include "batch/BatchStatus.h" +#include "batch/Batcher.h" #include "common/LogstoreFeedbackKey.h" #include "compression/Compressor.h" #include "models/PipelineEventGroup.h" #include "plugin/interface/Flusher.h" -#include "serializer/SLSSerializer.h" #include "queue/SenderQueueItem.h" #include "sender/ConcurrencyLimiter.h" +#include "serializer/SLSSerializer.h" namespace logtail { class FlusherSLS : public Flusher { + // TODO: temporarily used here + friend class ProfileSender; + public: enum class TelemetryType { LOG, METRIC }; diff --git a/core/profile_sender/ProfileSender.cpp b/core/profile_sender/ProfileSender.cpp index 22eb649c5e..3e9f3e4e89 100644 --- a/core/profile_sender/ProfileSender.cpp +++ b/core/profile_sender/ProfileSender.cpp @@ -28,6 +28,8 @@ #include "sdk/Exception.h" #include "sender/Sender.h" #include "sls_control/SLSControl.h" +// TODO: temporarily used here +#include "compression/CompressorFactory.h" using namespace std; @@ -99,6 +101,9 @@ void ProfileSender::SetProfileProjectName(const string& region, const string& pr flusher.mRegion = region; flusher.mAliuid = STRING_FLAG(logtail_profile_aliuid); // logstore is given at send time + // TODO: temporarily used here + flusher.mCompressor + = CompressorFactory::GetInstance()->Create(Json::Value(), PipelineContext(), "flusher_sls", CompressType::LZ4); } FlusherSLS* ProfileSender::GetFlusher(const string& region) {