diff --git a/opentelemetry-proto/CHANGELOG.md b/opentelemetry-proto/CHANGELOG.md index 0d8d14866b..3fc9721c5c 100644 --- a/opentelemetry-proto/CHANGELOG.md +++ b/opentelemetry-proto/CHANGELOG.md @@ -4,6 +4,8 @@ - Update proto definitions to v1.4.0 [#2315](https://github.com/open-telemetry/opentelemetry-rust/pull/2315) - Bump msrv to 1.75.0. +- Update proto definitions to v1.5.0 [#2439](https://github.com/open-telemetry/opentelemetry-rust/pull/2439) + ## 0.27.0 diff --git a/opentelemetry-proto/src/proto/opentelemetry-proto b/opentelemetry-proto/src/proto/opentelemetry-proto index 0adf6aac00..2bd940b2b7 160000 --- a/opentelemetry-proto/src/proto/opentelemetry-proto +++ b/opentelemetry-proto/src/proto/opentelemetry-proto @@ -1 +1 @@ -Subproject commit 0adf6aac004578b28267394514b2e55ee9cc012f +Subproject commit 2bd940b2b77c1ab57c27166af21384906da7bb2b diff --git a/opentelemetry-proto/src/proto/tonic/opentelemetry.proto.logs.v1.rs b/opentelemetry-proto/src/proto/tonic/opentelemetry.proto.logs.v1.rs index 0eb691fb3a..04f1c6dad4 100644 --- a/opentelemetry-proto/src/proto/tonic/opentelemetry.proto.logs.v1.rs +++ b/opentelemetry-proto/src/proto/tonic/opentelemetry.proto.logs.v1.rs @@ -37,7 +37,8 @@ pub struct ResourceLogs { #[prost(message, repeated, tag = "2")] pub scope_logs: ::prost::alloc::vec::Vec, /// The Schema URL, if known. This is the identifier of the Schema that the resource data - /// is recorded in. To learn more about Schema URL see + /// is recorded in. Notably, the last part of the URL path is the version number of the + /// schema: http\[s\]://server\[:port\]/path/. To learn more about Schema URL see /// /// This schema_url applies to the data in the "resource" field. It does not apply /// to the data in the "scope_logs" field which have their own schema_url field. @@ -60,7 +61,8 @@ pub struct ScopeLogs { #[prost(message, repeated, tag = "2")] pub log_records: ::prost::alloc::vec::Vec, /// The Schema URL, if known. This is the identifier of the Schema that the log data - /// is recorded in. To learn more about Schema URL see + /// is recorded in. Notably, the last part of the URL path is the version number of the + /// schema: http\[s\]://server\[:port\]/path/. To learn more about Schema URL see /// /// This schema_url applies to all logs in the "logs" field. #[prost(string, tag = "3")] @@ -178,6 +180,20 @@ pub struct LogRecord { ) )] pub span_id: ::prost::alloc::vec::Vec, + /// A unique identifier of event category/type. + /// All events with the same event_name are expected to conform to the same + /// schema for both their attributes and their body. + /// + /// Recommended to be fully qualified and short (no longer than 256 characters). + /// + /// Presence of event_name on the log record identifies this record + /// as an event. + /// + /// \[Optional\]. + /// + /// Status: \[Development\] + #[prost(string, tag = "12")] + pub event_name: ::prost::alloc::string::String, } /// Possible values for LogRecord.SeverityNumber. #[cfg_attr(feature = "with-schemars", derive(schemars::JsonSchema))] diff --git a/opentelemetry-proto/src/proto/tonic/opentelemetry.proto.metrics.v1.rs b/opentelemetry-proto/src/proto/tonic/opentelemetry.proto.metrics.v1.rs index 66e316689d..fb04bec6cc 100644 --- a/opentelemetry-proto/src/proto/tonic/opentelemetry.proto.metrics.v1.rs +++ b/opentelemetry-proto/src/proto/tonic/opentelemetry.proto.metrics.v1.rs @@ -55,7 +55,8 @@ pub struct ResourceMetrics { #[prost(message, repeated, tag = "2")] pub scope_metrics: ::prost::alloc::vec::Vec, /// The Schema URL, if known. This is the identifier of the Schema that the resource data - /// is recorded in. To learn more about Schema URL see + /// is recorded in. Notably, the last part of the URL path is the version number of the + /// schema: http\[s\]://server\[:port\]/path/. To learn more about Schema URL see /// /// This schema_url applies to the data in the "resource" field. It does not apply /// to the data in the "scope_metrics" field which have their own schema_url field. @@ -78,7 +79,8 @@ pub struct ScopeMetrics { #[prost(message, repeated, tag = "2")] pub metrics: ::prost::alloc::vec::Vec, /// The Schema URL, if known. This is the identifier of the Schema that the metric data - /// is recorded in. To learn more about Schema URL see + /// is recorded in. Notably, the last part of the URL path is the version number of the + /// schema: http\[s\]://server\[:port\]/path/. To learn more about Schema URL see /// /// This schema_url applies to all metrics in the "metrics" field. #[prost(string, tag = "3")] @@ -437,7 +439,7 @@ pub struct HistogramDataPoint { /// events, and is assumed to be monotonic over the values of these events. /// Negative events *can* be recorded, but sum should not be filled out when /// doing so. This is specifically to enforce compatibility w/ OpenMetrics, - /// see: + /// see: #[prost(double, optional, tag = "5")] pub sum: ::core::option::Option, /// bucket_counts is an optional field contains the count values of histogram @@ -520,7 +522,7 @@ pub struct ExponentialHistogramDataPoint { /// events, and is assumed to be monotonic over the values of these events. /// Negative events *can* be recorded, but sum should not be filled out when /// doing so. This is specifically to enforce compatibility w/ OpenMetrics, - /// see: + /// see: #[prost(double, optional, tag = "5")] pub sum: ::core::option::Option, /// scale describes the resolution of the histogram. Boundaries are @@ -643,7 +645,7 @@ pub struct SummaryDataPoint { /// events, and is assumed to be monotonic over the values of these events. /// Negative events *can* be recorded, but sum should not be filled out when /// doing so. This is specifically to enforce compatibility w/ OpenMetrics, - /// see: + /// see: #[prost(double, tag = "5")] pub sum: f64, /// (Optional) list of values at different quantiles of the distribution calculated diff --git a/opentelemetry-proto/src/proto/tonic/opentelemetry.proto.trace.v1.rs b/opentelemetry-proto/src/proto/tonic/opentelemetry.proto.trace.v1.rs index d51a470d13..2e37483e94 100644 --- a/opentelemetry-proto/src/proto/tonic/opentelemetry.proto.trace.v1.rs +++ b/opentelemetry-proto/src/proto/tonic/opentelemetry.proto.trace.v1.rs @@ -37,7 +37,8 @@ pub struct ResourceSpans { #[prost(message, repeated, tag = "2")] pub scope_spans: ::prost::alloc::vec::Vec, /// The Schema URL, if known. This is the identifier of the Schema that the resource data - /// is recorded in. To learn more about Schema URL see + /// is recorded in. Notably, the last part of the URL path is the version number of the + /// schema: http\[s\]://server\[:port\]/path/. To learn more about Schema URL see /// /// This schema_url applies to the data in the "resource" field. It does not apply /// to the data in the "scope_spans" field which have their own schema_url field. @@ -60,7 +61,8 @@ pub struct ScopeSpans { #[prost(message, repeated, tag = "2")] pub spans: ::prost::alloc::vec::Vec, /// The Schema URL, if known. This is the identifier of the Schema that the span data - /// is recorded in. To learn more about Schema URL see + /// is recorded in. Notably, the last part of the URL path is the version number of the + /// schema: http\[s\]://server\[:port\]/path/. To learn more about Schema URL see /// /// This schema_url applies to all spans and span events in the "spans" field. #[prost(string, tag = "3")] diff --git a/opentelemetry-proto/src/transform/logs.rs b/opentelemetry-proto/src/transform/logs.rs index 0f2e614550..785bdfd97f 100644 --- a/opentelemetry-proto/src/transform/logs.rs +++ b/opentelemetry-proto/src/transform/logs.rs @@ -118,6 +118,7 @@ pub mod tonic { #[cfg(not(feature = "populate-logs-event-name"))] attributes }, + event_name: log_record.event_name().unwrap_or_default().into(), severity_number: severity_number.into(), severity_text: log_record .severity_text() diff --git a/opentelemetry-proto/tests/json_serde.rs b/opentelemetry-proto/tests/json_serde.rs index 3295e682c1..389541cce7 100644 --- a/opentelemetry-proto/tests/json_serde.rs +++ b/opentelemetry-proto/tests/json_serde.rs @@ -1187,6 +1187,7 @@ mod json_serde { "Example log record", ))), }), + event_name: "test_log_event".to_string(), attributes: vec![ KeyValue { key: String::from("string.attribute"), @@ -1359,7 +1360,8 @@ mod json_serde { "droppedAttributesCount": 0, "flags": 0, "traceId": "5b8efff798038103d269b633813fc60c", - "spanId": "eee19b7ec3c1b174" + "spanId": "eee19b7ec3c1b174", + "eventName": "test_log_event" } ], "schemaUrl": "" @@ -1465,7 +1467,8 @@ mod json_serde { } } } - ] + ], + "eventName": "test_log_event" } ] }