Skip to content

chore: publish otel-proto v1.6.0 #2955

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
May 5, 2025
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
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,8 @@
}
}
],
"droppedAttributesCount": 0
"droppedAttributesCount": 0,
"entityRefs": []
},
"scopeSpans": [
{
Expand Down
1 change: 1 addition & 0 deletions opentelemetry-proto/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
## vNext

- Update `tonic` dependency version to 0.13
- - Update proto definitions to v1.6.0.

## 0.29.0

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -153,8 +153,6 @@ pub mod logs_service_client {
self.inner = self.inner.max_encoding_message_size(limit);
self
}
/// For performance reasons, it is recommended to keep this RPC
/// alive for the entire life of the application.
pub async fn export(
&mut self,
request: impl tonic::IntoRequest<super::ExportLogsServiceRequest>,
Expand Down Expand Up @@ -200,8 +198,6 @@ pub mod logs_service_server {
/// Generated trait containing gRPC methods that should be implemented for use with LogsServiceServer.
#[async_trait]
pub trait LogsService: std::marker::Send + std::marker::Sync + 'static {
/// For performance reasons, it is recommended to keep this RPC
/// alive for the entire life of the application.
async fn export(
&self,
request: tonic::Request<super::ExportLogsServiceRequest>,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -153,8 +153,6 @@ pub mod metrics_service_client {
self.inner = self.inner.max_encoding_message_size(limit);
self
}
/// For performance reasons, it is recommended to keep this RPC
/// alive for the entire life of the application.
pub async fn export(
&mut self,
request: impl tonic::IntoRequest<super::ExportMetricsServiceRequest>,
Expand Down Expand Up @@ -200,8 +198,6 @@ pub mod metrics_service_server {
/// Generated trait containing gRPC methods that should be implemented for use with MetricsServiceServer.
#[async_trait]
pub trait MetricsService: std::marker::Send + std::marker::Sync + 'static {
/// For performance reasons, it is recommended to keep this RPC
/// alive for the entire life of the application.
async fn export(
&self,
request: tonic::Request<super::ExportMetricsServiceRequest>,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -153,8 +153,6 @@ pub mod trace_service_client {
self.inner = self.inner.max_encoding_message_size(limit);
self
}
/// For performance reasons, it is recommended to keep this RPC
/// alive for the entire life of the application.
pub async fn export(
&mut self,
request: impl tonic::IntoRequest<super::ExportTraceServiceRequest>,
Expand Down Expand Up @@ -200,8 +198,6 @@ pub mod trace_service_server {
/// Generated trait containing gRPC methods that should be implemented for use with TraceServiceServer.
#[async_trait]
pub trait TraceService: std::marker::Send + std::marker::Sync + 'static {
/// For performance reasons, it is recommended to keep this RPC
/// alive for the entire life of the application.
async fn export(
&self,
request: tonic::Request<super::ExportTraceServiceRequest>,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -106,3 +106,41 @@ pub struct InstrumentationScope {
#[prost(uint32, tag = "4")]
pub dropped_attributes_count: u32,
}
/// A reference to an Entity.
/// Entity represents an object of interest associated with produced telemetry: e.g spans, metrics, profiles, or logs.
///
/// Status: \[Development\]
#[cfg_attr(feature = "with-schemars", derive(schemars::JsonSchema))]
#[cfg_attr(feature = "with-serde", derive(serde::Serialize, serde::Deserialize))]
#[cfg_attr(feature = "with-serde", serde(rename_all = "camelCase"))]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct EntityRef {
/// The Schema URL, if known. This is the identifier of the Schema that the entity data
/// is recorded in. To learn more about Schema URL see
/// <https://opentelemetry.io/docs/specs/otel/schemas/#schema-url>
///
/// This schema_url applies to the data in this message and to the Resource attributes
/// referenced by id_keys and description_keys.
/// TODO: discuss if we are happy with this somewhat complicated definition of what
/// the schema_url applies to.
///
/// This field obsoletes the schema_url field in ResourceMetrics/ResourceSpans/ResourceLogs.
#[prost(string, tag = "1")]
pub schema_url: ::prost::alloc::string::String,
/// Defines the type of the entity. MUST not change during the lifetime of the entity.
/// For example: "service" or "host". This field is required and MUST not be empty
/// for valid entities.
#[prost(string, tag = "2")]
pub r#type: ::prost::alloc::string::String,
/// Attribute Keys that identify the entity.
/// MUST not change during the lifetime of the entity. The Id must contain at least one attribute.
/// These keys MUST exist in the containing {message}.attributes.
#[prost(string, repeated, tag = "3")]
pub id_keys: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
/// Descriptive (non-identifying) attribute keys of the entity.
/// MAY change over the lifetime of the entity. MAY be empty.
/// These attribute keys are not part of entity's identity.
/// These keys MUST exist in the containing {message}.attributes.
#[prost(string, repeated, tag = "4")]
pub description_keys: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
}
Original file line number Diff line number Diff line change
Expand Up @@ -190,8 +190,6 @@ pub struct LogRecord {
/// as an event.
///
/// \[Optional\].
///
/// Status: \[Development\]
#[prost(string, tag = "12")]
pub event_name: ::prost::alloc::string::String,
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,4 +15,11 @@ pub struct Resource {
/// no attributes were dropped.
#[prost(uint32, tag = "2")]
pub dropped_attributes_count: u32,
/// Set of entities that participate in this Resource.
///
/// Note: keys in the references MUST exist in attributes of this message.
///
/// Status: \[Development\]
#[prost(message, repeated, tag = "3")]
pub entity_refs: ::prost::alloc::vec::Vec<super::super::common::v1::EntityRef>,
}
2 changes: 2 additions & 0 deletions opentelemetry-proto/src/transform/logs.rs
Original file line number Diff line number Diff line change
Expand Up @@ -150,6 +150,7 @@ pub mod tonic {
resource: Some(Resource {
attributes: resource.attributes.0.clone(),
dropped_attributes_count: 0,
entity_refs: vec![],
}),
schema_url: resource.schema_url.clone().unwrap_or_default(),
scope_logs: vec![ScopeLogs {
Expand Down Expand Up @@ -210,6 +211,7 @@ pub mod tonic {
resource: Some(Resource {
attributes: resource.attributes.0.clone(),
dropped_attributes_count: 0,
entity_refs: vec![],
}),
scope_logs,
schema_url: resource.schema_url.clone().unwrap_or_default(),
Expand Down
1 change: 1 addition & 0 deletions opentelemetry-proto/src/transform/metrics.rs
Original file line number Diff line number Diff line change
Expand Up @@ -127,6 +127,7 @@ pub mod tonic {
TonicResource {
attributes: resource.iter().map(Into::into).collect(),
dropped_attributes_count: 0,
entity_refs: vec![], // internal and currently unused
}
}
}
Expand Down
2 changes: 2 additions & 0 deletions opentelemetry-proto/src/transform/trace.rs
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,7 @@ pub mod tonic {
resource: Some(Resource {
attributes: resource.attributes.0.clone(),
dropped_attributes_count: 0,
entity_refs: vec![],
}),
schema_url: resource.schema_url.clone().unwrap_or_default(),
scope_spans: vec![ScopeSpans {
Expand Down Expand Up @@ -182,6 +183,7 @@ pub mod tonic {
resource: Some(Resource {
attributes: resource.attributes.0.clone(),
dropped_attributes_count: 0,
entity_refs: vec![],
}),
scope_spans,
schema_url: resource.schema_url.clone().unwrap_or_default(),
Expand Down
4 changes: 4 additions & 0 deletions opentelemetry-proto/tests/json_serde.rs
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ mod json_serde {
}),
}],
dropped_attributes_count: 0,
entity_refs: vec![],
}),
scope_spans: vec![ScopeSpans {
scope: Some(InstrumentationScope {
Expand Down Expand Up @@ -249,6 +250,7 @@ mod json_serde {
}),
}],
dropped_attributes_count: 1,
entity_refs: vec![],
}),
scope_spans: vec![ScopeSpans {
scope: Some(InstrumentationScope {
Expand Down Expand Up @@ -792,6 +794,7 @@ mod json_serde {
}),
}],
dropped_attributes_count: 0,
entity_refs: vec![],
}),
scope_metrics: vec![ScopeMetrics {
scope: Some(InstrumentationScope {
Expand Down Expand Up @@ -1178,6 +1181,7 @@ mod json_serde {
}),
}],
dropped_attributes_count: 0,
entity_refs: vec![],
}),
scope_logs: vec![ScopeLogs {
scope: Some(InstrumentationScope {
Expand Down
Loading