Skip to content

Commit 7f51d4d

Browse files
committed
default searialization for the values
1 parent 49c88ea commit 7f51d4d

File tree

2 files changed

+6
-0
lines changed

2 files changed

+6
-0
lines changed

opentelemetry-proto/src/proto/tonic/opentelemetry.proto.logs.v1.rs

+3
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@ pub struct LogsData {
2727
#[cfg_attr(feature = "with-schemars", derive(schemars::JsonSchema))]
2828
#[cfg_attr(feature = "with-serde", derive(serde::Serialize, serde::Deserialize))]
2929
#[cfg_attr(feature = "with-serde", serde(rename_all = "camelCase"))]
30+
#[cfg_attr(feature = "with-serde", serde(default))]
3031
#[allow(clippy::derive_partial_eq_without_eq)]
3132
#[derive(Clone, PartialEq, ::prost::Message)]
3233
pub struct ResourceLogs {
@@ -49,6 +50,7 @@ pub struct ResourceLogs {
4950
#[cfg_attr(feature = "with-schemars", derive(schemars::JsonSchema))]
5051
#[cfg_attr(feature = "with-serde", derive(serde::Serialize, serde::Deserialize))]
5152
#[cfg_attr(feature = "with-serde", serde(rename_all = "camelCase"))]
53+
#[cfg_attr(feature = "with-serde", serde(default))]
5254
#[allow(clippy::derive_partial_eq_without_eq)]
5355
#[derive(Clone, PartialEq, ::prost::Message)]
5456
pub struct ScopeLogs {
@@ -72,6 +74,7 @@ pub struct ScopeLogs {
7274
#[cfg_attr(feature = "with-schemars", derive(schemars::JsonSchema))]
7375
#[cfg_attr(feature = "with-serde", derive(serde::Serialize, serde::Deserialize))]
7476
#[cfg_attr(feature = "with-serde", serde(rename_all = "camelCase"))]
77+
#[cfg_attr(feature = "with-serde", serde(default))]
7578
#[allow(clippy::derive_partial_eq_without_eq)]
7679
#[derive(Clone, PartialEq, ::prost::Message)]
7780
pub struct LogRecord {

opentelemetry-proto/tests/grpc_build.rs

+3
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,9 @@ fn build_tonic() {
5353
"resource.v1.Resource",
5454
"trace.v1.Span.Event",
5555
"trace.v1.Status",
56+
"logs.v1.LogRecord",
57+
"logs.v1.ScopeLogs",
58+
"logs.v1.ResourceLogs",
5659
] {
5760
builder = builder.type_attribute(
5861
path,

0 commit comments

Comments
 (0)