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
6 changes: 3 additions & 3 deletions .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: "fdc29d4428db855950228a642c43a5595e56bb09"
DATADOG_AGENT_TAG: "14f65ca3802739e69ea2951a60c87814c21f7161"
CARGO_TERM_COLOR: always
CARGO_INCREMENTAL: 0
jobs:
Expand Down Expand Up @@ -54,8 +54,8 @@ jobs:
with:
cache-targets: true # cache build artifacts
cache-bin: true # cache the ~/.cargo/bin directory
- name: diff pb.rs
- name: diff generated protobuf files
working-directory: libdd-trace-protobuf
run: |
cargo build --features generate-protobuf
git diff --exit-code -- src/pb.rs
git diff --exit-code -- src/pb.rs src/pb.idx.rs
14 changes: 14 additions & 0 deletions .github/workflows/weekly-verify-proto-files.yml
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,20 @@ jobs:
run: |
../../../.github/workflows/diff-proto-files.sh --file span.proto --tag ${{ env.DATADOG_AGENT_TAG }}

- name: diff idx/tracer_payload.proto
working-directory: libdd-trace-protobuf/src/pb
id: idx_tracer_payload_proto
if: always()
run: |
../../../.github/workflows/diff-proto-files.sh --file idx/tracer_payload.proto --tag ${{ env.DATADOG_AGENT_TAG }}

- name: diff idx/span.proto
working-directory: libdd-trace-protobuf/src/pb
id: idx_span_proto
if: always()
run: |
../../../.github/workflows/diff-proto-files.sh --file idx/span.proto --tag ${{ env.DATADOG_AGENT_TAG }}

- name: report failure
id: slack
if: failure()
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 @@ -65,10 +65,15 @@ fn generate_protobuf() {
"#[derive(Deserialize, Serialize, PartialOrd, Ord)]",
);
config.field_attribute("ContainerDebug.error", "#[serde(default)]");
config.field_attribute("ContainerDebug.errorRef", "#[serde(default)]");
config.field_attribute("ContainerDebug.latencyMs", "#[serde(default)]");
config.field_attribute("ContainerDebug.wasBuffered", "#[serde(default)]");
config.field_attribute("ContainerDebug.bufferMs", "#[serde(default)]");
config.field_attribute("ContainerDebug.bufferEvictionReason", "#[serde(default)]");
config.field_attribute(
"ContainerDebug.bufferEvictionReasonRef",
"#[serde(default)]",
);
config.type_attribute("TraceChunk", "#[derive(Deserialize, Serialize)]");

config.type_attribute("SpanLink", "#[derive(Deserialize, Serialize)]");
Expand Down
14 changes: 7 additions & 7 deletions libdd-trace-protobuf/src/pb.idx.rs
Original file line number Diff line number Diff line change
Expand Up @@ -282,12 +282,12 @@ pub struct TracerPayload {
}
/// ContainerDebug holds debug information about the container tags resolution process.
#[derive(Deserialize, Serialize, PartialOrd, Ord)]
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
pub struct ContainerDebug {
/// error specifies any error that occurred during container tag resolution.
#[prost(string, tag = "1")]
/// errorRef specifies the string table ref of any error that occurred during container tag resolution.
#[prost(uint32, tag = "1")]
#[serde(default)]
pub error: ::prost::alloc::string::String,
pub error_ref: u32,
/// latencyMs specifies the latency in milliseconds of the container tag resolution.
#[prost(int64, tag = "2")]
#[serde(default)]
Expand All @@ -300,8 +300,8 @@ pub struct ContainerDebug {
#[prost(int64, tag = "4")]
#[serde(default)]
pub buffer_ms: i64,
/// bufferEvictionReason specifies why the payload was evicted from the buffer.
#[prost(string, tag = "5")]
/// bufferEvictionReasonRef specifies the string table ref of why the payload was evicted from the buffer.
#[prost(uint32, tag = "5")]
#[serde(default)]
pub buffer_eviction_reason: ::prost::alloc::string::String,
pub buffer_eviction_reason_ref: u32,
}
5 changes: 4 additions & 1 deletion libdd-trace-protobuf/src/pb.rs
Original file line number Diff line number Diff line change
Expand Up @@ -327,7 +327,10 @@ pub struct Span {
#[serde(deserialize_with = "crate::deserializers::deserialize_null_into_default")]
pub r#type: ::prost::alloc::string::String,
/// meta_struct is a registry of structured "other" data used by, e.g., AppSec.
/// @gotags: json:"meta_struct,omitempty" msg:"meta_struct,omitempty"
/// Entries can legitimately be much larger than other span fields, so this
/// field overrides the package-wide messagepack allocation limit with a 10MiB
/// cap (see the //msgp:limit directives in pkg/proto/pbgo/trace).
/// @gotags: json:"meta_struct,omitempty" msg:"meta_struct,omitempty,limit=10485760"
#[prost(map = "string, bytes", tag = "13")]
#[serde(default)]
#[serde(deserialize_with = "crate::deserializers::deserialize_null_into_default")]
Expand Down
8 changes: 4 additions & 4 deletions libdd-trace-protobuf/src/pb/idx/tracer_payload.proto
Original file line number Diff line number Diff line change
Expand Up @@ -54,14 +54,14 @@ message TracerPayload {

// ContainerDebug holds debug information about the container tags resolution process.
message ContainerDebug {
// error specifies any error that occurred during container tag resolution.
string error = 1;
// errorRef specifies the string table ref of any error that occurred during container tag resolution.
uint32 errorRef = 1;
// latencyMs specifies the latency in milliseconds of the container tag resolution.
int64 latencyMs = 2;
// wasBuffered specifies whether the payload was buffered while waiting for container tags.
bool wasBuffered = 3;
// bufferMs specifies how long the payload was buffered in milliseconds.
int64 bufferMs = 4;
// bufferEvictionReason specifies why the payload was evicted from the buffer.
string bufferEvictionReason = 5;
// bufferEvictionReasonRef specifies the string table ref of why the payload was evicted from the buffer.
uint32 bufferEvictionReasonRef = 5;
}
5 changes: 4 additions & 1 deletion libdd-trace-protobuf/src/pb/span.proto
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,10 @@ message Span {
// @gotags: json:"type" msg:"type"
string type = 12;
// meta_struct is a registry of structured "other" data used by, e.g., AppSec.
// @gotags: json:"meta_struct,omitempty" msg:"meta_struct,omitempty"
// Entries can legitimately be much larger than other span fields, so this
// field overrides the package-wide messagepack allocation limit with a 10MiB
// cap (see the //msgp:limit directives in pkg/proto/pbgo/trace).
// @gotags: json:"meta_struct,omitempty" msg:"meta_struct,omitempty,limit=10485760"
Comment thread
Aaalibaba42 marked this conversation as resolved.
map<string, bytes> meta_struct = 13;
// span_links represents a collection of links, where each link defines a causal relationship between two spans.
// @gotags: json:"span_links,omitempty" msg:"span_links,omitempty"
Expand Down
Loading