Skip to content

Commit

Permalink
Merge branch 'main' into directly-implement-compute-aggregation
Browse files Browse the repository at this point in the history
  • Loading branch information
cijothomas authored Dec 18, 2024
2 parents afd1536 + 551760b commit 5afd526
Show file tree
Hide file tree
Showing 7 changed files with 38 additions and 12 deletions.
2 changes: 2 additions & 0 deletions opentelemetry-proto/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
20 changes: 18 additions & 2 deletions opentelemetry-proto/src/proto/tonic/opentelemetry.proto.logs.v1.rs
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,8 @@ pub struct ResourceLogs {
#[prost(message, repeated, tag = "2")]
pub scope_logs: ::prost::alloc::vec::Vec<ScopeLogs>,
/// 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/<version>. To learn more about Schema URL see
/// <https://opentelemetry.io/docs/specs/otel/schemas/#schema-url>
/// 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.
Expand All @@ -60,7 +61,8 @@ pub struct ScopeLogs {
#[prost(message, repeated, tag = "2")]
pub log_records: ::prost::alloc::vec::Vec<LogRecord>,
/// 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/<version>. To learn more about Schema URL see
/// <https://opentelemetry.io/docs/specs/otel/schemas/#schema-url>
/// This schema_url applies to all logs in the "logs" field.
#[prost(string, tag = "3")]
Expand Down Expand Up @@ -178,6 +180,20 @@ pub struct LogRecord {
)
)]
pub span_id: ::prost::alloc::vec::Vec<u8>,
/// 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))]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,8 @@ pub struct ResourceMetrics {
#[prost(message, repeated, tag = "2")]
pub scope_metrics: ::prost::alloc::vec::Vec<ScopeMetrics>,
/// 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/<version>. To learn more about Schema URL see
/// <https://opentelemetry.io/docs/specs/otel/schemas/#schema-url>
/// 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.
Expand All @@ -78,7 +79,8 @@ pub struct ScopeMetrics {
#[prost(message, repeated, tag = "2")]
pub metrics: ::prost::alloc::vec::Vec<Metric>,
/// 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/<version>. To learn more about Schema URL see
/// <https://opentelemetry.io/docs/specs/otel/schemas/#schema-url>
/// This schema_url applies to all metrics in the "metrics" field.
#[prost(string, tag = "3")]
Expand Down Expand Up @@ -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: <https://github.com/OpenObservability/OpenMetrics/blob/main/specification/OpenMetrics.md#histogram>
/// see: <https://github.com/prometheus/OpenMetrics/blob/v1.0.0/specification/OpenMetrics.md#histogram>
#[prost(double, optional, tag = "5")]
pub sum: ::core::option::Option<f64>,
/// bucket_counts is an optional field contains the count values of histogram
Expand Down Expand Up @@ -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: <https://github.com/OpenObservability/OpenMetrics/blob/main/specification/OpenMetrics.md#histogram>
/// see: <https://github.com/prometheus/OpenMetrics/blob/v1.0.0/specification/OpenMetrics.md#histogram>
#[prost(double, optional, tag = "5")]
pub sum: ::core::option::Option<f64>,
/// scale describes the resolution of the histogram. Boundaries are
Expand Down Expand Up @@ -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: <https://github.com/OpenObservability/OpenMetrics/blob/main/specification/OpenMetrics.md#summary>
/// see: <https://github.com/prometheus/OpenMetrics/blob/v1.0.0/specification/OpenMetrics.md#summary>
#[prost(double, tag = "5")]
pub sum: f64,
/// (Optional) list of values at different quantiles of the distribution calculated
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,8 @@ pub struct ResourceSpans {
#[prost(message, repeated, tag = "2")]
pub scope_spans: ::prost::alloc::vec::Vec<ScopeSpans>,
/// 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/<version>. To learn more about Schema URL see
/// <https://opentelemetry.io/docs/specs/otel/schemas/#schema-url>
/// 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.
Expand All @@ -60,7 +61,8 @@ pub struct ScopeSpans {
#[prost(message, repeated, tag = "2")]
pub spans: ::prost::alloc::vec::Vec<Span>,
/// 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/<version>. To learn more about Schema URL see
/// <https://opentelemetry.io/docs/specs/otel/schemas/#schema-url>
/// This schema_url applies to all spans and span events in the "spans" field.
#[prost(string, tag = "3")]
Expand Down
1 change: 1 addition & 0 deletions opentelemetry-proto/src/transform/logs.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down
7 changes: 5 additions & 2 deletions opentelemetry-proto/tests/json_serde.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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"),
Expand Down Expand Up @@ -1359,7 +1360,8 @@ mod json_serde {
"droppedAttributesCount": 0,
"flags": 0,
"traceId": "5b8efff798038103d269b633813fc60c",
"spanId": "eee19b7ec3c1b174"
"spanId": "eee19b7ec3c1b174",
"eventName": "test_log_event"
}
],
"schemaUrl": ""
Expand Down Expand Up @@ -1465,7 +1467,8 @@ mod json_serde {
}
}
}
]
],
"eventName": "test_log_event"
}
]
}
Expand Down

0 comments on commit 5afd526

Please sign in to comment.