Skip to content

Commit

Permalink
add Cluster, region and datacenter to rust tracing scuba
Browse files Browse the repository at this point in the history
Summary:
**NOTE**: Please reviewers not sure if adding those fields here is proper. Per what I understand this will not impact `with_common_fields` function. Not sure if I should also add this to this other [builder](https://www.internalfb.com/code/fbsource/[370994e07362]/fbcode/common/rust/scuba/src/builder.rs?lines=182)

This diffs adds Cluster, Region and Datacenter to the possible common fields to log

Note those fields are part of the TW job handle, but sometimes we want to log them individually.

Reviewed By: emersonford

Differential Revision: D50523275

fbshipit-source-id: 2eab3111aab6dfd2bb346772219204ac5461aedd
  • Loading branch information
Oriol Batalla authored and facebook-github-bot committed Oct 23, 2023
1 parent 28445e5 commit 4ceb2f6
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions shed/scuba_sample/src/builder.rs
Original file line number Diff line number Diff line change
Expand Up @@ -264,10 +264,16 @@ pub enum ServerData {
Hostname,
/// Hostname scheme of the server
HostnameScheme,
/// Datacenter Region
Region,
/// Datacenter prefix
Datacenter,
/// Tier of the service
Tier,
/// Tupperware TaskId of the service
TaskId,
/// Tupperware cluster name
Cluster,
/// Tupperware CanaryId of the service
CanaryId,
/// Tupperware JobHandle of the service
Expand All @@ -294,7 +300,10 @@ impl ServerData {
match self {
ServerData::Hostname => "server_hostname",
ServerData::HostnameScheme => "server_hostname_scheme",
ServerData::Region => "region",
ServerData::Datacenter => "datacenter",
ServerData::Tier => "server_tier",
ServerData::Cluster => "tw_cluster",
ServerData::TaskId => "tw_task_id",
ServerData::CanaryId => "tw_canary_id",
ServerData::JobHandle => "tw_handle",
Expand Down

0 comments on commit 4ceb2f6

Please sign in to comment.