summaryrefslogtreecommitdiff
path: root/src/mongo/db/clientcursor.cpp
diff options
context:
space:
mode:
authorWill Buerger <will.buerger@mongodb.com>2023-05-03 18:58:03 +0000
committerEvergreen Agent <no-reply@evergreen.mongodb.com>2023-05-03 20:09:50 +0000
commitdffa373f8558c13b52299b187a261a7593189237 (patch)
tree57807b5ee3deebc29b4128b90230aa66ecc4f00f /src/mongo/db/clientcursor.cpp
parent01e26506a0981b4141bc65c9d016666ada60319e (diff)
downloadmongo-dffa373f8558c13b52299b187a261a7593189237.tar.gz
SERVER-76781: Decouple opdebug metric collection from telemetry
Diffstat (limited to 'src/mongo/db/clientcursor.cpp')
-rw-r--r--src/mongo/db/clientcursor.cpp17
1 files changed, 4 insertions, 13 deletions
diff --git a/src/mongo/db/clientcursor.cpp b/src/mongo/db/clientcursor.cpp
index 90c3a4581cc..9037096354b 100644
--- a/src/mongo/db/clientcursor.cpp
+++ b/src/mongo/db/clientcursor.cpp
@@ -393,23 +393,14 @@ void startClientCursorMonitor() {
getClientCursorMonitor(getGlobalServiceContext()).go();
}
-void collectTelemetryMongod(OperationContext* opCtx,
- ClientCursorPin& pinnedCursor,
- long long nreturned) {
- auto curOp = CurOp::get(opCtx);
- telemetry::collectMetricsOnOpDebug(curOp, nreturned);
- pinnedCursor->incrementCursorMetrics(curOp->debug().additiveMetrics);
+void collectTelemetryMongod(OperationContext* opCtx, ClientCursorPin& pinnedCursor) {
+ pinnedCursor->incrementCursorMetrics(CurOp::get(opCtx)->debug().additiveMetrics);
}
-void collectTelemetryMongod(OperationContext* opCtx,
- const BSONObj& originatingCommand,
- long long nreturned) {
- auto curOp = CurOp::get(opCtx);
- telemetry::collectMetricsOnOpDebug(curOp, nreturned);
-
+void collectTelemetryMongod(OperationContext* opCtx, const BSONObj& originatingCommand) {
// If we haven't registered a cursor to prepare for getMore requests, we record
// telemetry directly.
- auto& opDebug = curOp->debug();
+ auto& opDebug = CurOp::get(opCtx)->debug();
telemetry::writeTelemetry(
opCtx,
opDebug.telemetryStoreKey,