Skip to content

Commit

Permalink
polish
Browse files Browse the repository at this point in the history
  • Loading branch information
henryzhx8 committed Sep 23, 2024
1 parent d3c8dda commit 625513c
Show file tree
Hide file tree
Showing 23 changed files with 228 additions and 138 deletions.
14 changes: 7 additions & 7 deletions core/common/compression/Compressor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -25,13 +25,13 @@ namespace logtail {
void Compressor::SetMetricRecordRef(MetricLabels&& labels, DynamicMetricLabels&& dynamicLabels) {
WriteMetrics::GetInstance()->PrepareMetricsRecordRef(
mMetricsRecordRef, std::move(labels), std::move(dynamicLabels));
mInItemsCnt = mMetricsRecordRef.CreateCounter(METRIC_IN_ITEMS_CNT);
mInItemSizeBytes = mMetricsRecordRef.CreateCounter(METRIC_IN_ITEM_SIZE_BYTES);
mOutItemsCnt = mMetricsRecordRef.CreateCounter(METRIC_OUT_ITEMS_CNT);
mOutItemSizeBytes = mMetricsRecordRef.CreateCounter(METRIC_OUT_ITEM_SIZE_BYTES);
mDiscardedItemsCnt = mMetricsRecordRef.CreateCounter("discarded_items_cnt");
mDiscardedItemSizeBytes = mMetricsRecordRef.CreateCounter("discarded_item_size_bytes");
mTotalDelayMs = mMetricsRecordRef.CreateCounter(METRIC_TOTAL_DELAY_MS);
mInItemsCnt = mMetricsRecordRef.CreateCounter(METRIC_COMPONENT_IN_ITEMS_CNT);
mInItemSizeBytes = mMetricsRecordRef.CreateCounter(METRIC_COMPONENT_IN_ITEM_SIZE_BYTES);
mOutItemsCnt = mMetricsRecordRef.CreateCounter(METRIC_COMPONENT_OUT_ITEMS_CNT);
mOutItemSizeBytes = mMetricsRecordRef.CreateCounter(METRIC_COMPONENT_OUT_ITEM_SIZE_BYTES);
mTotalDelayMs = mMetricsRecordRef.CreateCounter(METRIC_COMPONENT_TOTAL_DELAY_MS);
mDiscardedItemsCnt = mMetricsRecordRef.CreateCounter(METRIC_COMPONENT_DISCARDED_ITEMS_CNT);
mDiscardedItemSizeBytes = mMetricsRecordRef.CreateCounter(METRIC_COMPONENT_DISCARDED_ITEMS_SIZE_BYTES);
}

bool Compressor::DoCompress(const string& input, string& output, string& errorMsg) {
Expand Down
10 changes: 5 additions & 5 deletions core/file_server/event_handler/LogInput.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -88,11 +88,11 @@ void LogInput::Start() {

mInteruptFlag = false;

mLastRunTime = FileServer::GetInstance()->GetMetricsRecordRef().CreateIntGauge(METRIC_LAST_RUN_TIME);
mLastRunTime = FileServer::GetInstance()->GetMetricsRecordRef().CreateIntGauge(METRIC_RUNNER_LAST_RUN_TIME);
mAgentOpenFdTotal = LoongCollectorMonitor::GetInstance()->GetIntGauge(METRIC_AGENT_OPEN_FD_TOTAL);
mRegisterdHandlersCnt = FileServer::GetInstance()->GetMetricsRecordRef().CreateIntGauge("registered_handlers_cnt");
mReadersCnt = FileServer::GetInstance()->GetMetricsRecordRef().CreateIntGauge("readers_cnt");
mEnableFileIncludedByMultiConfigs = FileServer::GetInstance()->GetMetricsRecordRef().CreateIntGauge("enable_file_included_by_multi_configs");
mRegisterdHandlersCnt = FileServer::GetInstance()->GetMetricsRecordRef().CreateIntGauge(METRIC_RUNNER_FILE_WATCHED_DIRS_CNT);
mActiveReadersCnt = FileServer::GetInstance()->GetMetricsRecordRef().CreateIntGauge(METRIC_RUNNER_FILE_ACTIVE_READERS_CNT);
mEnableFileIncludedByMultiConfigs = FileServer::GetInstance()->GetMetricsRecordRef().CreateIntGauge(METRIC_RUNNER_FILE_ENABLE_FILE_INCLUDED_BY_MULTI_CONFIGS_FLAG);

new Thread([this]() { ProcessLoop(); });
}
Expand Down Expand Up @@ -355,7 +355,7 @@ void LogInput::UpdateCriticalMetric(int32_t curTime) {
LogtailMonitor::GetInstance()->UpdateMetric("register_handler", handlerCount);
mRegisterdHandlersCnt->Set(handlerCount);
LogtailMonitor::GetInstance()->UpdateMetric("reader_count", CheckPointManager::Instance()->GetReaderCount());
mReadersCnt->Set(CheckPointManager::Instance()->GetReaderCount());
mActiveReadersCnt->Set(CheckPointManager::Instance()->GetReaderCount());
LogtailMonitor::GetInstance()->UpdateMetric("multi_config", AppConfig::GetInstance()->IsAcceptMultiConfig());
mEventProcessCount = 0;
}
Expand Down
2 changes: 1 addition & 1 deletion core/file_server/event_handler/LogInput.h
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ class LogInput : public LogRunnable {
IntGaugePtr mLastRunTime;
IntGaugePtr mAgentOpenFdTotal;
IntGaugePtr mRegisterdHandlersCnt;
IntGaugePtr mReadersCnt;
IntGaugePtr mActiveReadersCnt;
IntGaugePtr mEnableFileIncludedByMultiConfigs;

std::atomic_int mLastReadEventTime{0};
Expand Down
27 changes: 2 additions & 25 deletions core/monitor/LogtailMetric.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -205,34 +205,11 @@ WriteMetrics::~WriteMetrics() {
Clear();
}

void WriteMetrics::PreparePluginCommonLabels(const std::string& projectName,
const std::string& logstoreName,
const std::string& region,
const std::string& configName,
const std::string& pluginType,
const std::string& pluginID,
const std::string& nodeID,
const std::string& childNodeID,
MetricLabels& labels) {
labels.emplace_back(std::make_pair(METRIC_LABEL_PROJECT, projectName));
labels.emplace_back(std::make_pair(METRIC_LABEL_LOGSTORE, logstoreName));
labels.emplace_back(std::make_pair(METRIC_LABEL_REGION, region));
labels.emplace_back(std::make_pair(METRIC_LABEL_CONFIG_NAME, configName));
labels.emplace_back(std::make_pair(METRIC_LABEL_PLUGIN_NAME, pluginType));
labels.emplace_back(std::make_pair(METRIC_LABEL_PLUGIN_ID, pluginID));
labels.emplace_back(std::make_pair(METRIC_LABEL_NODE_ID, nodeID));
labels.emplace_back(std::make_pair(METRIC_LABEL_CHILD_NODE_ID, childNodeID));
}

void WriteMetrics::PrepareMetricsRecordRef(MetricsRecordRef& ref,
MetricLabels&& labels,
DynamicMetricLabels&& dynamicLabels) {
MetricsRecord* cur = new MetricsRecord(std::make_shared<MetricLabels>(labels),
std::make_shared<DynamicMetricLabels>(dynamicLabels));
ref.SetMetricsRecord(cur);
std::lock_guard<std::mutex> lock(mMutex);
cur->SetNext(mHead);
mHead = cur;
CreateMetricsRecordRef(ref, std::move(labels), std::move(dynamicLabels));
CommitMetricsRecordRef(ref);
}

void WriteMetrics::CreateMetricsRecordRef(MetricsRecordRef& ref,
Expand Down
10 changes: 1 addition & 9 deletions core/monitor/LogtailMetric.h
Original file line number Diff line number Diff line change
Expand Up @@ -133,15 +133,7 @@ class WriteMetrics {
static WriteMetrics* ptr = new WriteMetrics();
return ptr;
}
void PreparePluginCommonLabels(const std::string& projectName,
const std::string& logstoreName,
const std::string& region,
const std::string& configName,
const std::string& pluginType,
const std::string& pluginID,
const std::string& nodeID,
const std::string& childNodeID,
MetricLabels& labels);

void
PrepareMetricsRecordRef(MetricsRecordRef& ref, MetricLabels&& labels, DynamicMetricLabels&& dynamicLabels = {});
void CreateMetricsRecordRef(MetricsRecordRef& ref, MetricLabels&& labels, DynamicMetricLabels&& dynamicLabels = {});
Expand Down
84 changes: 73 additions & 11 deletions core/monitor/MetricConstants.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -141,16 +141,78 @@ const std::string METRIC_FLUSHER_QUOTA_ERROR_TOTAL = "flusher_quota_error_total"
const std::string METRIC_FLUSHER_RETRIES_TOTAL = "flusher_retries_total";
const std::string METRIC_FLUSHER_RETRIES_ERROR_TOTAL = "flusher_retries_error_total";

const std::string METRIC_IN_EVENTS_CNT = "in_events_cnt";
const std::string METRIC_IN_EVENT_GROUPS_CNT = "in_event_groups_cnt";
const std::string METRIC_IN_ITEMS_CNT = "in_items_cnt";
const std::string METRIC_IN_EVENT_GROUP_SIZE_BYTES = "in_event_group_data_size_bytes";
const std::string METRIC_IN_ITEM_SIZE_BYTES = "in_item_data_size_bytes";
const std::string METRIC_OUT_EVENTS_CNT = "out_events_cnt";
const std::string METRIC_OUT_ITEMS_CNT = "out_items_cnt";
const std::string METRIC_OUT_EVENT_GROUP_SIZE_BYTES = "out_event_group_data_size_bytes";
const std::string METRIC_OUT_ITEM_SIZE_BYTES = "out_item_data_size_bytes";
const std::string METRIC_TOTAL_DELAY_MS = "total_delay_ms";
const std::string METRIC_LAST_RUN_TIME = "last_run_time";
//////////////////////////////////////////////////////////////////////////
// plugin
//////////////////////////////////////////////////////////////////////////
// common metrics
const std::string METRIC_PLUGIN_IN_EVENTS_CNT = "plugin_in_events_total";
const std::string METRIC_PLUGIN_IN_EVENT_GROUP_SIZE_BYTES = "plugin_in_event_group_size_bytes";

//////////////////////////////////////////////////////////////////////////
// component
//////////////////////////////////////////////////////////////////////////
// common metrics
const std::string METRIC_COMPONENT_IN_EVENTS_CNT = "component_in_events_total";
const std::string METRIC_COMPONENT_IN_ITEMS_CNT = "component_in_items_total";
const std::string METRIC_COMPONENT_IN_EVENT_GROUP_SIZE_BYTES = "component_in_event_group_size_bytes";
const std::string METRIC_COMPONENT_IN_ITEM_SIZE_BYTES = "component_in_item_size_bytes";
const std::string METRIC_COMPONENT_OUT_EVENTS_CNT = "component_out_events_total";
const std::string METRIC_COMPONENT_OUT_ITEMS_CNT = "component_out_items_total";
const std::string METRIC_COMPONENT_OUT_ITEM_SIZE_BYTES = "component_out_item_size_bytes";
const std::string METRIC_COMPONENT_TOTAL_DELAY_MS = "component_total_delay_ms";
const std::string METRIC_COMPONENT_DISCARDED_ITEMS_CNT = "component_discarded_items_total";
const std::string METRIC_COMPONENT_DISCARDED_ITEMS_SIZE_BYTES = "component_discarded_item_size_bytes";

// batcher metrics
const std::string METRIC_COMPONENT_BATCHER_EVENT_BATCHES_CNT = "component_event_batches_total";
const std::string METRIC_COMPONENT_BATCHER_BUFFERED_GROUPS_CNT = "component_buffered_groups_total";
const std::string METRIC_COMPONENT_BATCHER_BUFFERED_EVENTS_CNT = "component_buffered_events_total";
const std::string METRIC_COMPONENT_BATCHER_BUFFERED_SIZE_BYTES = "component_buffered_size_bytes";

// queue metrics
const std::string METRIC_COMPONENT_QUEUE_SIZE_CNT = "component_queue_size";
const std::string METRIC_COMPONENT_QUEUE_SIZE_BYTES = "component_queue_size_bytes";
const std::string METRIC_COMPONENT_QUEUE_VALID_TO_PUSH_FLAG = "component_valid_to_push";
const std::string METRIC_COMPONENT_QUEUE_EXTRA_BUFFER_SIZE = "component_extra_buffer_size";
const std::string METRIC_COMPONENT_QUEUE_EXTRA_BUFFER_SIZE_BYTES = "component_extra_buffer_size";
const std::string METRIC_COMPONENT_QUEUE_DISCARDED_EVENTS_CNT = "component_discarded_events_total";

//////////////////////////////////////////////////////////////////////////
// pipeline
//////////////////////////////////////////////////////////////////////////
const std::string METRIC_PIPELINE_START_TIME = "pipeline_start_time";
const std::string METRIC_PIPELINE_PROCESSORS_IN_EVENTS_CNT = "pipeline_processors_in_events_total";
const std::string METRIC_PIPELINE_PROCESSORS_IN_EVENT_GROUPS_CNT = "pipeline_processors_in_event_groups_total";
const std::string METRIC_PIPELINE_PROCESSORS_IN_EVENT_GROUP_SIZE_BYTES = "pipeline_processors_in_event_group_size_bytes";
const std::string METRIC_PIPELINE_PROCESSORS_TOTAL_DELAY_MS = "pipeline_processors_total_delay_ms";

//////////////////////////////////////////////////////////////////////////
// runner
//////////////////////////////////////////////////////////////////////////
// common metrics
const std::string METRIC_RUNNER_IN_EVENTS_CNT = "runner_in_events_total";
const std::string METRIC_RUNNER_IN_EVENT_GROUPS_CNT = "runner_in_event_groups_total";
const std::string METRIC_RUNNER_IN_ITEMS_CNT = "runner_in_items_total";
const std::string METRIC_RUNNER_IN_EVENT_GROUP_SIZE_BYTES = "runner_in_event_group_size_bytes";
const std::string METRIC_RUNNER_IN_ITEM_SIZE_BYTES = "runner_in_item_size_bytes";
const std::string METRIC_RUNNER_OUT_ITEMS_CNT = "runner_out_items_total";
const std::string METRIC_RUNNER_TOTAL_DELAY_MS = "runner_total_delay_ms";
const std::string METRIC_RUNNER_LAST_RUN_TIME = "runner_last_run_time";

// http sink metrics
const std::string METRIC_RUNNER_HTTP_SINK_OUT_SUCCESSFUL_ITEMS_CNT = "runner_out_successful_items_total";
const std::string METRIC_RUNNER_HTTP_SINK_OUT_FAILED_ITEMS_CNT = "runner_out_failed_items_total";
const std::string METRIC_RUNNER_HTTP_SINK_SENDING_ITEMS_CNT = "runner_sending_items_total";
const std::string METRIC_RUNNER_HTTP_SINK_SEND_CONCURRENCY = "runner_send_concurrency";

// flusher runner metrics
const std::string METRIC_RUNNER_FLUSHER_IN_ITEM_RAW_SIZE_BYTES = "runner_in_item_raw_size_bytes";
const std::string METRIC_RUNNER_FLUSHER_WAITING_ITEMS_CNT = "runner_waiting_items_total";

// file server metrics
const std::string METRIC_RUNNER_FILE_WATCHED_DIRS_CNT = "runner_watched_dirs_total";
const std::string METRIC_RUNNER_FILE_ACTIVE_READERS_CNT = "runner_active_readers_total";
const std::string METRIC_RUNNER_FILE_ENABLE_FILE_INCLUDED_BY_MULTI_CONFIGS_FLAG
= "runner_enable_file_included_by_multi_configs";

} // namespace logtail
83 changes: 72 additions & 11 deletions core/monitor/MetricConstants.h
Original file line number Diff line number Diff line change
Expand Up @@ -134,16 +134,77 @@ extern const std::string METRIC_FLUSHER_QUOTA_ERROR_TOTAL;
extern const std::string METRIC_FLUSHER_RETRIES_TOTAL;
extern const std::string METRIC_FLUSHER_RETRIES_ERROR_TOTAL;

extern const std::string METRIC_IN_EVENTS_CNT;
extern const std::string METRIC_IN_EVENT_GROUPS_CNT;
extern const std::string METRIC_IN_ITEMS_CNT;
extern const std::string METRIC_IN_EVENT_GROUP_SIZE_BYTES;
extern const std::string METRIC_IN_ITEM_SIZE_BYTES;
extern const std::string METRIC_OUT_EVENTS_CNT;
extern const std::string METRIC_OUT_ITEMS_CNT;
extern const std::string METRIC_OUT_EVENT_GROUP_SIZE_BYTES;
extern const std::string METRIC_OUT_ITEM_SIZE_BYTES;
extern const std::string METRIC_TOTAL_DELAY_MS;
extern const std::string METRIC_LAST_RUN_TIME;
//////////////////////////////////////////////////////////////////////////
// plugin
//////////////////////////////////////////////////////////////////////////
// common metrics
extern const std::string METRIC_PLUGIN_IN_EVENTS_CNT;
extern const std::string METRIC_PLUGIN_IN_EVENT_GROUP_SIZE_BYTES;

//////////////////////////////////////////////////////////////////////////
// component
//////////////////////////////////////////////////////////////////////////
// common metrics
extern const std::string METRIC_COMPONENT_IN_EVENTS_CNT;
extern const std::string METRIC_COMPONENT_IN_ITEMS_CNT;
extern const std::string METRIC_COMPONENT_IN_EVENT_GROUP_SIZE_BYTES;
extern const std::string METRIC_COMPONENT_IN_ITEM_SIZE_BYTES;
extern const std::string METRIC_COMPONENT_OUT_EVENTS_CNT;
extern const std::string METRIC_COMPONENT_OUT_ITEMS_CNT;
extern const std::string METRIC_COMPONENT_OUT_ITEM_SIZE_BYTES;
extern const std::string METRIC_COMPONENT_TOTAL_DELAY_MS;
extern const std::string METRIC_COMPONENT_DISCARDED_ITEMS_CNT;
extern const std::string METRIC_COMPONENT_DISCARDED_ITEMS_SIZE_BYTES;

// batcher metrics
extern const std::string METRIC_COMPONENT_BATCHER_EVENT_BATCHES_CNT;
extern const std::string METRIC_COMPONENT_BATCHER_BUFFERED_GROUPS_CNT;
extern const std::string METRIC_COMPONENT_BATCHER_BUFFERED_EVENTS_CNT;
extern const std::string METRIC_COMPONENT_BATCHER_BUFFERED_SIZE_BYTES;

// queue metrics
extern const std::string METRIC_COMPONENT_QUEUE_SIZE_CNT;
extern const std::string METRIC_COMPONENT_QUEUE_SIZE_BYTES;
extern const std::string METRIC_COMPONENT_QUEUE_VALID_TO_PUSH_FLAG;
extern const std::string METRIC_COMPONENT_QUEUE_EXTRA_BUFFER_SIZE;
extern const std::string METRIC_COMPONENT_QUEUE_EXTRA_BUFFER_SIZE_BYTES;
extern const std::string METRIC_COMPONENT_QUEUE_DISCARDED_EVENTS_CNT;

//////////////////////////////////////////////////////////////////////////
// pipeline
//////////////////////////////////////////////////////////////////////////
extern const std::string METRIC_PIPELINE_START_TIME;
extern const std::string METRIC_PIPELINE_PROCESSORS_IN_EVENTS_CNT;
extern const std::string METRIC_PIPELINE_PROCESSORS_IN_EVENT_GROUPS_CNT;
extern const std::string METRIC_PIPELINE_PROCESSORS_IN_EVENT_GROUP_SIZE_BYTES;
extern const std::string METRIC_PIPELINE_PROCESSORS_TOTAL_DELAY_MS;

//////////////////////////////////////////////////////////////////////////
// runner
//////////////////////////////////////////////////////////////////////////
// common metrics
extern const std::string METRIC_RUNNER_IN_EVENTS_CNT;
extern const std::string METRIC_RUNNER_IN_EVENT_GROUPS_CNT;
extern const std::string METRIC_RUNNER_IN_ITEMS_CNT;
extern const std::string METRIC_RUNNER_IN_EVENT_GROUP_SIZE_BYTES;
extern const std::string METRIC_RUNNER_IN_ITEM_SIZE_BYTES;
extern const std::string METRIC_RUNNER_OUT_ITEMS_CNT;
extern const std::string METRIC_RUNNER_TOTAL_DELAY_MS;
extern const std::string METRIC_RUNNER_LAST_RUN_TIME;

// http sink metrics
extern const std::string METRIC_RUNNER_HTTP_SINK_OUT_SUCCESSFUL_ITEMS_CNT;
extern const std::string METRIC_RUNNER_HTTP_SINK_OUT_FAILED_ITEMS_CNT;
extern const std::string METRIC_RUNNER_HTTP_SINK_SENDING_ITEMS_CNT;
extern const std::string METRIC_RUNNER_HTTP_SINK_SEND_CONCURRENCY;

// flusher runner metrics
extern const std::string METRIC_RUNNER_FLUSHER_IN_ITEM_RAW_SIZE_BYTES;
extern const std::string METRIC_RUNNER_FLUSHER_WAITING_ITEMS_CNT;

// file server metrics
extern const std::string METRIC_RUNNER_FILE_WATCHED_DIRS_CNT;
extern const std::string METRIC_RUNNER_FILE_ACTIVE_READERS_CNT;
extern const std::string METRIC_RUNNER_FILE_ENABLE_FILE_INCLUDED_BY_MULTI_CONFIGS_FLAG;

} // namespace logtail
11 changes: 6 additions & 5 deletions core/pipeline/Pipeline.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -317,11 +317,12 @@ bool Pipeline::Init(PipelineConfig&& config) {

WriteMetrics::GetInstance()->PrepareMetricsRecordRef(
mMetricsRecordRef, {{METRIC_LABEL_PROJECT, mContext.GetProjectName()}, {METRIC_LABEL_CONFIG_NAME, mName}});
mStartTime = mMetricsRecordRef.CreateIntGauge("start_time");
mProcessorsInEventsCnt = mMetricsRecordRef.CreateCounter("processors_in_events_cnt");
mProcessorsInGroupsCnt = mMetricsRecordRef.CreateCounter("processors_in_event_groups_cnt");
mProcessorsInGroupDataSizeBytes = mMetricsRecordRef.CreateCounter("processors_in_event_group_data_size_bytes");
mProcessorsTotalDelayMs = mMetricsRecordRef.CreateCounter("processors_total_delay_ms");
mStartTime = mMetricsRecordRef.CreateIntGauge(METRIC_PIPELINE_START_TIME);
mProcessorsInEventsCnt = mMetricsRecordRef.CreateCounter(METRIC_PIPELINE_PROCESSORS_IN_EVENTS_CNT);
mProcessorsInGroupsCnt = mMetricsRecordRef.CreateCounter(METRIC_PIPELINE_PROCESSORS_IN_EVENT_GROUPS_CNT);
mProcessorsInGroupDataSizeBytes
= mMetricsRecordRef.CreateCounter(METRIC_PIPELINE_PROCESSORS_IN_EVENT_GROUP_SIZE_BYTES);
mProcessorsTotalDelayMs = mMetricsRecordRef.CreateCounter(METRIC_PIPELINE_PROCESSORS_TOTAL_DELAY_MS);

return true;
}
Expand Down
16 changes: 8 additions & 8 deletions core/pipeline/batch/Batcher.h
Original file line number Diff line number Diff line change
Expand Up @@ -110,14 +110,14 @@ class Batcher {
labels.emplace_back("enable_group_batch", "false");
}
WriteMetrics::GetInstance()->PrepareMetricsRecordRef(mMetricsRecordRef, std::move(labels));
mInEventsCnt = mMetricsRecordRef.CreateCounter(METRIC_IN_EVENTS_CNT);
mInGroupDataSizeBytes = mMetricsRecordRef.CreateCounter(METRIC_IN_EVENT_GROUP_SIZE_BYTES);
mOutEventsCnt = mMetricsRecordRef.CreateCounter(METRIC_OUT_EVENTS_CNT);
mTotalDelayMs = mMetricsRecordRef.CreateCounter(METRIC_TOTAL_DELAY_MS);
mEventBatchItemsCnt = mMetricsRecordRef.CreateIntGauge("event_batches_cnt");
mBufferedGroupsCnt = mMetricsRecordRef.CreateIntGauge("buffered_groups_cnt");
mBufferedEventsCnt = mMetricsRecordRef.CreateIntGauge("buffered_events_cnt");
mBufferedDataSizeByte = mMetricsRecordRef.CreateIntGauge("buffered_data_size_bytes");
mInEventsCnt = mMetricsRecordRef.CreateCounter(METRIC_COMPONENT_IN_EVENTS_CNT);
mInGroupDataSizeBytes = mMetricsRecordRef.CreateCounter(METRIC_COMPONENT_IN_EVENT_GROUP_SIZE_BYTES);
mOutEventsCnt = mMetricsRecordRef.CreateCounter(METRIC_COMPONENT_OUT_EVENTS_CNT);
mTotalDelayMs = mMetricsRecordRef.CreateCounter(METRIC_COMPONENT_TOTAL_DELAY_MS);
mEventBatchItemsCnt = mMetricsRecordRef.CreateIntGauge(METRIC_COMPONENT_BATCHER_EVENT_BATCHES_CNT);
mBufferedGroupsCnt = mMetricsRecordRef.CreateIntGauge(METRIC_COMPONENT_BATCHER_BUFFERED_GROUPS_CNT);
mBufferedEventsCnt = mMetricsRecordRef.CreateIntGauge(METRIC_COMPONENT_BATCHER_BUFFERED_EVENTS_CNT);
mBufferedDataSizeByte = mMetricsRecordRef.CreateIntGauge(METRIC_COMPONENT_BATCHER_BUFFERED_SIZE_BYTES);

return true;
}
Expand Down
Loading

0 comments on commit 625513c

Please sign in to comment.