Skip to content

Commit

Permalink
Publish otel-stackdriver v0.22.0 (#113)
Browse files Browse the repository at this point in the history
  • Loading branch information
lalitb authored Sep 30, 2024
1 parent 4761fcc commit ad208a1
Show file tree
Hide file tree
Showing 7 changed files with 91 additions and 100 deletions.
3 changes: 3 additions & 0 deletions opentelemetry-stackdriver/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,11 @@

## vNext

## v0.22.0

### Added

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

## v0.21.0
Expand Down
10 changes: 5 additions & 5 deletions opentelemetry-stackdriver/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "opentelemetry-stackdriver"
version = "0.21.0"
version = "0.22.0"
description = "A Rust opentelemetry exporter that uploads traces to Google Stackdriver trace."
documentation = "https://docs.rs/opentelemetry-stackdriver/"
repository = "https://github.com/open-telemetry/opentelemetry-rust-contrib"
Expand All @@ -14,9 +14,9 @@ async-trait = "0.1.48"
gcp_auth = { version = "0.12", optional = true }
hex = "0.4"
http = "1"
opentelemetry = "0.24"
opentelemetry_sdk = { version = "0.24", features = ["trace"] }
opentelemetry-semantic-conventions = "0.16"
opentelemetry = {workspace = true}
opentelemetry_sdk = { workspace = true, features = ["trace"] }
opentelemetry-semantic-conventions = { workspace = true}
prost = "0.13"
prost-types = "0.13"
thiserror = "1.0.30"
Expand All @@ -42,4 +42,4 @@ tokio = "1"
tonic-build = "0.12"
walkdir = "2.3.2"
futures-util = { version = "0.3", default-features = false }
opentelemetry = { version = "0.24", features = ["testing"] }
opentelemetry = { workspace = true, features = ["testing"] }
72 changes: 36 additions & 36 deletions opentelemetry-stackdriver/src/proto/api.rs
Original file line number Diff line number Diff line change
Expand Up @@ -408,14 +408,14 @@ impl LaunchStage {
/// (if the ProtoBuf definition does not change) and safe for programmatic use.
pub fn as_str_name(&self) -> &'static str {
match self {
LaunchStage::Unspecified => "LAUNCH_STAGE_UNSPECIFIED",
LaunchStage::Unimplemented => "UNIMPLEMENTED",
LaunchStage::Prelaunch => "PRELAUNCH",
LaunchStage::EarlyAccess => "EARLY_ACCESS",
LaunchStage::Alpha => "ALPHA",
LaunchStage::Beta => "BETA",
LaunchStage::Ga => "GA",
LaunchStage::Deprecated => "DEPRECATED",
Self::Unspecified => "LAUNCH_STAGE_UNSPECIFIED",
Self::Unimplemented => "UNIMPLEMENTED",
Self::Prelaunch => "PRELAUNCH",
Self::EarlyAccess => "EARLY_ACCESS",
Self::Alpha => "ALPHA",
Self::Beta => "BETA",
Self::Ga => "GA",
Self::Deprecated => "DEPRECATED",
}
}
/// Creates an enum from field names used in the ProtoBuf definition.
Expand Down Expand Up @@ -772,14 +772,14 @@ impl ClientLibraryOrganization {
/// (if the ProtoBuf definition does not change) and safe for programmatic use.
pub fn as_str_name(&self) -> &'static str {
match self {
ClientLibraryOrganization::Unspecified => "CLIENT_LIBRARY_ORGANIZATION_UNSPECIFIED",
ClientLibraryOrganization::Cloud => "CLOUD",
ClientLibraryOrganization::Ads => "ADS",
ClientLibraryOrganization::Photos => "PHOTOS",
ClientLibraryOrganization::StreetView => "STREET_VIEW",
ClientLibraryOrganization::Shopping => "SHOPPING",
ClientLibraryOrganization::Geo => "GEO",
ClientLibraryOrganization::GenerativeAi => "GENERATIVE_AI",
Self::Unspecified => "CLIENT_LIBRARY_ORGANIZATION_UNSPECIFIED",
Self::Cloud => "CLOUD",
Self::Ads => "ADS",
Self::Photos => "PHOTOS",
Self::StreetView => "STREET_VIEW",
Self::Shopping => "SHOPPING",
Self::Geo => "GEO",
Self::GenerativeAi => "GENERATIVE_AI",
}
}
/// Creates an enum from field names used in the ProtoBuf definition.
Expand Down Expand Up @@ -817,9 +817,9 @@ impl ClientLibraryDestination {
/// (if the ProtoBuf definition does not change) and safe for programmatic use.
pub fn as_str_name(&self) -> &'static str {
match self {
ClientLibraryDestination::Unspecified => "CLIENT_LIBRARY_DESTINATION_UNSPECIFIED",
ClientLibraryDestination::Github => "GITHUB",
ClientLibraryDestination::PackageManager => "PACKAGE_MANAGER",
Self::Unspecified => "CLIENT_LIBRARY_DESTINATION_UNSPECIFIED",
Self::Github => "GITHUB",
Self::PackageManager => "PACKAGE_MANAGER",
}
}
/// Creates an enum from field names used in the ProtoBuf definition.
Expand Down Expand Up @@ -895,15 +895,15 @@ impl FieldBehavior {
/// (if the ProtoBuf definition does not change) and safe for programmatic use.
pub fn as_str_name(&self) -> &'static str {
match self {
FieldBehavior::Unspecified => "FIELD_BEHAVIOR_UNSPECIFIED",
FieldBehavior::Optional => "OPTIONAL",
FieldBehavior::Required => "REQUIRED",
FieldBehavior::OutputOnly => "OUTPUT_ONLY",
FieldBehavior::InputOnly => "INPUT_ONLY",
FieldBehavior::Immutable => "IMMUTABLE",
FieldBehavior::UnorderedList => "UNORDERED_LIST",
FieldBehavior::NonEmptyDefault => "NON_EMPTY_DEFAULT",
FieldBehavior::Identifier => "IDENTIFIER",
Self::Unspecified => "FIELD_BEHAVIOR_UNSPECIFIED",
Self::Optional => "OPTIONAL",
Self::Required => "REQUIRED",
Self::OutputOnly => "OUTPUT_ONLY",
Self::InputOnly => "INPUT_ONLY",
Self::Immutable => "IMMUTABLE",
Self::UnorderedList => "UNORDERED_LIST",
Self::NonEmptyDefault => "NON_EMPTY_DEFAULT",
Self::Identifier => "IDENTIFIER",
}
}
/// Creates an enum from field names used in the ProtoBuf definition.
Expand Down Expand Up @@ -1075,9 +1075,9 @@ pub mod resource_descriptor {
/// (if the ProtoBuf definition does not change) and safe for programmatic use.
pub fn as_str_name(&self) -> &'static str {
match self {
History::Unspecified => "HISTORY_UNSPECIFIED",
History::OriginallySinglePattern => "ORIGINALLY_SINGLE_PATTERN",
History::FutureMultiPattern => "FUTURE_MULTI_PATTERN",
Self::Unspecified => "HISTORY_UNSPECIFIED",
Self::OriginallySinglePattern => "ORIGINALLY_SINGLE_PATTERN",
Self::FutureMultiPattern => "FUTURE_MULTI_PATTERN",
}
}
/// Creates an enum from field names used in the ProtoBuf definition.
Expand Down Expand Up @@ -1113,8 +1113,8 @@ pub mod resource_descriptor {
/// (if the ProtoBuf definition does not change) and safe for programmatic use.
pub fn as_str_name(&self) -> &'static str {
match self {
Style::Unspecified => "STYLE_UNSPECIFIED",
Style::DeclarativeFriendly => "DECLARATIVE_FRIENDLY",
Self::Unspecified => "STYLE_UNSPECIFIED",
Self::DeclarativeFriendly => "DECLARATIVE_FRIENDLY",
}
}
/// Creates an enum from field names used in the ProtoBuf definition.
Expand Down Expand Up @@ -1200,9 +1200,9 @@ pub mod label_descriptor {
/// (if the ProtoBuf definition does not change) and safe for programmatic use.
pub fn as_str_name(&self) -> &'static str {
match self {
ValueType::String => "STRING",
ValueType::Bool => "BOOL",
ValueType::Int64 => "INT64",
Self::String => "STRING",
Self::Bool => "BOOL",
Self::Int64 => "INT64",
}
}
/// Creates an enum from field names used in the ProtoBuf definition.
Expand Down
42 changes: 21 additions & 21 deletions opentelemetry-stackdriver/src/proto/devtools/cloudtrace/v2.rs
Original file line number Diff line number Diff line change
Expand Up @@ -170,9 +170,9 @@ pub mod span {
/// (if the ProtoBuf definition does not change) and safe for programmatic use.
pub fn as_str_name(&self) -> &'static str {
match self {
Type::Unspecified => "TYPE_UNSPECIFIED",
Type::Sent => "SENT",
Type::Received => "RECEIVED",
Self::Unspecified => "TYPE_UNSPECIFIED",
Self::Sent => "SENT",
Self::Received => "RECEIVED",
}
}
/// Creates an enum from field names used in the ProtoBuf definition.
Expand Down Expand Up @@ -258,9 +258,9 @@ pub mod span {
/// (if the ProtoBuf definition does not change) and safe for programmatic use.
pub fn as_str_name(&self) -> &'static str {
match self {
Type::Unspecified => "TYPE_UNSPECIFIED",
Type::ChildLinkedSpan => "CHILD_LINKED_SPAN",
Type::ParentLinkedSpan => "PARENT_LINKED_SPAN",
Self::Unspecified => "TYPE_UNSPECIFIED",
Self::ChildLinkedSpan => "CHILD_LINKED_SPAN",
Self::ParentLinkedSpan => "PARENT_LINKED_SPAN",
}
}
/// Creates an enum from field names used in the ProtoBuf definition.
Expand Down Expand Up @@ -320,12 +320,12 @@ pub mod span {
/// (if the ProtoBuf definition does not change) and safe for programmatic use.
pub fn as_str_name(&self) -> &'static str {
match self {
SpanKind::Unspecified => "SPAN_KIND_UNSPECIFIED",
SpanKind::Internal => "INTERNAL",
SpanKind::Server => "SERVER",
SpanKind::Client => "CLIENT",
SpanKind::Producer => "PRODUCER",
SpanKind::Consumer => "CONSUMER",
Self::Unspecified => "SPAN_KIND_UNSPECIFIED",
Self::Internal => "INTERNAL",
Self::Server => "SERVER",
Self::Client => "CLIENT",
Self::Producer => "PRODUCER",
Self::Consumer => "CONSUMER",
}
}
/// Creates an enum from field names used in the ProtoBuf definition.
Expand Down Expand Up @@ -472,7 +472,13 @@ pub struct BatchWriteSpansRequest {
}
/// Generated client implementations.
pub mod trace_service_client {
#![allow(unused_variables, dead_code, missing_docs, clippy::let_unit_value)]
#![allow(
unused_variables,
dead_code,
missing_docs,
clippy::wildcard_imports,
clippy::let_unit_value
)]
use tonic::codegen::http::Uri;
use tonic::codegen::*;
/// Service for collecting and viewing traces and spans within a trace.
Expand Down Expand Up @@ -568,10 +574,7 @@ pub mod trace_service_client {
request: impl tonic::IntoRequest<super::BatchWriteSpansRequest>,
) -> std::result::Result<tonic::Response<()>, tonic::Status> {
self.inner.ready().await.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
tonic::Status::unknown(format!("Service was not ready: {}", e.into()))
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
Expand All @@ -590,10 +593,7 @@ pub mod trace_service_client {
request: impl tonic::IntoRequest<super::Span>,
) -> std::result::Result<tonic::Response<super::Span>, tonic::Status> {
self.inner.ready().await.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
tonic::Status::unknown(format!("Service was not ready: {}", e.into()))
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
Expand Down
18 changes: 9 additions & 9 deletions opentelemetry-stackdriver/src/proto/logging/type.rs
Original file line number Diff line number Diff line change
Expand Up @@ -113,15 +113,15 @@ impl LogSeverity {
/// (if the ProtoBuf definition does not change) and safe for programmatic use.
pub fn as_str_name(&self) -> &'static str {
match self {
LogSeverity::Default => "DEFAULT",
LogSeverity::Debug => "DEBUG",
LogSeverity::Info => "INFO",
LogSeverity::Notice => "NOTICE",
LogSeverity::Warning => "WARNING",
LogSeverity::Error => "ERROR",
LogSeverity::Critical => "CRITICAL",
LogSeverity::Alert => "ALERT",
LogSeverity::Emergency => "EMERGENCY",
Self::Default => "DEFAULT",
Self::Debug => "DEBUG",
Self::Info => "INFO",
Self::Notice => "NOTICE",
Self::Warning => "WARNING",
Self::Error => "ERROR",
Self::Critical => "CRITICAL",
Self::Alert => "ALERT",
Self::Emergency => "EMERGENCY",
}
}
/// Creates an enum from field names used in the ProtoBuf definition.
Expand Down
44 changes: 16 additions & 28 deletions opentelemetry-stackdriver/src/proto/logging/v2.rs
Original file line number Diff line number Diff line change
Expand Up @@ -594,9 +594,9 @@ pub mod tail_log_entries_response {
/// (if the ProtoBuf definition does not change) and safe for programmatic use.
pub fn as_str_name(&self) -> &'static str {
match self {
Reason::Unspecified => "REASON_UNSPECIFIED",
Reason::RateLimit => "RATE_LIMIT",
Reason::NotConsumed => "NOT_CONSUMED",
Self::Unspecified => "REASON_UNSPECIFIED",
Self::RateLimit => "RATE_LIMIT",
Self::NotConsumed => "NOT_CONSUMED",
}
}
/// Creates an enum from field names used in the ProtoBuf definition.
Expand All @@ -613,7 +613,13 @@ pub mod tail_log_entries_response {
}
/// Generated client implementations.
pub mod logging_service_v2_client {
#![allow(unused_variables, dead_code, missing_docs, clippy::let_unit_value)]
#![allow(
unused_variables,
dead_code,
missing_docs,
clippy::wildcard_imports,
clippy::let_unit_value
)]
use tonic::codegen::http::Uri;
use tonic::codegen::*;
/// Service for ingesting and querying logs.
Expand Down Expand Up @@ -705,10 +711,7 @@ pub mod logging_service_v2_client {
request: impl tonic::IntoRequest<super::DeleteLogRequest>,
) -> std::result::Result<tonic::Response<()>, tonic::Status> {
self.inner.ready().await.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
tonic::Status::unknown(format!("Service was not ready: {}", e.into()))
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
Expand All @@ -734,10 +737,7 @@ pub mod logging_service_v2_client {
) -> std::result::Result<tonic::Response<super::WriteLogEntriesResponse>, tonic::Status>
{
self.inner.ready().await.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
tonic::Status::unknown(format!("Service was not ready: {}", e.into()))
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
Expand All @@ -760,10 +760,7 @@ pub mod logging_service_v2_client {
) -> std::result::Result<tonic::Response<super::ListLogEntriesResponse>, tonic::Status>
{
self.inner.ready().await.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
tonic::Status::unknown(format!("Service was not ready: {}", e.into()))
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
Expand All @@ -785,10 +782,7 @@ pub mod logging_service_v2_client {
tonic::Status,
> {
self.inner.ready().await.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
tonic::Status::unknown(format!("Service was not ready: {}", e.into()))
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
Expand All @@ -808,10 +802,7 @@ pub mod logging_service_v2_client {
request: impl tonic::IntoRequest<super::ListLogsRequest>,
) -> std::result::Result<tonic::Response<super::ListLogsResponse>, tonic::Status> {
self.inner.ready().await.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
tonic::Status::unknown(format!("Service was not ready: {}", e.into()))
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
Expand All @@ -834,10 +825,7 @@ pub mod logging_service_v2_client {
tonic::Status,
> {
self.inner.ready().await.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
tonic::Status::unknown(format!("Service was not ready: {}", e.into()))
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
Expand Down
2 changes: 1 addition & 1 deletion opentelemetry-stackdriver/tests/generate.rs
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ fn generated_code_is_fresh() {
.build_client(true)
.build_server(false)
.out_dir(&tmp_dir)
.compile(&schemas, &["proto"])
.compile_protos(&schemas, &["proto"])
.unwrap();

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

0 comments on commit ad208a1

Please sign in to comment.