Skip to content

Commit ad208a1

Browse files
authored
Publish otel-stackdriver v0.22.0 (#113)
1 parent 4761fcc commit ad208a1

File tree

7 files changed

+91
-100
lines changed

7 files changed

+91
-100
lines changed

opentelemetry-stackdriver/CHANGELOG.md

+3
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,11 @@
22

33
## vNext
44

5+
## v0.22.0
6+
57
### Added
68

9+
- Update to opentelemetry v0.25.0, opentelemetry_sdk v0.25.0, opentelemetry-semantic-conventions v0.25.0
710
- Added support for `MonitoredResource::CloudRunJob` [#100](https://github.com/open-telemetry/opentelemetry-rust-contrib/issues/100)
811

912
## v0.21.0

opentelemetry-stackdriver/Cargo.toml

+5-5
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "opentelemetry-stackdriver"
3-
version = "0.21.0"
3+
version = "0.22.0"
44
description = "A Rust opentelemetry exporter that uploads traces to Google Stackdriver trace."
55
documentation = "https://docs.rs/opentelemetry-stackdriver/"
66
repository = "https://github.com/open-telemetry/opentelemetry-rust-contrib"
@@ -14,9 +14,9 @@ async-trait = "0.1.48"
1414
gcp_auth = { version = "0.12", optional = true }
1515
hex = "0.4"
1616
http = "1"
17-
opentelemetry = "0.24"
18-
opentelemetry_sdk = { version = "0.24", features = ["trace"] }
19-
opentelemetry-semantic-conventions = "0.16"
17+
opentelemetry = {workspace = true}
18+
opentelemetry_sdk = { workspace = true, features = ["trace"] }
19+
opentelemetry-semantic-conventions = { workspace = true}
2020
prost = "0.13"
2121
prost-types = "0.13"
2222
thiserror = "1.0.30"
@@ -42,4 +42,4 @@ tokio = "1"
4242
tonic-build = "0.12"
4343
walkdir = "2.3.2"
4444
futures-util = { version = "0.3", default-features = false }
45-
opentelemetry = { version = "0.24", features = ["testing"] }
45+
opentelemetry = { workspace = true, features = ["testing"] }

opentelemetry-stackdriver/src/proto/api.rs

+36-36
Original file line numberDiff line numberDiff line change
@@ -408,14 +408,14 @@ impl LaunchStage {
408408
/// (if the ProtoBuf definition does not change) and safe for programmatic use.
409409
pub fn as_str_name(&self) -> &'static str {
410410
match self {
411-
LaunchStage::Unspecified => "LAUNCH_STAGE_UNSPECIFIED",
412-
LaunchStage::Unimplemented => "UNIMPLEMENTED",
413-
LaunchStage::Prelaunch => "PRELAUNCH",
414-
LaunchStage::EarlyAccess => "EARLY_ACCESS",
415-
LaunchStage::Alpha => "ALPHA",
416-
LaunchStage::Beta => "BETA",
417-
LaunchStage::Ga => "GA",
418-
LaunchStage::Deprecated => "DEPRECATED",
411+
Self::Unspecified => "LAUNCH_STAGE_UNSPECIFIED",
412+
Self::Unimplemented => "UNIMPLEMENTED",
413+
Self::Prelaunch => "PRELAUNCH",
414+
Self::EarlyAccess => "EARLY_ACCESS",
415+
Self::Alpha => "ALPHA",
416+
Self::Beta => "BETA",
417+
Self::Ga => "GA",
418+
Self::Deprecated => "DEPRECATED",
419419
}
420420
}
421421
/// Creates an enum from field names used in the ProtoBuf definition.
@@ -772,14 +772,14 @@ impl ClientLibraryOrganization {
772772
/// (if the ProtoBuf definition does not change) and safe for programmatic use.
773773
pub fn as_str_name(&self) -> &'static str {
774774
match self {
775-
ClientLibraryOrganization::Unspecified => "CLIENT_LIBRARY_ORGANIZATION_UNSPECIFIED",
776-
ClientLibraryOrganization::Cloud => "CLOUD",
777-
ClientLibraryOrganization::Ads => "ADS",
778-
ClientLibraryOrganization::Photos => "PHOTOS",
779-
ClientLibraryOrganization::StreetView => "STREET_VIEW",
780-
ClientLibraryOrganization::Shopping => "SHOPPING",
781-
ClientLibraryOrganization::Geo => "GEO",
782-
ClientLibraryOrganization::GenerativeAi => "GENERATIVE_AI",
775+
Self::Unspecified => "CLIENT_LIBRARY_ORGANIZATION_UNSPECIFIED",
776+
Self::Cloud => "CLOUD",
777+
Self::Ads => "ADS",
778+
Self::Photos => "PHOTOS",
779+
Self::StreetView => "STREET_VIEW",
780+
Self::Shopping => "SHOPPING",
781+
Self::Geo => "GEO",
782+
Self::GenerativeAi => "GENERATIVE_AI",
783783
}
784784
}
785785
/// Creates an enum from field names used in the ProtoBuf definition.
@@ -817,9 +817,9 @@ impl ClientLibraryDestination {
817817
/// (if the ProtoBuf definition does not change) and safe for programmatic use.
818818
pub fn as_str_name(&self) -> &'static str {
819819
match self {
820-
ClientLibraryDestination::Unspecified => "CLIENT_LIBRARY_DESTINATION_UNSPECIFIED",
821-
ClientLibraryDestination::Github => "GITHUB",
822-
ClientLibraryDestination::PackageManager => "PACKAGE_MANAGER",
820+
Self::Unspecified => "CLIENT_LIBRARY_DESTINATION_UNSPECIFIED",
821+
Self::Github => "GITHUB",
822+
Self::PackageManager => "PACKAGE_MANAGER",
823823
}
824824
}
825825
/// Creates an enum from field names used in the ProtoBuf definition.
@@ -895,15 +895,15 @@ impl FieldBehavior {
895895
/// (if the ProtoBuf definition does not change) and safe for programmatic use.
896896
pub fn as_str_name(&self) -> &'static str {
897897
match self {
898-
FieldBehavior::Unspecified => "FIELD_BEHAVIOR_UNSPECIFIED",
899-
FieldBehavior::Optional => "OPTIONAL",
900-
FieldBehavior::Required => "REQUIRED",
901-
FieldBehavior::OutputOnly => "OUTPUT_ONLY",
902-
FieldBehavior::InputOnly => "INPUT_ONLY",
903-
FieldBehavior::Immutable => "IMMUTABLE",
904-
FieldBehavior::UnorderedList => "UNORDERED_LIST",
905-
FieldBehavior::NonEmptyDefault => "NON_EMPTY_DEFAULT",
906-
FieldBehavior::Identifier => "IDENTIFIER",
898+
Self::Unspecified => "FIELD_BEHAVIOR_UNSPECIFIED",
899+
Self::Optional => "OPTIONAL",
900+
Self::Required => "REQUIRED",
901+
Self::OutputOnly => "OUTPUT_ONLY",
902+
Self::InputOnly => "INPUT_ONLY",
903+
Self::Immutable => "IMMUTABLE",
904+
Self::UnorderedList => "UNORDERED_LIST",
905+
Self::NonEmptyDefault => "NON_EMPTY_DEFAULT",
906+
Self::Identifier => "IDENTIFIER",
907907
}
908908
}
909909
/// Creates an enum from field names used in the ProtoBuf definition.
@@ -1075,9 +1075,9 @@ pub mod resource_descriptor {
10751075
/// (if the ProtoBuf definition does not change) and safe for programmatic use.
10761076
pub fn as_str_name(&self) -> &'static str {
10771077
match self {
1078-
History::Unspecified => "HISTORY_UNSPECIFIED",
1079-
History::OriginallySinglePattern => "ORIGINALLY_SINGLE_PATTERN",
1080-
History::FutureMultiPattern => "FUTURE_MULTI_PATTERN",
1078+
Self::Unspecified => "HISTORY_UNSPECIFIED",
1079+
Self::OriginallySinglePattern => "ORIGINALLY_SINGLE_PATTERN",
1080+
Self::FutureMultiPattern => "FUTURE_MULTI_PATTERN",
10811081
}
10821082
}
10831083
/// Creates an enum from field names used in the ProtoBuf definition.
@@ -1113,8 +1113,8 @@ pub mod resource_descriptor {
11131113
/// (if the ProtoBuf definition does not change) and safe for programmatic use.
11141114
pub fn as_str_name(&self) -> &'static str {
11151115
match self {
1116-
Style::Unspecified => "STYLE_UNSPECIFIED",
1117-
Style::DeclarativeFriendly => "DECLARATIVE_FRIENDLY",
1116+
Self::Unspecified => "STYLE_UNSPECIFIED",
1117+
Self::DeclarativeFriendly => "DECLARATIVE_FRIENDLY",
11181118
}
11191119
}
11201120
/// Creates an enum from field names used in the ProtoBuf definition.
@@ -1200,9 +1200,9 @@ pub mod label_descriptor {
12001200
/// (if the ProtoBuf definition does not change) and safe for programmatic use.
12011201
pub fn as_str_name(&self) -> &'static str {
12021202
match self {
1203-
ValueType::String => "STRING",
1204-
ValueType::Bool => "BOOL",
1205-
ValueType::Int64 => "INT64",
1203+
Self::String => "STRING",
1204+
Self::Bool => "BOOL",
1205+
Self::Int64 => "INT64",
12061206
}
12071207
}
12081208
/// Creates an enum from field names used in the ProtoBuf definition.

opentelemetry-stackdriver/src/proto/devtools/cloudtrace/v2.rs

+21-21
Original file line numberDiff line numberDiff line change
@@ -170,9 +170,9 @@ pub mod span {
170170
/// (if the ProtoBuf definition does not change) and safe for programmatic use.
171171
pub fn as_str_name(&self) -> &'static str {
172172
match self {
173-
Type::Unspecified => "TYPE_UNSPECIFIED",
174-
Type::Sent => "SENT",
175-
Type::Received => "RECEIVED",
173+
Self::Unspecified => "TYPE_UNSPECIFIED",
174+
Self::Sent => "SENT",
175+
Self::Received => "RECEIVED",
176176
}
177177
}
178178
/// Creates an enum from field names used in the ProtoBuf definition.
@@ -258,9 +258,9 @@ pub mod span {
258258
/// (if the ProtoBuf definition does not change) and safe for programmatic use.
259259
pub fn as_str_name(&self) -> &'static str {
260260
match self {
261-
Type::Unspecified => "TYPE_UNSPECIFIED",
262-
Type::ChildLinkedSpan => "CHILD_LINKED_SPAN",
263-
Type::ParentLinkedSpan => "PARENT_LINKED_SPAN",
261+
Self::Unspecified => "TYPE_UNSPECIFIED",
262+
Self::ChildLinkedSpan => "CHILD_LINKED_SPAN",
263+
Self::ParentLinkedSpan => "PARENT_LINKED_SPAN",
264264
}
265265
}
266266
/// Creates an enum from field names used in the ProtoBuf definition.
@@ -320,12 +320,12 @@ pub mod span {
320320
/// (if the ProtoBuf definition does not change) and safe for programmatic use.
321321
pub fn as_str_name(&self) -> &'static str {
322322
match self {
323-
SpanKind::Unspecified => "SPAN_KIND_UNSPECIFIED",
324-
SpanKind::Internal => "INTERNAL",
325-
SpanKind::Server => "SERVER",
326-
SpanKind::Client => "CLIENT",
327-
SpanKind::Producer => "PRODUCER",
328-
SpanKind::Consumer => "CONSUMER",
323+
Self::Unspecified => "SPAN_KIND_UNSPECIFIED",
324+
Self::Internal => "INTERNAL",
325+
Self::Server => "SERVER",
326+
Self::Client => "CLIENT",
327+
Self::Producer => "PRODUCER",
328+
Self::Consumer => "CONSUMER",
329329
}
330330
}
331331
/// Creates an enum from field names used in the ProtoBuf definition.
@@ -472,7 +472,13 @@ pub struct BatchWriteSpansRequest {
472472
}
473473
/// Generated client implementations.
474474
pub mod trace_service_client {
475-
#![allow(unused_variables, dead_code, missing_docs, clippy::let_unit_value)]
475+
#![allow(
476+
unused_variables,
477+
dead_code,
478+
missing_docs,
479+
clippy::wildcard_imports,
480+
clippy::let_unit_value
481+
)]
476482
use tonic::codegen::http::Uri;
477483
use tonic::codegen::*;
478484
/// Service for collecting and viewing traces and spans within a trace.
@@ -568,10 +574,7 @@ pub mod trace_service_client {
568574
request: impl tonic::IntoRequest<super::BatchWriteSpansRequest>,
569575
) -> std::result::Result<tonic::Response<()>, tonic::Status> {
570576
self.inner.ready().await.map_err(|e| {
571-
tonic::Status::new(
572-
tonic::Code::Unknown,
573-
format!("Service was not ready: {}", e.into()),
574-
)
577+
tonic::Status::unknown(format!("Service was not ready: {}", e.into()))
575578
})?;
576579
let codec = tonic::codec::ProstCodec::default();
577580
let path = http::uri::PathAndQuery::from_static(
@@ -590,10 +593,7 @@ pub mod trace_service_client {
590593
request: impl tonic::IntoRequest<super::Span>,
591594
) -> std::result::Result<tonic::Response<super::Span>, tonic::Status> {
592595
self.inner.ready().await.map_err(|e| {
593-
tonic::Status::new(
594-
tonic::Code::Unknown,
595-
format!("Service was not ready: {}", e.into()),
596-
)
596+
tonic::Status::unknown(format!("Service was not ready: {}", e.into()))
597597
})?;
598598
let codec = tonic::codec::ProstCodec::default();
599599
let path = http::uri::PathAndQuery::from_static(

opentelemetry-stackdriver/src/proto/logging/type.rs

+9-9
Original file line numberDiff line numberDiff line change
@@ -113,15 +113,15 @@ impl LogSeverity {
113113
/// (if the ProtoBuf definition does not change) and safe for programmatic use.
114114
pub fn as_str_name(&self) -> &'static str {
115115
match self {
116-
LogSeverity::Default => "DEFAULT",
117-
LogSeverity::Debug => "DEBUG",
118-
LogSeverity::Info => "INFO",
119-
LogSeverity::Notice => "NOTICE",
120-
LogSeverity::Warning => "WARNING",
121-
LogSeverity::Error => "ERROR",
122-
LogSeverity::Critical => "CRITICAL",
123-
LogSeverity::Alert => "ALERT",
124-
LogSeverity::Emergency => "EMERGENCY",
116+
Self::Default => "DEFAULT",
117+
Self::Debug => "DEBUG",
118+
Self::Info => "INFO",
119+
Self::Notice => "NOTICE",
120+
Self::Warning => "WARNING",
121+
Self::Error => "ERROR",
122+
Self::Critical => "CRITICAL",
123+
Self::Alert => "ALERT",
124+
Self::Emergency => "EMERGENCY",
125125
}
126126
}
127127
/// Creates an enum from field names used in the ProtoBuf definition.

opentelemetry-stackdriver/src/proto/logging/v2.rs

+16-28
Original file line numberDiff line numberDiff line change
@@ -594,9 +594,9 @@ pub mod tail_log_entries_response {
594594
/// (if the ProtoBuf definition does not change) and safe for programmatic use.
595595
pub fn as_str_name(&self) -> &'static str {
596596
match self {
597-
Reason::Unspecified => "REASON_UNSPECIFIED",
598-
Reason::RateLimit => "RATE_LIMIT",
599-
Reason::NotConsumed => "NOT_CONSUMED",
597+
Self::Unspecified => "REASON_UNSPECIFIED",
598+
Self::RateLimit => "RATE_LIMIT",
599+
Self::NotConsumed => "NOT_CONSUMED",
600600
}
601601
}
602602
/// Creates an enum from field names used in the ProtoBuf definition.
@@ -613,7 +613,13 @@ pub mod tail_log_entries_response {
613613
}
614614
/// Generated client implementations.
615615
pub mod logging_service_v2_client {
616-
#![allow(unused_variables, dead_code, missing_docs, clippy::let_unit_value)]
616+
#![allow(
617+
unused_variables,
618+
dead_code,
619+
missing_docs,
620+
clippy::wildcard_imports,
621+
clippy::let_unit_value
622+
)]
617623
use tonic::codegen::http::Uri;
618624
use tonic::codegen::*;
619625
/// Service for ingesting and querying logs.
@@ -705,10 +711,7 @@ pub mod logging_service_v2_client {
705711
request: impl tonic::IntoRequest<super::DeleteLogRequest>,
706712
) -> std::result::Result<tonic::Response<()>, tonic::Status> {
707713
self.inner.ready().await.map_err(|e| {
708-
tonic::Status::new(
709-
tonic::Code::Unknown,
710-
format!("Service was not ready: {}", e.into()),
711-
)
714+
tonic::Status::unknown(format!("Service was not ready: {}", e.into()))
712715
})?;
713716
let codec = tonic::codec::ProstCodec::default();
714717
let path = http::uri::PathAndQuery::from_static(
@@ -734,10 +737,7 @@ pub mod logging_service_v2_client {
734737
) -> std::result::Result<tonic::Response<super::WriteLogEntriesResponse>, tonic::Status>
735738
{
736739
self.inner.ready().await.map_err(|e| {
737-
tonic::Status::new(
738-
tonic::Code::Unknown,
739-
format!("Service was not ready: {}", e.into()),
740-
)
740+
tonic::Status::unknown(format!("Service was not ready: {}", e.into()))
741741
})?;
742742
let codec = tonic::codec::ProstCodec::default();
743743
let path = http::uri::PathAndQuery::from_static(
@@ -760,10 +760,7 @@ pub mod logging_service_v2_client {
760760
) -> std::result::Result<tonic::Response<super::ListLogEntriesResponse>, tonic::Status>
761761
{
762762
self.inner.ready().await.map_err(|e| {
763-
tonic::Status::new(
764-
tonic::Code::Unknown,
765-
format!("Service was not ready: {}", e.into()),
766-
)
763+
tonic::Status::unknown(format!("Service was not ready: {}", e.into()))
767764
})?;
768765
let codec = tonic::codec::ProstCodec::default();
769766
let path = http::uri::PathAndQuery::from_static(
@@ -785,10 +782,7 @@ pub mod logging_service_v2_client {
785782
tonic::Status,
786783
> {
787784
self.inner.ready().await.map_err(|e| {
788-
tonic::Status::new(
789-
tonic::Code::Unknown,
790-
format!("Service was not ready: {}", e.into()),
791-
)
785+
tonic::Status::unknown(format!("Service was not ready: {}", e.into()))
792786
})?;
793787
let codec = tonic::codec::ProstCodec::default();
794788
let path = http::uri::PathAndQuery::from_static(
@@ -808,10 +802,7 @@ pub mod logging_service_v2_client {
808802
request: impl tonic::IntoRequest<super::ListLogsRequest>,
809803
) -> std::result::Result<tonic::Response<super::ListLogsResponse>, tonic::Status> {
810804
self.inner.ready().await.map_err(|e| {
811-
tonic::Status::new(
812-
tonic::Code::Unknown,
813-
format!("Service was not ready: {}", e.into()),
814-
)
805+
tonic::Status::unknown(format!("Service was not ready: {}", e.into()))
815806
})?;
816807
let codec = tonic::codec::ProstCodec::default();
817808
let path = http::uri::PathAndQuery::from_static(
@@ -834,10 +825,7 @@ pub mod logging_service_v2_client {
834825
tonic::Status,
835826
> {
836827
self.inner.ready().await.map_err(|e| {
837-
tonic::Status::new(
838-
tonic::Code::Unknown,
839-
format!("Service was not ready: {}", e.into()),
840-
)
828+
tonic::Status::unknown(format!("Service was not ready: {}", e.into()))
841829
})?;
842830
let codec = tonic::codec::ProstCodec::default();
843831
let path = http::uri::PathAndQuery::from_static(

opentelemetry-stackdriver/tests/generate.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ fn generated_code_is_fresh() {
5555
.build_client(true)
5656
.build_server(false)
5757
.out_dir(&tmp_dir)
58-
.compile(&schemas, &["proto"])
58+
.compile_protos(&schemas, &["proto"])
5959
.unwrap();
6060

6161
// Next, wrangle the generated file names into a directory hierarchy.

0 commit comments

Comments
 (0)