Skip to content

Commit

Permalink
fix send enterprise profile failure (#1578)
Browse files Browse the repository at this point in the history
  • Loading branch information
henryzhx8 authored Jul 2, 2024
1 parent 0131dd5 commit db1fa5e
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 3 deletions.
2 changes: 1 addition & 1 deletion core/flusher/FlusherSLS.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
}

Expand Down
7 changes: 5 additions & 2 deletions core/flusher/FlusherSLS.h
Original file line number Diff line number Diff line change
Expand Up @@ -24,19 +24,22 @@
#include <unordered_set>
#include <vector>

#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 };

Expand Down
5 changes: 5 additions & 0 deletions core/profile_sender/ProfileSender.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down Expand Up @@ -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) {
Expand Down

0 comments on commit db1fa5e

Please sign in to comment.