Skip to content

Commit

Permalink
polish
Browse files Browse the repository at this point in the history
  • Loading branch information
henryzhx8 committed Sep 13, 2024
1 parent 462245b commit 328b4b6
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion core/monitor/MetricConstants.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ const std::string METRIC_LABEL_CHILD_NODE_ID = "child_node_id";
const std::string METRIC_LABEL_COMPONENT_NAME = "component_name";
const std::string METRIC_LABEL_QUEUE_TYPE = "queue_type";
const std::string METRIC_LABEL_EXACTLY_ONCE_FLAG = "is_exactly_once";
const std::string METRIC_LABEL_FLUSHER_PLUGIN_ID = "flusher_plugin_id";
const std::string METRIC_LABEL_FLUSHER_NODE_ID = "flusher_node_id";

// input file plugin labels
const std::string METRIC_LABEL_FILE_DEV = "file_dev";
Expand Down
2 changes: 1 addition & 1 deletion core/monitor/MetricConstants.h
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ extern const std::string METRIC_LABEL_FILE_NAME;
extern const std::string METRIC_LABEL_COMPONENT_NAME;
extern const std::string METRIC_LABEL_QUEUE_TYPE;
extern const std::string METRIC_LABEL_EXACTLY_ONCE_FLAG;
extern const std::string METRIC_LABEL_FLUSHER_PLUGIN_ID;
extern const std::string METRIC_LABEL_FLUSHER_NODE_ID;

// input file metrics
extern const std::string METRIC_INPUT_RECORDS_TOTAL;
Expand Down
2 changes: 1 addition & 1 deletion core/pipeline/queue/BoundedSenderQueueInterface.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ BoundedSenderQueueInterface::BoundedSenderQueueInterface(
size_t cap, size_t low, size_t high, QueueKey key, const string& flusherId, const PipelineContext& ctx)
: QueueInterface(key, cap, ctx), BoundedQueueInterface<std::unique_ptr<SenderQueueItem>>(key, cap, low, high, ctx) {
mMetricsRecordRef.AddLabels({{METRIC_LABEL_COMPONENT_NAME, "sender_queue"}});
mMetricsRecordRef.AddLabels({{METRIC_LABEL_FLUSHER_PLUGIN_ID, flusherId}});
mMetricsRecordRef.AddLabels({{METRIC_LABEL_FLUSHER_NODE_ID, flusherId}});
mExtraBufferCnt = mMetricsRecordRef.CreateIntGauge("extra_buffer_size");
mExtraBufferDataSizeByte = mMetricsRecordRef.CreateIntGauge("extra_buffer_data_size_byte");
}
Expand Down
2 changes: 1 addition & 1 deletion core/unittest/queue/SenderQueueUnittest.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -176,7 +176,7 @@ void SenderQueueUnittest::TestMetric() {
APSARA_TEST_TRUE(mQueue->mMetricsRecordRef.HasLabel(METRIC_LABEL_CONFIG_NAME, "test_config"));
APSARA_TEST_TRUE(mQueue->mMetricsRecordRef.HasLabel(METRIC_LABEL_COMPONENT_NAME, "sender_queue"));
APSARA_TEST_TRUE(mQueue->mMetricsRecordRef.HasLabel(METRIC_LABEL_QUEUE_TYPE, "bounded"));
APSARA_TEST_TRUE(mQueue->mMetricsRecordRef.HasLabel(METRIC_LABEL_FLUSHER_PLUGIN_ID, sFlusherId));
APSARA_TEST_TRUE(mQueue->mMetricsRecordRef.HasLabel(METRIC_LABEL_FLUSHER_NODE_ID, sFlusherId));

auto item1 = GenerateItem();
auto dataSize = item1->mData.size();
Expand Down

0 comments on commit 328b4b6

Please sign in to comment.