Skip to content

Commit 1750f4a

Browse files
Liubov Dmitrievafacebook-github-bot
authored andcommitted
traffic attribution: log fetch cause to the blobstore as well
Summary: log fetch cause to the blobstore as well Reviewed By: lmvasquezg Differential Revision: D72170849 fbshipit-source-id: 39491bfa48949fda5e5c719f34f52b30e8411f8f
1 parent ad21457 commit 1750f4a

File tree

2 files changed

+8
-0
lines changed
  • eden/mononoke

2 files changed

+8
-0
lines changed

eden/mononoke/blobstore/multiplexedblob/src/scuba.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,9 @@ fn record_scuba_common(
4848
if let Some(client_info) = ctx.client_request_info() {
4949
scuba.add_client_request_info(client_info);
5050
}
51+
if let Some(fetch_cause) = ctx.metadata().fetch_cause() {
52+
scuba.add_fetch_cause(fetch_cause);
53+
}
5154
}
5255

5356
pub fn record_put<T>(

eden/mononoke/common/scuba_ext/src/lib.rs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -194,6 +194,11 @@ impl MononokeScubaSampleBuilder {
194194
self
195195
}
196196

197+
pub fn add_fetch_cause(&mut self, fetch_cause: &str) -> &mut Self {
198+
self.inner.add("fetch_cause", fetch_cause);
199+
self
200+
}
201+
197202
pub fn sample_for_identities(&mut self, identities: &impl MononokeIdentitySetExt) {
198203
// Details of quicksand traffic aren't particularly interesting because all Quicksand tasks are
199204
// doing effectively the same thing at the same time. If we need real-time debugging, we can

0 commit comments

Comments
 (0)