Skip to content

Commit 551760b

Browse files
lalitbcijothomas
andauthored
chore: publish otel-proto v1.5.0 (#2439)
Co-authored-by: Cijo Thomas <[email protected]>
1 parent 6a3b04d commit 551760b

File tree

7 files changed

+38
-12
lines changed

7 files changed

+38
-12
lines changed

opentelemetry-proto/CHANGELOG.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@
44

55
- Update proto definitions to v1.4.0 [#2315](https://github.com/open-telemetry/opentelemetry-rust/pull/2315)
66
- Bump msrv to 1.75.0.
7+
- Update proto definitions to v1.5.0 [#2439](https://github.com/open-telemetry/opentelemetry-rust/pull/2439)
8+
79

810
## 0.27.0
911

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

Lines changed: 18 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,8 @@ pub struct ResourceLogs {
3737
#[prost(message, repeated, tag = "2")]
3838
pub scope_logs: ::prost::alloc::vec::Vec<ScopeLogs>,
3939
/// The Schema URL, if known. This is the identifier of the Schema that the resource data
40-
/// is recorded in. To learn more about Schema URL see
40+
/// is recorded in. Notably, the last part of the URL path is the version number of the
41+
/// schema: http\[s\]://server\[:port\]/path/<version>. To learn more about Schema URL see
4142
/// <https://opentelemetry.io/docs/specs/otel/schemas/#schema-url>
4243
/// This schema_url applies to the data in the "resource" field. It does not apply
4344
/// to the data in the "scope_logs" field which have their own schema_url field.
@@ -60,7 +61,8 @@ pub struct ScopeLogs {
6061
#[prost(message, repeated, tag = "2")]
6162
pub log_records: ::prost::alloc::vec::Vec<LogRecord>,
6263
/// The Schema URL, if known. This is the identifier of the Schema that the log data
63-
/// is recorded in. To learn more about Schema URL see
64+
/// is recorded in. Notably, the last part of the URL path is the version number of the
65+
/// schema: http\[s\]://server\[:port\]/path/<version>. To learn more about Schema URL see
6466
/// <https://opentelemetry.io/docs/specs/otel/schemas/#schema-url>
6567
/// This schema_url applies to all logs in the "logs" field.
6668
#[prost(string, tag = "3")]
@@ -178,6 +180,20 @@ pub struct LogRecord {
178180
)
179181
)]
180182
pub span_id: ::prost::alloc::vec::Vec<u8>,
183+
/// A unique identifier of event category/type.
184+
/// All events with the same event_name are expected to conform to the same
185+
/// schema for both their attributes and their body.
186+
///
187+
/// Recommended to be fully qualified and short (no longer than 256 characters).
188+
///
189+
/// Presence of event_name on the log record identifies this record
190+
/// as an event.
191+
///
192+
/// \[Optional\].
193+
///
194+
/// Status: \[Development\]
195+
#[prost(string, tag = "12")]
196+
pub event_name: ::prost::alloc::string::String,
181197
}
182198
/// Possible values for LogRecord.SeverityNumber.
183199
#[cfg_attr(feature = "with-schemars", derive(schemars::JsonSchema))]

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

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,8 @@ pub struct ResourceMetrics {
5555
#[prost(message, repeated, tag = "2")]
5656
pub scope_metrics: ::prost::alloc::vec::Vec<ScopeMetrics>,
5757
/// The Schema URL, if known. This is the identifier of the Schema that the resource data
58-
/// is recorded in. To learn more about Schema URL see
58+
/// is recorded in. Notably, the last part of the URL path is the version number of the
59+
/// schema: http\[s\]://server\[:port\]/path/<version>. To learn more about Schema URL see
5960
/// <https://opentelemetry.io/docs/specs/otel/schemas/#schema-url>
6061
/// This schema_url applies to the data in the "resource" field. It does not apply
6162
/// to the data in the "scope_metrics" field which have their own schema_url field.
@@ -78,7 +79,8 @@ pub struct ScopeMetrics {
7879
#[prost(message, repeated, tag = "2")]
7980
pub metrics: ::prost::alloc::vec::Vec<Metric>,
8081
/// The Schema URL, if known. This is the identifier of the Schema that the metric data
81-
/// is recorded in. To learn more about Schema URL see
82+
/// is recorded in. Notably, the last part of the URL path is the version number of the
83+
/// schema: http\[s\]://server\[:port\]/path/<version>. To learn more about Schema URL see
8284
/// <https://opentelemetry.io/docs/specs/otel/schemas/#schema-url>
8385
/// This schema_url applies to all metrics in the "metrics" field.
8486
#[prost(string, tag = "3")]
@@ -437,7 +439,7 @@ pub struct HistogramDataPoint {
437439
/// events, and is assumed to be monotonic over the values of these events.
438440
/// Negative events *can* be recorded, but sum should not be filled out when
439441
/// doing so. This is specifically to enforce compatibility w/ OpenMetrics,
440-
/// see: <https://github.com/OpenObservability/OpenMetrics/blob/main/specification/OpenMetrics.md#histogram>
442+
/// see: <https://github.com/prometheus/OpenMetrics/blob/v1.0.0/specification/OpenMetrics.md#histogram>
441443
#[prost(double, optional, tag = "5")]
442444
pub sum: ::core::option::Option<f64>,
443445
/// bucket_counts is an optional field contains the count values of histogram
@@ -520,7 +522,7 @@ pub struct ExponentialHistogramDataPoint {
520522
/// events, and is assumed to be monotonic over the values of these events.
521523
/// Negative events *can* be recorded, but sum should not be filled out when
522524
/// doing so. This is specifically to enforce compatibility w/ OpenMetrics,
523-
/// see: <https://github.com/OpenObservability/OpenMetrics/blob/main/specification/OpenMetrics.md#histogram>
525+
/// see: <https://github.com/prometheus/OpenMetrics/blob/v1.0.0/specification/OpenMetrics.md#histogram>
524526
#[prost(double, optional, tag = "5")]
525527
pub sum: ::core::option::Option<f64>,
526528
/// scale describes the resolution of the histogram. Boundaries are
@@ -643,7 +645,7 @@ pub struct SummaryDataPoint {
643645
/// events, and is assumed to be monotonic over the values of these events.
644646
/// Negative events *can* be recorded, but sum should not be filled out when
645647
/// doing so. This is specifically to enforce compatibility w/ OpenMetrics,
646-
/// see: <https://github.com/OpenObservability/OpenMetrics/blob/main/specification/OpenMetrics.md#summary>
648+
/// see: <https://github.com/prometheus/OpenMetrics/blob/v1.0.0/specification/OpenMetrics.md#summary>
647649
#[prost(double, tag = "5")]
648650
pub sum: f64,
649651
/// (Optional) list of values at different quantiles of the distribution calculated

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

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,8 @@ pub struct ResourceSpans {
3737
#[prost(message, repeated, tag = "2")]
3838
pub scope_spans: ::prost::alloc::vec::Vec<ScopeSpans>,
3939
/// The Schema URL, if known. This is the identifier of the Schema that the resource data
40-
/// is recorded in. To learn more about Schema URL see
40+
/// is recorded in. Notably, the last part of the URL path is the version number of the
41+
/// schema: http\[s\]://server\[:port\]/path/<version>. To learn more about Schema URL see
4142
/// <https://opentelemetry.io/docs/specs/otel/schemas/#schema-url>
4243
/// This schema_url applies to the data in the "resource" field. It does not apply
4344
/// to the data in the "scope_spans" field which have their own schema_url field.
@@ -60,7 +61,8 @@ pub struct ScopeSpans {
6061
#[prost(message, repeated, tag = "2")]
6162
pub spans: ::prost::alloc::vec::Vec<Span>,
6263
/// The Schema URL, if known. This is the identifier of the Schema that the span data
63-
/// is recorded in. To learn more about Schema URL see
64+
/// is recorded in. Notably, the last part of the URL path is the version number of the
65+
/// schema: http\[s\]://server\[:port\]/path/<version>. To learn more about Schema URL see
6466
/// <https://opentelemetry.io/docs/specs/otel/schemas/#schema-url>
6567
/// This schema_url applies to all spans and span events in the "spans" field.
6668
#[prost(string, tag = "3")]

opentelemetry-proto/src/transform/logs.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -118,6 +118,7 @@ pub mod tonic {
118118
#[cfg(not(feature = "populate-logs-event-name"))]
119119
attributes
120120
},
121+
event_name: log_record.event_name().unwrap_or_default().into(),
121122
severity_number: severity_number.into(),
122123
severity_text: log_record
123124
.severity_text()

opentelemetry-proto/tests/json_serde.rs

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1187,6 +1187,7 @@ mod json_serde {
11871187
"Example log record",
11881188
))),
11891189
}),
1190+
event_name: "test_log_event".to_string(),
11901191
attributes: vec![
11911192
KeyValue {
11921193
key: String::from("string.attribute"),
@@ -1359,7 +1360,8 @@ mod json_serde {
13591360
"droppedAttributesCount": 0,
13601361
"flags": 0,
13611362
"traceId": "5b8efff798038103d269b633813fc60c",
1362-
"spanId": "eee19b7ec3c1b174"
1363+
"spanId": "eee19b7ec3c1b174",
1364+
"eventName": "test_log_event"
13631365
}
13641366
],
13651367
"schemaUrl": ""
@@ -1465,7 +1467,8 @@ mod json_serde {
14651467
}
14661468
}
14671469
}
1468-
]
1470+
],
1471+
"eventName": "test_log_event"
14691472
}
14701473
]
14711474
}

0 commit comments

Comments
 (0)