Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/verify-proto-files.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ on:
pull_request:
types: [ opened, synchronize, reopened ]
env:
DATADOG_AGENT_TAG: "7f6d07c93ba087f23f80a3f0c2da4b1f3dc664d7"
DATADOG_AGENT_TAG: "bdcdd8cf1ba4090a29b96d5669cfab5dd81814b1"
rust_version: "1.84.1"
CARGO_TERM_COLOR: always
CARGO_INCREMENTAL: 0
Expand Down
5 changes: 5 additions & 0 deletions libdd-trace-protobuf/build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -176,6 +176,11 @@ fn generate_protobuf() {
"ClientGroupedStats.HTTP_endpoint",
"#[serde(default)] #[serde(rename = \"HTTPEndpoint\")]",
);
config.field_attribute("ClientGroupedStats.service_source", "#[serde(default)]");
config.field_attribute(
"ClientGroupedStats.span_derived_primary_tags",
"#[serde(default)]",
);

config.field_attribute(
"ClientGroupedStats.okSummary",
Expand Down
12 changes: 12 additions & 0 deletions libdd-trace-protobuf/src/pb.rs
Original file line number Diff line number Diff line change
Expand Up @@ -646,6 +646,18 @@ pub struct ClientGroupedStats {
#[serde(default)]
#[serde(rename = "HTTPEndpoint")]
pub http_endpoint: ::prost::alloc::string::String,
/// @inject_tag: msg:"srv_src"
#[prost(string, tag = "21")]
#[serde(default)]
pub service_source: ::prost::alloc::string::String,
/// used to identify service override origin
/// span_derived_primary_tags are user-configured tags that are extracted from spans and used for stats aggregation
/// E.g., `aws.s3.bucket`, `http.url`, or any custom tag
#[prost(string, repeated, tag = "22")]
#[serde(default)]
pub span_derived_primary_tags: ::prost::alloc::vec::Vec<
::prost::alloc::string::String,
>,
}
/// Trilean is an expanded boolean type that is meant to differentiate between being unset and false.
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
Expand Down
5 changes: 5 additions & 0 deletions libdd-trace-protobuf/src/pb/stats.proto
Original file line number Diff line number Diff line change
Expand Up @@ -103,4 +103,9 @@ message ClientGroupedStats {
string GRPC_status_code = 18;
string HTTP_method = 19; // HTTP method of the request
string HTTP_endpoint = 20; // Http route or quantized/simplified URL path
string service_source = 21; // @inject_tag: msg:"srv_src"
// used to identify service override origin
// span_derived_primary_tags are user-configured tags that are extracted from spans and used for stats aggregation
// E.g., `aws.s3.bucket`, `http.url`, or any custom tag
repeated string span_derived_primary_tags = 22;
}
2 changes: 2 additions & 0 deletions libdd-trace-protobuf/src/pb_test.rs
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,8 @@ mod tests {
grpc_status_code: "0".to_string(),
http_endpoint: "/test".to_string(),
http_method: "GET".to_string(),
service_source: "".to_string(),
span_derived_primary_tags: vec![],
}],
agent_time_shift: 0,
}],
Expand Down
4 changes: 3 additions & 1 deletion libdd-trace-stats/src/span_concentrator/aggregation.rs
Original file line number Diff line number Diff line change
Expand Up @@ -295,7 +295,9 @@ fn encode_grouped_stats(key: OwnedAggregationKey, group: GroupedStats) -> pb::Cl
},
http_method: key.http_method,
http_endpoint: key.http_endpoint,
grpc_status_code: String::new(), // currently not used
grpc_status_code: String::new(), // currently not used
service_source: String::new(), // set by the agent
span_derived_primary_tags: vec![], // set by the agent
}
}

Expand Down
2 changes: 2 additions & 0 deletions libdd-trace-utils/src/stats_utils.rs
Original file line number Diff line number Diff line change
Expand Up @@ -209,6 +209,8 @@ mod mini_agent_tests {
grpc_status_code: "0".to_string(),
http_endpoint: "/test".to_string(),
http_method: "GET".to_string(),
service_source: "".to_string(),
span_derived_primary_tags: vec![],
}],
agent_time_shift: 0,
}],
Expand Down
Loading