Skip to content

Commit 992baa9

Browse files
committed
update protobufs
1 parent ba0cc18 commit 992baa9

14 files changed

Lines changed: 111 additions & 2 deletions

File tree

.github/workflows/verify-proto-files.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ on:
33
pull_request:
44
types: [ opened, synchronize, reopened ]
55
env:
6-
DATADOG_AGENT_TAG: "bdcdd8cf1ba4090a29b96d5669cfab5dd81814b1"
6+
DATADOG_AGENT_TAG: "fdc29d4428db855950228a642c43a5595e56bb09"
77
CARGO_TERM_COLOR: always
88
CARGO_INCREMENTAL: 0
99
jobs:

datadog-ipc/src/shm_stats.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -818,6 +818,7 @@ impl ShmSpanConcentrator {
818818
.unwrap_or_default(),
819819
service_source: read_str!(f.service_source),
820820
span_derived_primary_tags: vec![],
821+
additional_metric_tags: vec![],
821822
}
822823
}
823824
}

libdd-trace-protobuf/build.rs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,7 @@ fn generate_protobuf() {
5656
// intake expects the name ContainerID rather than the PascalCase ContainerId
5757

5858
config.type_attribute("TracerPayload", "#[derive(Deserialize, Serialize)]");
59+
config.type_attribute("ContainerDebug", "#[derive(Deserialize, Serialize)]");
5960
config.type_attribute("TraceChunk", "#[derive(Deserialize, Serialize)]");
6061

6162
config.type_attribute("SpanLink", "#[derive(Deserialize, Serialize)]");
@@ -216,6 +217,10 @@ fn generate_protobuf() {
216217
"ClientGroupedStats.span_derived_primary_tags",
217218
"#[serde(default)]",
218219
);
220+
config.field_attribute(
221+
"ClientGroupedStats.additional_metric_tags",
222+
"#[serde(default)]",
223+
);
219224

220225
config.field_attribute(
221226
"ClientGroupedStats.okSummary",

libdd-trace-protobuf/src/pb.idx.rs

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -276,4 +276,27 @@ pub struct TracerPayload {
276276
/// chunks specifies list of containing trace chunks.
277277
#[prost(message, repeated, tag = "11")]
278278
pub chunks: ::prost::alloc::vec::Vec<TraceChunk>,
279+
/// containerDebug holds debug information about the container tags resolution.
280+
#[prost(message, optional, tag = "12")]
281+
pub container_debug: ::core::option::Option<ContainerDebug>,
282+
}
283+
/// ContainerDebug holds debug information about the container tags resolution process.
284+
#[derive(Deserialize, Serialize)]
285+
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
286+
pub struct ContainerDebug {
287+
/// error specifies any error that occurred during container tag resolution.
288+
#[prost(string, tag = "1")]
289+
pub error: ::prost::alloc::string::String,
290+
/// latencyMs specifies the latency in milliseconds of the container tag resolution.
291+
#[prost(int64, tag = "2")]
292+
pub latency_ms: i64,
293+
/// wasBuffered specifies whether the payload was buffered while waiting for container tags.
294+
#[prost(bool, tag = "3")]
295+
pub was_buffered: bool,
296+
/// bufferMs specifies how long the payload was buffered in milliseconds.
297+
#[prost(int64, tag = "4")]
298+
pub buffer_ms: i64,
299+
/// bufferEvictionReason specifies why the payload was evicted from the buffer.
300+
#[prost(string, tag = "5")]
301+
pub buffer_eviction_reason: ::prost::alloc::string::String,
279302
}

libdd-trace-protobuf/src/pb.rs

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -426,6 +426,35 @@ pub struct TracerPayload {
426426
/// @gotags: json:"app_version" msg:"app_version"
427427
#[prost(string, tag = "10")]
428428
pub app_version: ::prost::alloc::string::String,
429+
/// containerDebug holds debug information about the container tags resolution.
430+
/// @gotags: json:"container_debug,omitempty" msg:"container_debug,omitempty"
431+
#[prost(message, optional, tag = "11")]
432+
pub container_debug: ::core::option::Option<ContainerDebug>,
433+
}
434+
/// ContainerDebug holds debug information about the container tags resolution process.
435+
#[derive(Deserialize, Serialize)]
436+
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
437+
pub struct ContainerDebug {
438+
/// error specifies any error that occurred during container tag resolution.
439+
/// @gotags: json:"error,omitempty" msg:"error,omitempty"
440+
#[prost(string, tag = "1")]
441+
pub error: ::prost::alloc::string::String,
442+
/// latencyMs specifies the latency in milliseconds of the container tag resolution.
443+
/// @gotags: json:"latency_ms,omitempty" msg:"latency_ms,omitempty"
444+
#[prost(int64, tag = "2")]
445+
pub latency_ms: i64,
446+
/// wasBuffered specifies whether the payload was buffered while waiting for container tags.
447+
/// @gotags: json:"was_buffered,omitempty" msg:"was_buffered,omitempty"
448+
#[prost(bool, tag = "3")]
449+
pub was_buffered: bool,
450+
/// bufferMs specifies how long the payload was buffered in milliseconds.
451+
/// @gotags: json:"buffer_ms,omitempty" msg:"buffer_ms,omitempty"
452+
#[prost(int64, tag = "4")]
453+
pub buffer_ms: i64,
454+
/// bufferEvictionReason specifies why the payload was evicted from the buffer.
455+
/// @gotags: json:"buffer_eviction_reason,omitempty" msg:"buffer_eviction_reason,omitempty"
456+
#[prost(string, tag = "5")]
457+
pub buffer_eviction_reason: ::prost::alloc::string::String,
429458
}
430459
/// AgentPayload represents payload the agent sends to the intake.
431460
#[derive(Clone, PartialEq, ::prost::Message)]
@@ -666,6 +695,10 @@ pub struct ClientGroupedStats {
666695
pub span_derived_primary_tags: ::prost::alloc::vec::Vec<
667696
::prost::alloc::string::String,
668697
>,
698+
/// additional_metric_tags are tags sent by tracers to be used as additional dimensions for stats aggregation
699+
#[prost(string, repeated, tag = "23")]
700+
#[serde(default)]
701+
pub additional_metric_tags: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
669702
}
670703
/// Trilean is an expanded boolean type that is meant to differentiate between being unset and false.
671704
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]

libdd-trace-protobuf/src/pb/idx/tracer_payload.proto

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,4 +48,20 @@ message TracerPayload {
4848
map<uint32, AnyValue> attributes = 10;
4949
// chunks specifies list of containing trace chunks.
5050
repeated TraceChunk chunks = 11;
51+
// containerDebug holds debug information about the container tags resolution.
52+
ContainerDebug containerDebug = 12;
53+
}
54+
55+
// ContainerDebug holds debug information about the container tags resolution process.
56+
message ContainerDebug {
57+
// error specifies any error that occurred during container tag resolution.
58+
string error = 1;
59+
// latencyMs specifies the latency in milliseconds of the container tag resolution.
60+
int64 latencyMs = 2;
61+
// wasBuffered specifies whether the payload was buffered while waiting for container tags.
62+
bool wasBuffered = 3;
63+
// bufferMs specifies how long the payload was buffered in milliseconds.
64+
int64 bufferMs = 4;
65+
// bufferEvictionReason specifies why the payload was evicted from the buffer.
66+
string bufferEvictionReason = 5;
5167
}

libdd-trace-protobuf/src/pb/stats.proto

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -108,4 +108,6 @@ message ClientGroupedStats {
108108
// span_derived_primary_tags are user-configured tags that are extracted from spans and used for stats aggregation
109109
// E.g., `aws.s3.bucket`, `http.url`, or any custom tag
110110
repeated string span_derived_primary_tags = 22;
111+
// additional_metric_tags are tags sent by tracers to be used as additional dimensions for stats aggregation
112+
repeated string additional_metric_tags = 23;
111113
}

libdd-trace-protobuf/src/pb/tracer_payload.proto

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,4 +57,26 @@ message TracerPayload {
5757
// version specifies `version` tag that set with the tracer.
5858
// @gotags: json:"app_version" msg:"app_version"
5959
string appVersion = 10;
60+
// containerDebug holds debug information about the container tags resolution.
61+
// @gotags: json:"container_debug,omitempty" msg:"container_debug,omitempty"
62+
ContainerDebug containerDebug = 11;
63+
}
64+
65+
// ContainerDebug holds debug information about the container tags resolution process.
66+
message ContainerDebug {
67+
// error specifies any error that occurred during container tag resolution.
68+
// @gotags: json:"error,omitempty" msg:"error,omitempty"
69+
string error = 1;
70+
// latencyMs specifies the latency in milliseconds of the container tag resolution.
71+
// @gotags: json:"latency_ms,omitempty" msg:"latency_ms,omitempty"
72+
int64 latencyMs = 2;
73+
// wasBuffered specifies whether the payload was buffered while waiting for container tags.
74+
// @gotags: json:"was_buffered,omitempty" msg:"was_buffered,omitempty"
75+
bool wasBuffered = 3;
76+
// bufferMs specifies how long the payload was buffered in milliseconds.
77+
// @gotags: json:"buffer_ms,omitempty" msg:"buffer_ms,omitempty"
78+
int64 bufferMs = 4;
79+
// bufferEvictionReason specifies why the payload was evicted from the buffer.
80+
// @gotags: json:"buffer_eviction_reason,omitempty" msg:"buffer_eviction_reason,omitempty"
81+
string bufferEvictionReason = 5;
6082
}

libdd-trace-protobuf/src/pb_test.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -114,6 +114,7 @@ mod tests {
114114
http_method: "GET".to_string(),
115115
service_source: "".to_string(),
116116
span_derived_primary_tags: vec![],
117+
additional_metric_tags: vec![],
117118
}],
118119
agent_time_shift: 0,
119120
}],

libdd-trace-stats/src/span_concentrator/aggregation.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -499,7 +499,8 @@ fn encode_grouped_stats(key: OwnedAggregationKey, group: GroupedStats) -> pb::Cl
499499
.map(|c| c.to_string())
500500
.unwrap_or_default(),
501501
service_source: f.service_source,
502-
span_derived_primary_tags: vec![], // Todo
502+
span_derived_primary_tags: vec![],
503+
additional_metric_tags: vec![],
503504
}
504505
}
505506

0 commit comments

Comments
 (0)