Skip to content

Commit

Permalink
HPCC-30817 Switch metrics to target audience=monitor
Browse files Browse the repository at this point in the history
Signed-off-by: Gavin Halliday <[email protected]>
  • Loading branch information
ghalliday committed Nov 13, 2023
1 parent 0b0f217 commit 8d8b90e
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion system/jlib/jlog.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -835,7 +835,7 @@ constexpr LogMsgCategory MCuserInfo(MSGAUD_user, MSGCLS_information, InfoMsgThre
constexpr LogMsgCategory MCdebugInfo(MSGAUD_programmer, MSGCLS_information, DebugMsgThreshold);
constexpr LogMsgCategory MCauditInfo(MSGAUD_audit, MSGCLS_information, AudMsgThreshold);
constexpr LogMsgCategory MCoperatorInfo(MSGAUD_operator, MSGCLS_information, InfoMsgThreshold);
constexpr LogMsgCategory MCoperatorMetric(MSGAUD_operator, MSGCLS_metric, ErrMsgThreshold);
constexpr LogMsgCategory MCmonitorMetric(MSGAUD_monitor, MSGCLS_metric, ErrMsgThreshold);
constexpr LogMsgCategory MCmonitorEvent(MSGAUD_monitor, MSGCLS_event, ProgressMsgThreshold);

/*
Expand Down
10 changes: 5 additions & 5 deletions system/metrics/sinks/log/logSink.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ void LogMetricSink::writeLogEntry(const std::shared_ptr<IMetric> &pMetric)
{
name.append(".").append(unitsStr);
}
LOG(MCoperatorMetric, "name=%s,value=%" I64F "d", name.c_str(), pMetric->queryValue());
LOG(MCmonitorMetric, "name=%s,value=%" I64F "d", name.c_str(), pMetric->queryValue());
}
else
{
Expand All @@ -72,18 +72,18 @@ void LogMetricSink::writeLogEntry(const std::shared_ptr<IMetric> &pMetric)
for (size_t i=0; i < countBucketValues - 1; ++i)
{
cumulative += values[i];
LOG(MCoperatorMetric, "name=%s, bucket le %" I64F "d=%" I64F "d", name.c_str(), limits[i], cumulative);
LOG(MCmonitorMetric, "name=%s, bucket le %" I64F "d=%" I64F "d", name.c_str(), limits[i], cumulative);
}

// The inf bucket count is the last element in the array of values returned.
// Add it to the cumulative count and print the value
cumulative += values[countBucketValues - 1];
LOG(MCoperatorMetric, "name=%s, bucket inf=%" I64F "d", name.c_str(), cumulative);
LOG(MCmonitorMetric, "name=%s, bucket inf=%" I64F "d", name.c_str(), cumulative);

// sum - total of all observations
LOG(MCoperatorMetric, "name=%s, sum=%" I64F "d", name.c_str(), pMetric->queryValue());
LOG(MCmonitorMetric, "name=%s, sum=%" I64F "d", name.c_str(), pMetric->queryValue());

// count - total of all bucket counts (same as inf)
LOG(MCoperatorMetric, "name=%s, count=%" I64F "d", name.c_str(), cumulative);
LOG(MCmonitorMetric, "name=%s, count=%" I64F "d", name.c_str(), cumulative);
}
}

0 comments on commit 8d8b90e

Please sign in to comment.