Skip to content

Commit 9ac914b

Browse files
Liubov Dmitrievafacebook-github-bot
authored andcommitted
traffic attribution: log SandcastleNonce for edenapi
Summary: log SandcastleNonce for edenapi Somehow it was missing and was only being logged for wireproto https://fburl.com/scuba/mononoke_test_perf/m1yatee0 edenapi is missing: https://fburl.com/scuba/mononoke_test_perf/6jabiv5y This is because we need to pick selectively the fields that we log. It is also logged for LFS, so we should log for edenapi as well. Reviewed By: clara-9 Differential Revision: D72171873 fbshipit-source-id: 75fb26865c644155ec7fd4affd680d820e44d8e0
1 parent 3e56c01 commit 9ac914b

File tree

1 file changed

+6
-0
lines changed
  • eden/mononoke/gotham_ext/src/middleware

1 file changed

+6
-0
lines changed

eden/mononoke/gotham_ext/src/middleware/scuba.rs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,8 @@ pub enum HttpScubaKey {
7373
ClientIdentities,
7474
/// Alias of the sandcastle job, if any.
7575
SandcastleAlias,
76+
/// Nonce of the sandcastle job, if any.
77+
SandcastleNonce,
7678
/// VCS type of the sandcastle job, if any.
7779
SandcastleVCS,
7880
/// A unique ID identifying this request.
@@ -122,6 +124,7 @@ impl AsRef<str> for HttpScubaKey {
122124
ClientIp => "client_ip",
123125
ClientIdentities => "client_identities",
124126
SandcastleAlias => "sandcastle_alias",
127+
SandcastleNonce => "sandcastle_nonce",
125128
SandcastleVCS => "sandcastle_vcs",
126129
RequestId => "request_id",
127130
HeadersDurationMs => "headers_duration_ms",
@@ -313,6 +316,9 @@ fn populate_scuba(scuba: &mut MononokeScubaSampleBuilder, state: &mut State) {
313316
let sandcastle_alias = metadata.sandcastle_alias();
314317
scuba.add(HttpScubaKey::SandcastleAlias, sandcastle_alias);
315318

319+
let sandcastle_nonce = metadata.sandcastle_nonce();
320+
scuba.add(HttpScubaKey::SandcastleNonce, sandcastle_nonce);
321+
316322
let sandcastle_vcs = metadata.sandcastle_vcs();
317323
scuba.add(HttpScubaKey::SandcastleVCS, sandcastle_vcs);
318324

0 commit comments

Comments
 (0)