summaryrefslogtreecommitdiff
path: root/src/mongo/db/clientcursor.cpp
diff options
context:
space:
mode:
authorliubov.molchanova <liubov.molchanova@mongodb.com>2023-05-17 08:16:48 +0000
committerEvergreen Agent <no-reply@evergreen.mongodb.com>2023-05-17 10:20:42 +0000
commit87160f876c6fb94f5d03062b2caee57539ec5d8e (patch)
treeb78d9ca9e853a236e0a2f6432a6ac02dc50119cd /src/mongo/db/clientcursor.cpp
parent1c390a0c50104a04cbd8ecbefb99eaf22e1bc914 (diff)
downloadmongo-87160f876c6fb94f5d03062b2caee57539ec5d8e.tar.gz
Revert "SERVER-76427: Rename $telemetry to $queryStats"
This reverts commit d646e44b7801a3e5b3230bbae7dcfe05a5ed8707.
Diffstat (limited to 'src/mongo/db/clientcursor.cpp')
-rw-r--r--src/mongo/db/clientcursor.cpp36
1 files changed, 18 insertions, 18 deletions
diff --git a/src/mongo/db/clientcursor.cpp b/src/mongo/db/clientcursor.cpp
index 3b4f0143876..55e116e5893 100644
--- a/src/mongo/db/clientcursor.cpp
+++ b/src/mongo/db/clientcursor.cpp
@@ -48,7 +48,7 @@
#include "mongo/db/cursor_server_params.h"
#include "mongo/db/jsobj.h"
#include "mongo/db/query/explain.h"
-#include "mongo/db/query/query_stats.h"
+#include "mongo/db/query/telemetry.h"
#include "mongo/db/repl/repl_client_info.h"
#include "mongo/db/repl/replication_coordinator.h"
#include "mongo/util/background.h"
@@ -124,10 +124,10 @@ ClientCursor::ClientCursor(ClientCursorParams params,
_planSummary(_exec->getPlanExplainer().getPlanSummary()),
_planCacheKey(CurOp::get(operationUsingCursor)->debug().planCacheKey),
_queryHash(CurOp::get(operationUsingCursor)->debug().queryHash),
- _queryStatsStoreKeyHash(CurOp::get(operationUsingCursor)->debug().queryStatsStoreKeyHash),
- _queryStatsStoreKey(CurOp::get(operationUsingCursor)->debug().queryStatsStoreKey),
- _queryStatsRequestShapifier(
- std::move(CurOp::get(operationUsingCursor)->debug().queryStatsRequestShapifier)),
+ _telemetryStoreKeyHash(CurOp::get(operationUsingCursor)->debug().telemetryStoreKeyHash),
+ _telemetryStoreKey(CurOp::get(operationUsingCursor)->debug().telemetryStoreKey),
+ _telemetryRequestShapifier(
+ std::move(CurOp::get(operationUsingCursor)->debug().telemetryRequestShapifier)),
_shouldOmitDiagnosticInformation(
CurOp::get(operationUsingCursor)->debug().shouldOmitDiagnosticInformation),
_opKey(operationUsingCursor->getOperationKey()) {
@@ -161,13 +161,13 @@ void ClientCursor::dispose(OperationContext* opCtx, boost::optional<Date_t> now)
return;
}
- if (_queryStatsStoreKeyHash && opCtx) {
- query_stats::writeQueryStats(opCtx,
- _queryStatsStoreKeyHash,
- _queryStatsStoreKey,
- std::move(_queryStatsRequestShapifier),
- _metrics.executionTime.value_or(Microseconds{0}).count(),
- _metrics.nreturned.value_or(0));
+ if (_telemetryStoreKeyHash && opCtx) {
+ telemetry::writeTelemetry(opCtx,
+ _telemetryStoreKeyHash,
+ _telemetryStoreKey,
+ std::move(_telemetryRequestShapifier),
+ _metrics.executionTime.value_or(Microseconds{0}).count(),
+ _metrics.nreturned.value_or(0));
}
if (now) {
@@ -397,19 +397,19 @@ void startClientCursorMonitor() {
getClientCursorMonitor(getGlobalServiceContext()).go();
}
-void collectQueryStatsMongod(OperationContext* opCtx, ClientCursorPin& pinnedCursor) {
+void collectTelemetryMongod(OperationContext* opCtx, ClientCursorPin& pinnedCursor) {
pinnedCursor->incrementCursorMetrics(CurOp::get(opCtx)->debug().additiveMetrics);
}
-void collectQueryStatsMongod(OperationContext* opCtx,
- std::unique_ptr<query_stats::RequestShapifier> requestShapifier) {
+void collectTelemetryMongod(OperationContext* opCtx,
+ std::unique_ptr<telemetry::RequestShapifier> requestShapifier) {
// If we haven't registered a cursor to prepare for getMore requests, we record
// telemetry directly.
auto& opDebug = CurOp::get(opCtx)->debug();
- query_stats::writeQueryStats(
+ telemetry::writeTelemetry(
opCtx,
- opDebug.queryStatsStoreKeyHash,
- opDebug.queryStatsStoreKey,
+ opDebug.telemetryStoreKeyHash,
+ opDebug.telemetryStoreKey,
std::move(requestShapifier),
opDebug.additiveMetrics.executionTime.value_or(Microseconds{0}).count(),
opDebug.additiveMetrics.nreturned.value_or(0));