Skip to content

Commit 377fe5d

Browse files
authored
chore: publish otel-proto v1.6.0 (#2955)
1 parent 3d589d6 commit 377fe5d

13 files changed

+58
-16
lines changed

opentelemetry-otlp/tests/integration_test/expected/serialized_traces.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,8 @@
1010
}
1111
}
1212
],
13-
"droppedAttributesCount": 0
13+
"droppedAttributesCount": 0,
14+
"entityRefs": []
1415
},
1516
"scopeSpans": [
1617
{

opentelemetry-proto/CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
## vNext
44

55
- Update `tonic` dependency version to 0.13
6+
- - Update proto definitions to v1.6.0.
67

78
## 0.29.0
89

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

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -153,8 +153,6 @@ pub mod logs_service_client {
153153
self.inner = self.inner.max_encoding_message_size(limit);
154154
self
155155
}
156-
/// For performance reasons, it is recommended to keep this RPC
157-
/// alive for the entire life of the application.
158156
pub async fn export(
159157
&mut self,
160158
request: impl tonic::IntoRequest<super::ExportLogsServiceRequest>,
@@ -200,8 +198,6 @@ pub mod logs_service_server {
200198
/// Generated trait containing gRPC methods that should be implemented for use with LogsServiceServer.
201199
#[async_trait]
202200
pub trait LogsService: std::marker::Send + std::marker::Sync + 'static {
203-
/// For performance reasons, it is recommended to keep this RPC
204-
/// alive for the entire life of the application.
205201
async fn export(
206202
&self,
207203
request: tonic::Request<super::ExportLogsServiceRequest>,

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

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -153,8 +153,6 @@ pub mod metrics_service_client {
153153
self.inner = self.inner.max_encoding_message_size(limit);
154154
self
155155
}
156-
/// For performance reasons, it is recommended to keep this RPC
157-
/// alive for the entire life of the application.
158156
pub async fn export(
159157
&mut self,
160158
request: impl tonic::IntoRequest<super::ExportMetricsServiceRequest>,
@@ -200,8 +198,6 @@ pub mod metrics_service_server {
200198
/// Generated trait containing gRPC methods that should be implemented for use with MetricsServiceServer.
201199
#[async_trait]
202200
pub trait MetricsService: std::marker::Send + std::marker::Sync + 'static {
203-
/// For performance reasons, it is recommended to keep this RPC
204-
/// alive for the entire life of the application.
205201
async fn export(
206202
&self,
207203
request: tonic::Request<super::ExportMetricsServiceRequest>,

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

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -153,8 +153,6 @@ pub mod trace_service_client {
153153
self.inner = self.inner.max_encoding_message_size(limit);
154154
self
155155
}
156-
/// For performance reasons, it is recommended to keep this RPC
157-
/// alive for the entire life of the application.
158156
pub async fn export(
159157
&mut self,
160158
request: impl tonic::IntoRequest<super::ExportTraceServiceRequest>,
@@ -200,8 +198,6 @@ pub mod trace_service_server {
200198
/// Generated trait containing gRPC methods that should be implemented for use with TraceServiceServer.
201199
#[async_trait]
202200
pub trait TraceService: std::marker::Send + std::marker::Sync + 'static {
203-
/// For performance reasons, it is recommended to keep this RPC
204-
/// alive for the entire life of the application.
205201
async fn export(
206202
&self,
207203
request: tonic::Request<super::ExportTraceServiceRequest>,

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

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -106,3 +106,41 @@ pub struct InstrumentationScope {
106106
#[prost(uint32, tag = "4")]
107107
pub dropped_attributes_count: u32,
108108
}
109+
/// A reference to an Entity.
110+
/// Entity represents an object of interest associated with produced telemetry: e.g spans, metrics, profiles, or logs.
111+
///
112+
/// Status: \[Development\]
113+
#[cfg_attr(feature = "with-schemars", derive(schemars::JsonSchema))]
114+
#[cfg_attr(feature = "with-serde", derive(serde::Serialize, serde::Deserialize))]
115+
#[cfg_attr(feature = "with-serde", serde(rename_all = "camelCase"))]
116+
#[derive(Clone, PartialEq, ::prost::Message)]
117+
pub struct EntityRef {
118+
/// The Schema URL, if known. This is the identifier of the Schema that the entity data
119+
/// is recorded in. To learn more about Schema URL see
120+
/// <https://opentelemetry.io/docs/specs/otel/schemas/#schema-url>
121+
///
122+
/// This schema_url applies to the data in this message and to the Resource attributes
123+
/// referenced by id_keys and description_keys.
124+
/// TODO: discuss if we are happy with this somewhat complicated definition of what
125+
/// the schema_url applies to.
126+
///
127+
/// This field obsoletes the schema_url field in ResourceMetrics/ResourceSpans/ResourceLogs.
128+
#[prost(string, tag = "1")]
129+
pub schema_url: ::prost::alloc::string::String,
130+
/// Defines the type of the entity. MUST not change during the lifetime of the entity.
131+
/// For example: "service" or "host". This field is required and MUST not be empty
132+
/// for valid entities.
133+
#[prost(string, tag = "2")]
134+
pub r#type: ::prost::alloc::string::String,
135+
/// Attribute Keys that identify the entity.
136+
/// MUST not change during the lifetime of the entity. The Id must contain at least one attribute.
137+
/// These keys MUST exist in the containing {message}.attributes.
138+
#[prost(string, repeated, tag = "3")]
139+
pub id_keys: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
140+
/// Descriptive (non-identifying) attribute keys of the entity.
141+
/// MAY change over the lifetime of the entity. MAY be empty.
142+
/// These attribute keys are not part of entity's identity.
143+
/// These keys MUST exist in the containing {message}.attributes.
144+
#[prost(string, repeated, tag = "4")]
145+
pub description_keys: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
146+
}

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

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -190,8 +190,6 @@ pub struct LogRecord {
190190
/// as an event.
191191
///
192192
/// \[Optional\].
193-
///
194-
/// Status: \[Development\]
195193
#[prost(string, tag = "12")]
196194
pub event_name: ::prost::alloc::string::String,
197195
}

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

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,4 +15,11 @@ pub struct Resource {
1515
/// no attributes were dropped.
1616
#[prost(uint32, tag = "2")]
1717
pub dropped_attributes_count: u32,
18+
/// Set of entities that participate in this Resource.
19+
///
20+
/// Note: keys in the references MUST exist in attributes of this message.
21+
///
22+
/// Status: \[Development\]
23+
#[prost(message, repeated, tag = "3")]
24+
pub entity_refs: ::prost::alloc::vec::Vec<super::super::common::v1::EntityRef>,
1825
}

opentelemetry-proto/src/transform/logs.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -150,6 +150,7 @@ pub mod tonic {
150150
resource: Some(Resource {
151151
attributes: resource.attributes.0.clone(),
152152
dropped_attributes_count: 0,
153+
entity_refs: vec![],
153154
}),
154155
schema_url: resource.schema_url.clone().unwrap_or_default(),
155156
scope_logs: vec![ScopeLogs {
@@ -210,6 +211,7 @@ pub mod tonic {
210211
resource: Some(Resource {
211212
attributes: resource.attributes.0.clone(),
212213
dropped_attributes_count: 0,
214+
entity_refs: vec![],
213215
}),
214216
scope_logs,
215217
schema_url: resource.schema_url.clone().unwrap_or_default(),

opentelemetry-proto/src/transform/metrics.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -127,6 +127,7 @@ pub mod tonic {
127127
TonicResource {
128128
attributes: resource.iter().map(Into::into).collect(),
129129
dropped_attributes_count: 0,
130+
entity_refs: vec![], // internal and currently unused
130131
}
131132
}
132133
}

opentelemetry-proto/src/transform/trace.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -97,6 +97,7 @@ pub mod tonic {
9797
resource: Some(Resource {
9898
attributes: resource.attributes.0.clone(),
9999
dropped_attributes_count: 0,
100+
entity_refs: vec![],
100101
}),
101102
schema_url: resource.schema_url.clone().unwrap_or_default(),
102103
scope_spans: vec![ScopeSpans {
@@ -182,6 +183,7 @@ pub mod tonic {
182183
resource: Some(Resource {
183184
attributes: resource.attributes.0.clone(),
184185
dropped_attributes_count: 0,
186+
entity_refs: vec![],
185187
}),
186188
scope_spans,
187189
schema_url: resource.schema_url.clone().unwrap_or_default(),

opentelemetry-proto/tests/json_serde.rs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,7 @@ mod json_serde {
4444
}),
4545
}],
4646
dropped_attributes_count: 0,
47+
entity_refs: vec![],
4748
}),
4849
scope_spans: vec![ScopeSpans {
4950
scope: Some(InstrumentationScope {
@@ -249,6 +250,7 @@ mod json_serde {
249250
}),
250251
}],
251252
dropped_attributes_count: 1,
253+
entity_refs: vec![],
252254
}),
253255
scope_spans: vec![ScopeSpans {
254256
scope: Some(InstrumentationScope {
@@ -792,6 +794,7 @@ mod json_serde {
792794
}),
793795
}],
794796
dropped_attributes_count: 0,
797+
entity_refs: vec![],
795798
}),
796799
scope_metrics: vec![ScopeMetrics {
797800
scope: Some(InstrumentationScope {
@@ -1178,6 +1181,7 @@ mod json_serde {
11781181
}),
11791182
}],
11801183
dropped_attributes_count: 0,
1184+
entity_refs: vec![],
11811185
}),
11821186
scope_logs: vec![ScopeLogs {
11831187
scope: Some(InstrumentationScope {

0 commit comments

Comments
 (0)