summaryrefslogtreecommitdiff
path: root/jstests/libs/telemetry_utils.js
diff options
context:
space:
mode:
authorTed Tuckman <ted.tuckman@mongodb.com>2023-05-03 13:36:39 +0000
committerEvergreen Agent <no-reply@evergreen.mongodb.com>2023-05-03 14:38:45 +0000
commit8e79f414b58d1ca97027312cd721dfecb636ce69 (patch)
tree0ab65b51b07a51277a1a3a58ca1c943f564ff030 /jstests/libs/telemetry_utils.js
parent280c055694d28c5eb8a88f9f676a92c67dc2f72f (diff)
downloadmongo-8e79f414b58d1ca97027312cd721dfecb636ce69.tar.gz
SERVER-76424 Replace 'redact' with 'hmac' in $telemetry syntax
Diffstat (limited to 'jstests/libs/telemetry_utils.js')
-rw-r--r--jstests/libs/telemetry_utils.js10
1 files changed, 5 insertions, 5 deletions
diff --git a/jstests/libs/telemetry_utils.js b/jstests/libs/telemetry_utils.js
index 67180a0b2da..5b7b1d32e5b 100644
--- a/jstests/libs/telemetry_utils.js
+++ b/jstests/libs/telemetry_utils.js
@@ -58,22 +58,22 @@ function getTelemetry(conn) {
function getTelemetryRedacted(
conn,
- redactIdentifiers = true,
- redactionKey = BinData(0, "MjM0NTY3ODkxMDExMTIxMzE0MTUxNjE3MTgxOTIwMjE=")) {
- // Hashed application name is generated using the default redactionKey argument.
+ applyHmacToIdentifiers = true,
+ hmacKey = BinData(0, "MjM0NTY3ODkxMDExMTIxMzE0MTUxNjE3MTgxOTIwMjE=")) {
+ // Hashed application name is generated using the default hmacKey argument.
const kApplicationName = "T1iwlAqhXYroi7HTycmBJvWZSETwKXnaNa5akM4q0H4=";
// Filter out agg queries, including $telemetry.
const match = {
$match: {"key.queryShape.find": {$exists: true}, "key.applicationName": kApplicationName}
};
- if (!redactIdentifiers) {
+ if (!applyHmacToIdentifiers) {
match.$match["key.applicationName"] = "MongoDB Shell";
}
const result = conn.adminCommand({
aggregate: 1,
pipeline: [
- {$telemetry: {redactIdentifiers: redactIdentifiers, redactionKey: redactionKey}},
+ {$telemetry: {applyHmacToIdentifiers: applyHmacToIdentifiers, hmacKey: hmacKey}},
match,
// Sort on telemetry key so entries are in a deterministic order.
{$sort: {key: 1}},