summaryrefslogtreecommitdiff
path: root/src/mongo/db/pipeline
diff options
context:
space:
mode:
Diffstat (limited to 'src/mongo/db/pipeline')
-rw-r--r--src/mongo/db/pipeline/SConscript4
-rw-r--r--src/mongo/db/pipeline/abt/document_source_visitor.cpp2
-rw-r--r--src/mongo/db/pipeline/aggregate_command.idl6
-rw-r--r--src/mongo/db/pipeline/aggregate_request_shapifier.cpp12
-rw-r--r--src/mongo/db/pipeline/aggregate_request_shapifier.h11
-rw-r--r--src/mongo/db/pipeline/document_source_telemetry.cpp (renamed from src/mongo/db/pipeline/document_source_query_stats.cpp)56
-rw-r--r--src/mongo/db/pipeline/document_source_telemetry.h (renamed from src/mongo/db/pipeline/document_source_query_stats.h)24
-rw-r--r--src/mongo/db/pipeline/document_source_telemetry_test.cpp (renamed from src/mongo/db/pipeline/document_source_query_stats_test.cpp)42
-rw-r--r--src/mongo/db/pipeline/visitors/document_source_visitor_registry_mongod.h4
9 files changed, 80 insertions, 81 deletions
diff --git a/src/mongo/db/pipeline/SConscript b/src/mongo/db/pipeline/SConscript
index eacb62bb6ea..72a1ab942b4 100644
--- a/src/mongo/db/pipeline/SConscript
+++ b/src/mongo/db/pipeline/SConscript
@@ -328,7 +328,7 @@ pipelineEnv.Library(
'document_source_sort_by_count.cpp',
'document_source_streaming_group.cpp',
'document_source_tee_consumer.cpp',
- 'document_source_query_stats.cpp',
+ 'document_source_telemetry.cpp',
'document_source_union_with.cpp',
'document_source_unwind.cpp',
'group_from_first_document_transformation.cpp',
@@ -634,7 +634,7 @@ env.CppUnitTest(
'document_source_skip_test.cpp',
'document_source_sort_by_count_test.cpp',
'document_source_sort_test.cpp',
- 'document_source_query_stats_test.cpp',
+ 'document_source_telemetry_test.cpp',
'document_source_union_with_test.cpp',
'document_source_internal_compute_geo_near_distance_test.cpp',
'document_source_internal_convert_bucket_index_stats_test.cpp',
diff --git a/src/mongo/db/pipeline/abt/document_source_visitor.cpp b/src/mongo/db/pipeline/abt/document_source_visitor.cpp
index 9b7b27d3af0..2170ab14407 100644
--- a/src/mongo/db/pipeline/abt/document_source_visitor.cpp
+++ b/src/mongo/db/pipeline/abt/document_source_visitor.cpp
@@ -58,7 +58,6 @@
#include "mongo/db/pipeline/document_source_operation_metrics.h"
#include "mongo/db/pipeline/document_source_out.h"
#include "mongo/db/pipeline/document_source_plan_cache_stats.h"
-#include "mongo/db/pipeline/document_source_query_stats.h"
#include "mongo/db/pipeline/document_source_queue.h"
#include "mongo/db/pipeline/document_source_redact.h"
#include "mongo/db/pipeline/document_source_sample.h"
@@ -68,6 +67,7 @@
#include "mongo/db/pipeline/document_source_skip.h"
#include "mongo/db/pipeline/document_source_sort.h"
#include "mongo/db/pipeline/document_source_tee_consumer.h"
+#include "mongo/db/pipeline/document_source_telemetry.h"
#include "mongo/db/pipeline/document_source_union_with.h"
#include "mongo/db/pipeline/document_source_unwind.h"
#include "mongo/db/pipeline/visitors/document_source_visitor_registry_mongod.h"
diff --git a/src/mongo/db/pipeline/aggregate_command.idl b/src/mongo/db/pipeline/aggregate_command.idl
index 476fc8dbb9d..b53ea540f8e 100644
--- a/src/mongo/db/pipeline/aggregate_command.idl
+++ b/src/mongo/db/pipeline/aggregate_command.idl
@@ -96,10 +96,10 @@ commands:
- privilege: # $planCacheStats
resource_pattern: exact_namespace
action_type: planCacheRead
- - privilege: # $queryStats
- agg_stage: queryStats
+ - privilege: # $telemetry
+ agg_stage: telemetry
resource_pattern: cluster
- action_type: queryStatsRead
+ action_type: telemetryRead
- privilege: # $changeStream
resource_pattern: exact_namespace
action_type: changeStream
diff --git a/src/mongo/db/pipeline/aggregate_request_shapifier.cpp b/src/mongo/db/pipeline/aggregate_request_shapifier.cpp
index 485b97e2c22..40ed6c2ce79 100644
--- a/src/mongo/db/pipeline/aggregate_request_shapifier.cpp
+++ b/src/mongo/db/pipeline/aggregate_request_shapifier.cpp
@@ -31,20 +31,20 @@
#include "mongo/db/query/query_shape.h"
-namespace mongo::query_stats {
+namespace mongo::telemetry {
-BSONObj AggregateRequestShapifier::makeQueryStatsKey(const SerializationOptions& opts,
- OperationContext* opCtx) const {
+BSONObj AggregateRequestShapifier::makeTelemetryKey(const SerializationOptions& opts,
+ OperationContext* opCtx) const {
// TODO SERVER-76087 We will likely want to set a flag here to stop $search from calling out
// to mongot.
auto expCtx = make_intrusive<ExpressionContext>(opCtx, nullptr, _request.getNamespace());
expCtx->variables.setDefaultRuntimeConstants(opCtx);
expCtx->maxFeatureCompatibilityVersion = boost::none; // Ensure all features are allowed.
expCtx->stopExpressionCounters();
- return makeQueryStatsKey(opts, expCtx);
+ return makeTelemetryKey(opts, expCtx);
}
-BSONObj AggregateRequestShapifier::makeQueryStatsKey(
+BSONObj AggregateRequestShapifier::makeTelemetryKey(
const SerializationOptions& opts, const boost::intrusive_ptr<ExpressionContext>& expCtx) const {
BSONObjBuilder bob;
@@ -84,4 +84,4 @@ BSONObj AggregateRequestShapifier::makeQueryStatsKey(
return bob.obj();
}
-} // namespace mongo::query_stats
+} // namespace mongo::telemetry
diff --git a/src/mongo/db/pipeline/aggregate_request_shapifier.h b/src/mongo/db/pipeline/aggregate_request_shapifier.h
index d78dae31be7..3a0c41f8dd9 100644
--- a/src/mongo/db/pipeline/aggregate_request_shapifier.h
+++ b/src/mongo/db/pipeline/aggregate_request_shapifier.h
@@ -33,7 +33,7 @@
#include "mongo/db/pipeline/pipeline.h"
#include "mongo/db/query/request_shapifier.h"
-namespace mongo::query_stats {
+namespace mongo::telemetry {
/**
* Handles shapification for AggregateCommandRequests. Requires a pre-parsed pipeline in order to
@@ -50,14 +50,13 @@ public:
virtual ~AggregateRequestShapifier() = default;
- BSONObj makeQueryStatsKey(const SerializationOptions& opts,
- OperationContext* opCtx) const final;
+ BSONObj makeTelemetryKey(const SerializationOptions& opts, OperationContext* opCtx) const final;
- BSONObj makeQueryStatsKey(const SerializationOptions& opts,
- const boost::intrusive_ptr<ExpressionContext>& expCtx) const final;
+ BSONObj makeTelemetryKey(const SerializationOptions& opts,
+ const boost::intrusive_ptr<ExpressionContext>& expCtx) const final;
private:
const AggregateCommandRequest& _request;
const Pipeline& _pipeline;
};
-} // namespace mongo::query_stats
+} // namespace mongo::telemetry
diff --git a/src/mongo/db/pipeline/document_source_query_stats.cpp b/src/mongo/db/pipeline/document_source_telemetry.cpp
index 48f14e0ade6..b037515796f 100644
--- a/src/mongo/db/pipeline/document_source_query_stats.cpp
+++ b/src/mongo/db/pipeline/document_source_telemetry.cpp
@@ -27,7 +27,7 @@
* it in the license file.
*/
-#include "mongo/db/pipeline/document_source_query_stats.h"
+#include "mongo/db/pipeline/document_source_telemetry.h"
#include "mongo/bson/bsontypes.h"
#include "mongo/bson/timestamp.h"
@@ -38,14 +38,14 @@
namespace mongo {
namespace {
-CounterMetric queryStatsHmacApplicationErrors("queryStats.numHmacApplicationErrors");
+CounterMetric telemetryHmacApplicationErrors("telemetry.numHmacApplicationErrors");
}
-REGISTER_DOCUMENT_SOURCE_WITH_FEATURE_FLAG(queryStats,
- DocumentSourceQueryStats::LiteParsed::parse,
- DocumentSourceQueryStats::createFromBson,
+REGISTER_DOCUMENT_SOURCE_WITH_FEATURE_FLAG(telemetry,
+ DocumentSourceTelemetry::LiteParsed::parse,
+ DocumentSourceTelemetry::createFromBson,
AllowedWithApiStrict::kNeverInVersion1,
- feature_flags::gFeatureFlagQueryStats);
+ feature_flags::gFeatureFlagTelemetry);
namespace {
/**
@@ -55,7 +55,7 @@ boost::optional<bool> parseApplyHmacToIdentifiers(const BSONElement& el) {
if (el.fieldNameStringData() == "applyHmacToIdentifiers"_sd) {
auto type = el.type();
uassert(ErrorCodes::FailedToParse,
- str::stream() << DocumentSourceQueryStats::kStageName
+ str::stream() << DocumentSourceTelemetry::kStageName
<< " applyHmacToIdentifiers parameter must be boolean. Found type: "
<< typeName(type),
type == BSONType::Bool);
@@ -74,14 +74,14 @@ boost::optional<std::string> parseHmacKey(const BSONElement& el) {
int len;
auto data = el.binData(len);
uassert(ErrorCodes::FailedToParse,
- str::stream() << DocumentSourceQueryStats::kStageName
+ str::stream() << DocumentSourceTelemetry::kStageName
<< "hmacKey must be greater than or equal to 32 bytes",
len >= 32);
return {{data, (size_t)len}};
}
uasserted(ErrorCodes::FailedToParse,
str::stream()
- << DocumentSourceQueryStats::kStageName
+ << DocumentSourceTelemetry::kStageName
<< " hmacKey parameter must be bindata of length 32 or greater. Found type: "
<< typeName(type));
}
@@ -95,7 +95,7 @@ boost::optional<std::string> parseHmacKey(const BSONElement& el) {
template <typename Ctor>
auto parseSpec(const BSONElement& spec, const Ctor& ctor) {
uassert(ErrorCodes::FailedToParse,
- str::stream() << DocumentSourceQueryStats::kStageName
+ str::stream() << DocumentSourceTelemetry::kStageName
<< " value must be an object. Found: " << typeName(spec.type()),
spec.type() == BSONType::Object);
@@ -110,7 +110,7 @@ auto parseSpec(const BSONElement& spec, const Ctor& ctor) {
} else {
uasserted(ErrorCodes::FailedToParse,
str::stream()
- << DocumentSourceQueryStats::kStageName
+ << DocumentSourceTelemetry::kStageName
<< " parameters object may only contain 'applyHmacToIdentifiers' or "
"'hmacKey' options. Found: "
<< el.fieldName());
@@ -122,34 +122,34 @@ auto parseSpec(const BSONElement& spec, const Ctor& ctor) {
} // namespace
-std::unique_ptr<DocumentSourceQueryStats::LiteParsed> DocumentSourceQueryStats::LiteParsed::parse(
+std::unique_ptr<DocumentSourceTelemetry::LiteParsed> DocumentSourceTelemetry::LiteParsed::parse(
const NamespaceString& nss, const BSONElement& spec) {
return parseSpec(spec, [&](bool applyHmacToIdentifiers, std::string hmacKey) {
- return std::make_unique<DocumentSourceQueryStats::LiteParsed>(
+ return std::make_unique<DocumentSourceTelemetry::LiteParsed>(
spec.fieldName(), applyHmacToIdentifiers, hmacKey);
});
}
-boost::intrusive_ptr<DocumentSource> DocumentSourceQueryStats::createFromBson(
+boost::intrusive_ptr<DocumentSource> DocumentSourceTelemetry::createFromBson(
BSONElement spec, const boost::intrusive_ptr<ExpressionContext>& pExpCtx) {
const NamespaceString& nss = pExpCtx->ns;
uassert(ErrorCodes::InvalidNamespace,
- "$queryStats must be run against the 'admin' database with {aggregate: 1}",
+ "$telemetry must be run against the 'admin' database with {aggregate: 1}",
nss.db() == DatabaseName::kAdmin.db() && nss.isCollectionlessAggregateNS());
return parseSpec(spec, [&](bool applyHmacToIdentifiers, std::string hmacKey) {
- return new DocumentSourceQueryStats(pExpCtx, applyHmacToIdentifiers, hmacKey);
+ return new DocumentSourceTelemetry(pExpCtx, applyHmacToIdentifiers, hmacKey);
});
}
-Value DocumentSourceQueryStats::serialize(SerializationOptions opts) const {
+Value DocumentSourceTelemetry::serialize(SerializationOptions opts) const {
// This document source never contains any user information, so no need for any work when
// applying hmac.
return Value{Document{{kStageName, Document{}}}};
}
-DocumentSource::GetNextResult DocumentSourceQueryStats::doGetNext() {
+DocumentSource::GetNextResult DocumentSourceTelemetry::doGetNext() {
/**
* We maintain nested iterators:
* - Outer one over the set of partitions.
@@ -158,7 +158,7 @@ DocumentSource::GetNextResult DocumentSourceQueryStats::doGetNext() {
* When an inner iterator is present and contains more elements, we can return the next element.
* When the inner iterator is exhausted, we move to the next element in the outer iterator and
* create a new inner iterator. When the outer iterator is exhausted, we have finished iterating
- * over the queryStats store entries.
+ * over the telemetry store entries.
*
* The inner iterator iterates over a materialized container of all entries in the partition.
* This is done to reduce the time under which the partition lock is held.
@@ -172,17 +172,17 @@ DocumentSource::GetNextResult DocumentSourceQueryStats::doGetNext() {
return {std::move(doc)};
}
- QueryStatsStore& _queryStatsStore = getQueryStatsStore(getContext()->opCtx);
+ TelemetryStore& _telemetryStore = getTelemetryStore(getContext()->opCtx);
// Materialized partition is exhausted, move to the next.
_currentPartition++;
- if (_currentPartition >= _queryStatsStore.numPartitions()) {
+ if (_currentPartition >= _telemetryStore.numPartitions()) {
return DocumentSource::GetNextResult::makeEOF();
}
// We only keep the partition (which holds a lock) for the time needed to materialize it to
// a set of Document instances.
- auto&& partition = _queryStatsStore.getPartition(_currentPartition);
+ auto&& partition = _telemetryStore.getPartition(_currentPartition);
// Capture the time at which reading the partition begins to indicate to the caller
// when the snapshot began.
@@ -190,22 +190,22 @@ DocumentSource::GetNextResult DocumentSourceQueryStats::doGetNext() {
Timestamp{Timestamp(Date_t::now().toMillisSinceEpoch() / 1000, 0)};
for (auto&& [key, metrics] : *partition) {
try {
- auto queryStatsKey = metrics->computeQueryStatsKey(
- pExpCtx->opCtx, _applyHmacToIdentifiers, _hmacKey);
- _materializedPartition.push_back({{"key", std::move(queryStatsKey)},
+ auto telemetryKey =
+ metrics->computeTelemetryKey(pExpCtx->opCtx, _applyHmacToIdentifiers, _hmacKey);
+ _materializedPartition.push_back({{"key", std::move(telemetryKey)},
{"metrics", metrics->toBSON()},
{"asOf", partitionReadTime}});
} catch (const DBException& ex) {
- queryStatsHmacApplicationErrors.increment();
+ telemetryHmacApplicationErrors.increment();
LOGV2_DEBUG(7349403,
3,
"Error encountered when applying hmac to query shape, will not publish "
- "queryStats for this entry.",
+ "telemetry for this entry.",
"status"_attr = ex.toStatus(),
"hash"_attr = key);
if (kDebugBuild) {
tasserted(7349401,
- "Was not able to re-parse queryStats key when reading queryStats.");
+ "Was not able to re-parse telemetry key when reading telemetry.");
}
}
}
diff --git a/src/mongo/db/pipeline/document_source_query_stats.h b/src/mongo/db/pipeline/document_source_telemetry.h
index 74d40583a6a..c71bff210ac 100644
--- a/src/mongo/db/pipeline/document_source_query_stats.h
+++ b/src/mongo/db/pipeline/document_source_telemetry.h
@@ -31,16 +31,16 @@
#include "mongo/db/pipeline/document_source.h"
#include "mongo/db/pipeline/lite_parsed_document_source.h"
-#include "mongo/db/query/query_stats.h"
+#include "mongo/db/query/telemetry.h"
#include "mongo/util/producer_consumer_queue.h"
namespace mongo {
-using namespace query_stats;
+using namespace telemetry;
-class DocumentSourceQueryStats final : public DocumentSource {
+class DocumentSourceTelemetry final : public DocumentSource {
public:
- static constexpr StringData kStageName = "$queryStats"_sd;
+ static constexpr StringData kStageName = "$telemetry"_sd;
class LiteParsed final : public LiteParsedDocumentSource {
public:
@@ -58,12 +58,12 @@ public:
PrivilegeVector requiredPrivileges(bool isMongos,
bool bypassDocumentValidation) const override {
- return {Privilege(ResourcePattern::forClusterResource(), ActionType::queryStatsRead)};
+ return {Privilege(ResourcePattern::forClusterResource(), ActionType::telemetryRead)};
;
}
bool allowedToPassthroughFromMongos() const final {
- // $queryStats must be run locally on a mongod.
+ // $telemetry must be run locally on a mongod.
return false;
}
@@ -83,7 +83,7 @@ public:
static boost::intrusive_ptr<DocumentSource> createFromBson(
BSONElement elem, const boost::intrusive_ptr<ExpressionContext>& pExpCtx);
- virtual ~DocumentSourceQueryStats() = default;
+ virtual ~DocumentSourceTelemetry() = default;
StageConstraints constraints(
Pipeline::SplitState = Pipeline::SplitState::kUnsplit) const override {
@@ -114,9 +114,9 @@ public:
void addVariableRefs(std::set<Variables::Id>* refs) const final {}
private:
- DocumentSourceQueryStats(const boost::intrusive_ptr<ExpressionContext>& expCtx,
- bool applyHmacToIdentifiers = false,
- std::string hmacKey = {})
+ DocumentSourceTelemetry(const boost::intrusive_ptr<ExpressionContext>& expCtx,
+ bool applyHmacToIdentifiers = false,
+ std::string hmacKey = {})
: DocumentSource(kStageName, expCtx),
_applyHmacToIdentifiers(applyHmacToIdentifiers),
_hmacKey(hmacKey) {}
@@ -130,10 +130,10 @@ private:
std::deque<Document> _materializedPartition;
/**
- * Iterator over all queryStats partitions. This is incremented when we exhaust the current
+ * Iterator over all telemetry partitions. This is incremented when we exhaust the current
* _materializedPartition.
*/
- QueryStatsStore::PartitionId _currentPartition = -1;
+ TelemetryStore::PartitionId _currentPartition = -1;
// When true, apply hmac to field names from returned query shapes.
bool _applyHmacToIdentifiers;
diff --git a/src/mongo/db/pipeline/document_source_query_stats_test.cpp b/src/mongo/db/pipeline/document_source_telemetry_test.cpp
index 7e29a44d591..d08ce06b98c 100644
--- a/src/mongo/db/pipeline/document_source_query_stats_test.cpp
+++ b/src/mongo/db/pipeline/document_source_telemetry_test.cpp
@@ -32,7 +32,7 @@
#include "mongo/db/exec/document_value/document.h"
#include "mongo/db/exec/document_value/document_value_test_util.h"
#include "mongo/db/pipeline/aggregation_context_fixture.h"
-#include "mongo/db/pipeline/document_source_query_stats.h"
+#include "mongo/db/pipeline/document_source_telemetry.h"
#include "mongo/unittest/unittest.h"
#include "mongo/util/assert_util.h"
#include "mongo/util/str.h"
@@ -45,50 +45,50 @@ namespace {
* {aggregate: 1} by default, so that parsing tests other than those which validate the namespace do
* not need to explicitly set it.
*/
-class DocumentSourceQueryStatsTest : public AggregationContextFixture {
+class DocumentSourceTelemetryTest : public AggregationContextFixture {
public:
- DocumentSourceQueryStatsTest()
+ DocumentSourceTelemetryTest()
: AggregationContextFixture(
NamespaceString::makeCollectionlessAggregateNSS(DatabaseName::kAdmin)) {}
};
-TEST_F(DocumentSourceQueryStatsTest, ShouldFailToParseIfSpecIsNotObject) {
- ASSERT_THROWS_CODE(DocumentSourceQueryStats::createFromBson(
- fromjson("{$queryStats: 1}").firstElement(), getExpCtx()),
+TEST_F(DocumentSourceTelemetryTest, ShouldFailToParseIfSpecIsNotObject) {
+ ASSERT_THROWS_CODE(DocumentSourceTelemetry::createFromBson(
+ fromjson("{$telemetry: 1}").firstElement(), getExpCtx()),
AssertionException,
ErrorCodes::FailedToParse);
}
-TEST_F(DocumentSourceQueryStatsTest, ShouldFailToParseIfNotRunOnAdmin) {
+TEST_F(DocumentSourceTelemetryTest, ShouldFailToParseIfNotRunOnAdmin) {
getExpCtx()->ns = NamespaceString::makeCollectionlessAggregateNSS(
DatabaseName::createDatabaseName_forTest(boost::none, "foo"));
- ASSERT_THROWS_CODE(DocumentSourceQueryStats::createFromBson(
- fromjson("{$queryStats: {}}").firstElement(), getExpCtx()),
+ ASSERT_THROWS_CODE(DocumentSourceTelemetry::createFromBson(
+ fromjson("{$telemetry: {}}").firstElement(), getExpCtx()),
AssertionException,
ErrorCodes::InvalidNamespace);
}
-TEST_F(DocumentSourceQueryStatsTest, ShouldFailToParseIfNotRunWithAggregateOne) {
+TEST_F(DocumentSourceTelemetryTest, ShouldFailToParseIfNotRunWithAggregateOne) {
getExpCtx()->ns = NamespaceString::createNamespaceString_forTest("admin.foo");
- ASSERT_THROWS_CODE(DocumentSourceQueryStats::createFromBson(
- fromjson("{$queryStats: {}}").firstElement(), getExpCtx()),
+ ASSERT_THROWS_CODE(DocumentSourceTelemetry::createFromBson(
+ fromjson("{$telemetry: {}}").firstElement(), getExpCtx()),
AssertionException,
ErrorCodes::InvalidNamespace);
}
-TEST_F(DocumentSourceQueryStatsTest, ShouldFailToParseIfUnrecognisedParameterSpecified) {
- ASSERT_THROWS_CODE(DocumentSourceQueryStats::createFromBson(
- fromjson("{$queryStats: {foo: true}}").firstElement(), getExpCtx()),
+TEST_F(DocumentSourceTelemetryTest, ShouldFailToParseIfUnrecognisedParameterSpecified) {
+ ASSERT_THROWS_CODE(DocumentSourceTelemetry::createFromBson(
+ fromjson("{$telemetry: {foo: true}}").firstElement(), getExpCtx()),
AssertionException,
ErrorCodes::FailedToParse);
}
-TEST_F(DocumentSourceQueryStatsTest, ParseAndSerialize) {
- auto obj = fromjson("{$queryStats: {}}");
- auto doc = DocumentSourceQueryStats::createFromBson(obj.firstElement(), getExpCtx());
- auto queryStatsOp = static_cast<DocumentSourceQueryStats*>(doc.get());
- auto expected = Document{{"$queryStats", Document{}}};
- ASSERT_DOCUMENT_EQ(queryStatsOp->serialize().getDocument(), expected);
+TEST_F(DocumentSourceTelemetryTest, ParseAndSerialize) {
+ auto obj = fromjson("{$telemetry: {}}");
+ auto doc = DocumentSourceTelemetry::createFromBson(obj.firstElement(), getExpCtx());
+ auto telemetryOp = static_cast<DocumentSourceTelemetry*>(doc.get());
+ auto expected = Document{{"$telemetry", Document{}}};
+ ASSERT_DOCUMENT_EQ(telemetryOp->serialize().getDocument(), expected);
}
} // namespace
diff --git a/src/mongo/db/pipeline/visitors/document_source_visitor_registry_mongod.h b/src/mongo/db/pipeline/visitors/document_source_visitor_registry_mongod.h
index 32ec042f6dc..24d11c814be 100644
--- a/src/mongo/db/pipeline/visitors/document_source_visitor_registry_mongod.h
+++ b/src/mongo/db/pipeline/visitors/document_source_visitor_registry_mongod.h
@@ -70,7 +70,6 @@
#include "mongo/db/pipeline/document_source_operation_metrics.h"
#include "mongo/db/pipeline/document_source_out.h"
#include "mongo/db/pipeline/document_source_plan_cache_stats.h"
-#include "mongo/db/pipeline/document_source_query_stats.h"
#include "mongo/db/pipeline/document_source_queue.h"
#include "mongo/db/pipeline/document_source_redact.h"
#include "mongo/db/pipeline/document_source_replace_root.h"
@@ -84,6 +83,7 @@
#include "mongo/db/pipeline/document_source_sort.h"
#include "mongo/db/pipeline/document_source_streaming_group.h"
#include "mongo/db/pipeline/document_source_tee_consumer.h"
+#include "mongo/db/pipeline/document_source_telemetry.h"
#include "mongo/db/pipeline/document_source_union_with.h"
#include "mongo/db/pipeline/document_source_unwind.h"
#include "mongo/db/pipeline/visitors/document_source_visitor_registry.h"
@@ -169,7 +169,7 @@ void registerMongodVisitor(ServiceContext* service) {
DocumentSourceSort,
DocumentSourceStreamingGroup,
DocumentSourceTeeConsumer,
- DocumentSourceQueryStats,
+ DocumentSourceTelemetry,
DocumentSourceUnionWith,
DocumentSourceUnwind>(&registry);
}