From 1594c6e980daa9f472815629d4b3e28ac15c6b75 Mon Sep 17 00:00:00 2001 From: Lalit Kumar Bhasin Date: Mon, 30 Sep 2024 15:32:05 -0700 Subject: [PATCH 1/6] commit --- opentelemetry-stackdriver/CHANGELOG.md | 3 +++ opentelemetry-stackdriver/Cargo.toml | 8 ++++---- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/opentelemetry-stackdriver/CHANGELOG.md b/opentelemetry-stackdriver/CHANGELOG.md index ee83f1bd..5b36355d 100644 --- a/opentelemetry-stackdriver/CHANGELOG.md +++ b/opentelemetry-stackdriver/CHANGELOG.md @@ -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 diff --git a/opentelemetry-stackdriver/Cargo.toml b/opentelemetry-stackdriver/Cargo.toml index 90a6230e..c0e82c7a 100644 --- a/opentelemetry-stackdriver/Cargo.toml +++ b/opentelemetry-stackdriver/Cargo.toml @@ -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" @@ -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" From d2ca8707193ef4a49178aaf5789a161fb88f7aec Mon Sep 17 00:00:00 2001 From: Lalit Kumar Bhasin Date: Mon, 30 Sep 2024 15:37:08 -0700 Subject: [PATCH 2/6] lint error --- opentelemetry-stackdriver/tests/generate.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/opentelemetry-stackdriver/tests/generate.rs b/opentelemetry-stackdriver/tests/generate.rs index 65a62506..c138ab41 100644 --- a/opentelemetry-stackdriver/tests/generate.rs +++ b/opentelemetry-stackdriver/tests/generate.rs @@ -56,7 +56,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. From 619a8296bd950c7e7ee54409e299d04e8a1f733c Mon Sep 17 00:00:00 2001 From: Lalit Kumar Bhasin Date: Mon, 30 Sep 2024 15:55:26 -0700 Subject: [PATCH 3/6] regenerte protos --- opentelemetry-stackdriver/src/proto/api.rs | 24 ------------------- .../src/proto/devtools/cloudtrace/v2.rs | 17 ------------- .../src/proto/logging/type.rs | 1 - .../src/proto/logging/v2.rs | 18 -------------- opentelemetry-stackdriver/src/proto/rpc.rs | 1 - 5 files changed, 61 deletions(-) diff --git a/opentelemetry-stackdriver/src/proto/api.rs b/opentelemetry-stackdriver/src/proto/api.rs index 4c849645..047fda77 100644 --- a/opentelemetry-stackdriver/src/proto/api.rs +++ b/opentelemetry-stackdriver/src/proto/api.rs @@ -2,7 +2,6 @@ /// Defines the HTTP configuration for an API service. It contains a list of /// [HttpRule][google.api.HttpRule], each specifying the mapping of an RPC method /// to one or more HTTP REST API methods. -#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct Http { /// A list of HTTP configuration rules that apply to individual API methods. @@ -283,7 +282,6 @@ pub struct Http { /// If an API needs to use a JSON array for request or response body, it can map /// the request or response body to a repeated field. However, some gRPC /// Transcoding implementations may not support this feature. -#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct HttpRule { /// Selects a method to which this rule applies. @@ -324,7 +322,6 @@ pub mod http_rule { /// Determines the URL pattern is matched by this rules. This pattern can be /// used with any of the {get|put|post|delete|patch} methods. A custom method /// can be defined using the 'custom' field. - #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Oneof)] pub enum Pattern { /// Maps to HTTP GET. Used for listing and getting information about @@ -352,7 +349,6 @@ pub mod http_rule { } } /// A custom pattern is used for defining custom HTTP verb. -#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct CustomHttpPattern { /// The name of this custom HTTP verb. @@ -438,7 +434,6 @@ impl LaunchStage { } } /// Required information for every language. -#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct CommonLanguageSettings { /// Link to automatically generated reference documentation. Example: @@ -451,7 +446,6 @@ pub struct CommonLanguageSettings { pub destinations: ::prost::alloc::vec::Vec, } /// Details about how and where to publish client libraries. -#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct ClientLibrarySettings { /// Version of the API to apply these settings to. This is the full protobuf @@ -494,7 +488,6 @@ pub struct ClientLibrarySettings { /// This message configures the settings for publishing [Google Cloud Client /// libraries]() /// generated from the service config. -#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct Publishing { /// A list of API method settings, e.g. the behavior for methods that use the @@ -543,7 +536,6 @@ pub struct Publishing { pub rest_reference_documentation_uri: ::prost::alloc::string::String, } /// Settings for Java client libraries. -#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct JavaSettings { /// The package name to use in Java. Clobbers the java_package option @@ -581,7 +573,6 @@ pub struct JavaSettings { pub common: ::core::option::Option, } /// Settings for C++ client libraries. -#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct CppSettings { /// Some settings. @@ -589,7 +580,6 @@ pub struct CppSettings { pub common: ::core::option::Option, } /// Settings for Php client libraries. -#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct PhpSettings { /// Some settings. @@ -597,7 +587,6 @@ pub struct PhpSettings { pub common: ::core::option::Option, } /// Settings for Python client libraries. -#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct PythonSettings { /// Some settings. @@ -612,7 +601,6 @@ pub mod python_settings { /// Experimental features to be included during client library generation. /// These fields will be deprecated once the feature graduates and is enabled /// by default. - #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, Copy, PartialEq, ::prost::Message)] pub struct ExperimentalFeatures { /// Enables generation of asynchronous REST clients if `rest` transport is @@ -624,7 +612,6 @@ pub mod python_settings { } } /// Settings for Node client libraries. -#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct NodeSettings { /// Some settings. @@ -632,7 +619,6 @@ pub struct NodeSettings { pub common: ::core::option::Option, } /// Settings for Dotnet client libraries. -#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct DotnetSettings { /// Some settings. @@ -672,7 +658,6 @@ pub struct DotnetSettings { pub handwritten_signatures: ::prost::alloc::vec::Vec<::prost::alloc::string::String>, } /// Settings for Ruby client libraries. -#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct RubySettings { /// Some settings. @@ -680,7 +665,6 @@ pub struct RubySettings { pub common: ::core::option::Option, } /// Settings for Go client libraries. -#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct GoSettings { /// Some settings. @@ -688,7 +672,6 @@ pub struct GoSettings { pub common: ::core::option::Option, } /// Describes the generator configuration for a method. -#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct MethodSettings { /// The fully qualified name of the method, for which the options below apply. @@ -739,7 +722,6 @@ pub mod method_settings { /// All default values below are from those used in the client library /// generators (e.g. /// [Java]()). - #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, Copy, PartialEq, ::prost::Message)] pub struct LongRunning { /// Initial delay after which the first poll request will be made. @@ -987,7 +969,6 @@ impl FieldBehavior { /// pattern: "folders/{folder}/logs/{log}" /// pattern: "organizations/{organization}/logs/{log}" /// pattern: "billingAccounts/{billing_account}/logs/{log}" -#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct ResourceDescriptor { /// The resource type. It must be in the format of @@ -1148,7 +1129,6 @@ pub mod resource_descriptor { } /// Defines a proto annotation that describes a string field that refers to /// an API resource. -#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct ResourceReference { /// The resource type that the annotated field references. @@ -1188,7 +1168,6 @@ pub struct ResourceReference { pub child_type: ::prost::alloc::string::String, } /// A description of a label. -#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct LabelDescriptor { /// The label key. @@ -1248,7 +1227,6 @@ pub mod label_descriptor { /// provide a `list` method that returns the monitored resource descriptors used /// by the API. /// -#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct MonitoredResourceDescriptor { /// Optional. The resource name of the monitored resource descriptor: @@ -1302,7 +1280,6 @@ pub struct MonitoredResourceDescriptor { /// "labels": { "project_id": "my-project", /// "instance_id": "12345678901234", /// "zone": "us-central1-a" }} -#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct MonitoredResource { /// Required. The monitored resource type. This field must match @@ -1327,7 +1304,6 @@ pub struct MonitoredResource { /// instance. There is some other useful auxiliary metadata. Monitoring and /// Logging use an ingestion pipeline to extract metadata for cloud resources of /// all types, and store the metadata in this message. -#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct MonitoredResourceMetadata { /// Output only. Values for predefined system metadata labels. diff --git a/opentelemetry-stackdriver/src/proto/devtools/cloudtrace/v2.rs b/opentelemetry-stackdriver/src/proto/devtools/cloudtrace/v2.rs index 5f258b4b..4fc7fdd2 100644 --- a/opentelemetry-stackdriver/src/proto/devtools/cloudtrace/v2.rs +++ b/opentelemetry-stackdriver/src/proto/devtools/cloudtrace/v2.rs @@ -7,7 +7,6 @@ /// A trace can also contain multiple root spans, or none at all. /// Spans do not need to be contiguous. There might be /// gaps or overlaps between spans in a trace. -#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct Span { /// Required. The resource name of the span in the following format: @@ -86,7 +85,6 @@ pub struct Span { /// Nested message and enum types in `Span`. pub mod span { /// A set of attributes as key-value pairs. - #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct Attributes { /// A set of attributes. Each attribute's key can be up to 128 bytes @@ -106,7 +104,6 @@ pub mod span { pub dropped_attributes_count: i32, } /// A time-stamped annotation or message event in the Span. - #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct TimeEvent { /// The timestamp indicating the time the event occurred. @@ -120,7 +117,6 @@ pub mod span { /// Nested message and enum types in `TimeEvent`. pub mod time_event { /// Text annotation with a set of attributes. - #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct Annotation { /// A user-supplied message describing the event. The maximum length for @@ -133,7 +129,6 @@ pub mod span { pub attributes: ::core::option::Option, } /// An event describing a message sent/received between Spans. - #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, Copy, PartialEq, ::prost::Message)] pub struct MessageEvent { /// Type of MessageEvent. Indicates whether the message was sent or @@ -193,7 +188,6 @@ pub mod span { } /// A `TimeEvent` can contain either an `Annotation` object or a /// `MessageEvent` object, but not both. - #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Oneof)] pub enum Value { /// Text annotation with a set of attributes. @@ -207,7 +201,6 @@ pub mod span { /// A collection of `TimeEvent`s. A `TimeEvent` is a time-stamped annotation /// on the span, consisting of either user-supplied key:value pairs, or /// details of a message sent/received between Spans. - #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct TimeEvents { /// A collection of `TimeEvent`s. @@ -226,7 +219,6 @@ pub mod span { /// different trace. For example, this can be used in batching operations, /// where a single batch handler processes multiple requests from different /// traces or when the handler receives a request from a different project. - #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct Link { /// The `\[TRACE_ID\]` for a trace within a project. @@ -284,7 +276,6 @@ pub mod span { } /// A collection of links, which are references from this span to a span /// in the same or different trace. - #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct Links { /// A collection of links. @@ -352,7 +343,6 @@ pub mod span { } } /// The allowed types for `\[VALUE\]` in a `\[KEY\]:[VALUE]` attribute. -#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct AttributeValue { /// The type of the value. @@ -362,7 +352,6 @@ pub struct AttributeValue { /// Nested message and enum types in `AttributeValue`. pub mod attribute_value { /// The type of the value. - #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Oneof)] pub enum Value { /// A string up to 256 bytes long. @@ -377,7 +366,6 @@ pub mod attribute_value { } } /// A call stack appearing in a trace. -#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct StackTrace { /// Stack frames in this stack trace. A maximum of 128 frames are allowed. @@ -398,7 +386,6 @@ pub struct StackTrace { /// Nested message and enum types in `StackTrace`. pub mod stack_trace { /// Represents a single stack frame in a stack trace. - #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct StackFrame { /// The fully-qualified name that uniquely identifies the function or @@ -430,7 +417,6 @@ pub mod stack_trace { pub source_version: ::core::option::Option, } /// A collection of stack frames, which can be truncated. - #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct StackFrames { /// Stack frames in this call stack. @@ -444,7 +430,6 @@ pub mod stack_trace { } } /// Binary module. -#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct Module { /// For example: main binary, kernel modules, and dynamic libraries @@ -457,7 +442,6 @@ pub struct Module { pub build_id: ::core::option::Option, } /// Represents a string that might be shortened to a specified length. -#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct TruncatableString { /// The shortened string. For example, if the original string is 500 @@ -475,7 +459,6 @@ pub struct TruncatableString { pub truncated_byte_count: i32, } /// The request message for the `BatchWriteSpans` method. -#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct BatchWriteSpansRequest { /// Required. The name of the project where the spans belong. The format is diff --git a/opentelemetry-stackdriver/src/proto/logging/type.rs b/opentelemetry-stackdriver/src/proto/logging/type.rs index 2f239634..41430639 100644 --- a/opentelemetry-stackdriver/src/proto/logging/type.rs +++ b/opentelemetry-stackdriver/src/proto/logging/type.rs @@ -2,7 +2,6 @@ /// A common proto for logging HTTP requests. Only contains semantics /// defined by the HTTP specification. Product-specific logging /// information MUST be defined in a separate message. -#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct HttpRequest { /// The request method. Examples: `"GET"`, `"HEAD"`, `"PUT"`, `"POST"`. diff --git a/opentelemetry-stackdriver/src/proto/logging/v2.rs b/opentelemetry-stackdriver/src/proto/logging/v2.rs index 85f1b7ee..ae2168a7 100644 --- a/opentelemetry-stackdriver/src/proto/logging/v2.rs +++ b/opentelemetry-stackdriver/src/proto/logging/v2.rs @@ -1,6 +1,5 @@ // This file is @generated by prost-build. /// An individual entry in a log. -#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct LogEntry { /// Required. The resource name of the log to which this log entry belongs: @@ -161,7 +160,6 @@ pub struct LogEntry { /// Nested message and enum types in `LogEntry`. pub mod log_entry { /// The log entry payload, which can be one of multiple types. - #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Oneof)] pub enum Payload { /// The log entry payload, represented as a protocol buffer. Some Google @@ -185,7 +183,6 @@ pub mod log_entry { } /// Additional information about a potentially long-running operation with which /// a log entry is associated. -#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct LogEntryOperation { /// Optional. An arbitrary operation identifier. Log entries with the same @@ -206,7 +203,6 @@ pub struct LogEntryOperation { } /// Additional information about the source code location that produced the log /// entry. -#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct LogEntrySourceLocation { /// Optional. Source file name. Depending on the runtime environment, this @@ -229,7 +225,6 @@ pub struct LogEntrySourceLocation { /// Additional information used to correlate multiple log entries. Used when a /// single LogEntry would exceed the Google Cloud Logging size limit and is /// split across multiple log entries. -#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct LogSplit { /// A globally unique identifier for all log entries in a sequence of split log @@ -247,7 +242,6 @@ pub struct LogSplit { pub total_splits: i32, } /// The parameters to DeleteLog. -#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct DeleteLogRequest { /// Required. The resource name of the log to delete: @@ -267,7 +261,6 @@ pub struct DeleteLogRequest { pub log_name: ::prost::alloc::string::String, } /// The parameters to WriteLogEntries. -#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct WriteLogEntriesRequest { /// Optional. A default log resource name that is assigned to all log entries @@ -348,11 +341,9 @@ pub struct WriteLogEntriesRequest { pub dry_run: bool, } /// Result returned from WriteLogEntries. -#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, Copy, PartialEq, ::prost::Message)] pub struct WriteLogEntriesResponse {} /// Error details for WriteLogEntries with partial success. -#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct WriteLogEntriesPartialErrors { /// When `WriteLogEntriesRequest.partial_success` is true, records the error @@ -365,7 +356,6 @@ pub struct WriteLogEntriesPartialErrors { pub log_entry_errors: ::std::collections::HashMap, } /// The parameters to `ListLogEntries`. -#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct ListLogEntriesRequest { /// Required. Names of one or more parent resources from which to @@ -416,7 +406,6 @@ pub struct ListLogEntriesRequest { pub page_token: ::prost::alloc::string::String, } /// Result returned from `ListLogEntries`. -#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct ListLogEntriesResponse { /// A list of log entries. If `entries` is empty, `nextPageToken` may still be @@ -438,7 +427,6 @@ pub struct ListLogEntriesResponse { pub next_page_token: ::prost::alloc::string::String, } /// The parameters to ListMonitoredResourceDescriptors -#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct ListMonitoredResourceDescriptorsRequest { /// Optional. The maximum number of results to return from this request. @@ -454,7 +442,6 @@ pub struct ListMonitoredResourceDescriptorsRequest { pub page_token: ::prost::alloc::string::String, } /// Result returned from ListMonitoredResourceDescriptors. -#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct ListMonitoredResourceDescriptorsResponse { /// A list of resource descriptors. @@ -468,7 +455,6 @@ pub struct ListMonitoredResourceDescriptorsResponse { pub next_page_token: ::prost::alloc::string::String, } /// The parameters to ListLogs. -#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct ListLogsRequest { /// Required. The resource name to list logs for: @@ -509,7 +495,6 @@ pub struct ListLogsRequest { pub page_token: ::prost::alloc::string::String, } /// Result returned from ListLogs. -#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct ListLogsResponse { /// A list of log names. For example, @@ -524,7 +509,6 @@ pub struct ListLogsResponse { pub next_page_token: ::prost::alloc::string::String, } /// The parameters to `TailLogEntries`. -#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct TailLogEntriesRequest { /// Required. Name of a parent resource from which to retrieve log entries: @@ -557,7 +541,6 @@ pub struct TailLogEntriesRequest { pub buffer_window: ::core::option::Option<::prost_types::Duration>, } /// Result returned from `TailLogEntries`. -#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct TailLogEntriesResponse { /// A list of log entries. Each response in the stream will order entries with @@ -576,7 +559,6 @@ pub struct TailLogEntriesResponse { /// Nested message and enum types in `TailLogEntriesResponse`. pub mod tail_log_entries_response { /// Information about entries that were omitted from the session. - #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, Copy, PartialEq, ::prost::Message)] pub struct SuppressionInfo { /// The reason that entries were omitted from the session. diff --git a/opentelemetry-stackdriver/src/proto/rpc.rs b/opentelemetry-stackdriver/src/proto/rpc.rs index 3c6f5f40..fe27d475 100644 --- a/opentelemetry-stackdriver/src/proto/rpc.rs +++ b/opentelemetry-stackdriver/src/proto/rpc.rs @@ -6,7 +6,6 @@ /// /// You can find out more about this error model and how to work with it in the /// [API Design Guide](). -#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct Status { /// The status code, which should be an enum value of From b82045e8e51dc788f0982a4115b5de6a5e595660 Mon Sep 17 00:00:00 2001 From: Lalit Kumar Bhasin Date: Mon, 30 Sep 2024 16:04:06 -0700 Subject: [PATCH 4/6] regenerate --- opentelemetry-stackdriver/src/proto/api.rs | 72 +++++++++---------- .../src/proto/devtools/cloudtrace/v2.rs | 42 +++++------ .../src/proto/logging/type.rs | 18 ++--- .../src/proto/logging/v2.rs | 44 +++++------- 4 files changed, 82 insertions(+), 94 deletions(-) diff --git a/opentelemetry-stackdriver/src/proto/api.rs b/opentelemetry-stackdriver/src/proto/api.rs index 047fda77..f0a744b1 100644 --- a/opentelemetry-stackdriver/src/proto/api.rs +++ b/opentelemetry-stackdriver/src/proto/api.rs @@ -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. @@ -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. @@ -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. @@ -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. @@ -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. @@ -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. @@ -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. diff --git a/opentelemetry-stackdriver/src/proto/devtools/cloudtrace/v2.rs b/opentelemetry-stackdriver/src/proto/devtools/cloudtrace/v2.rs index 4fc7fdd2..f03abc27 100644 --- a/opentelemetry-stackdriver/src/proto/devtools/cloudtrace/v2.rs +++ b/opentelemetry-stackdriver/src/proto/devtools/cloudtrace/v2.rs @@ -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. @@ -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. @@ -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. @@ -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. @@ -568,10 +574,7 @@ pub mod trace_service_client { request: impl tonic::IntoRequest, ) -> std::result::Result, 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( @@ -590,10 +593,7 @@ pub mod trace_service_client { request: impl tonic::IntoRequest, ) -> std::result::Result, 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( diff --git a/opentelemetry-stackdriver/src/proto/logging/type.rs b/opentelemetry-stackdriver/src/proto/logging/type.rs index 41430639..93a3b8d6 100644 --- a/opentelemetry-stackdriver/src/proto/logging/type.rs +++ b/opentelemetry-stackdriver/src/proto/logging/type.rs @@ -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. diff --git a/opentelemetry-stackdriver/src/proto/logging/v2.rs b/opentelemetry-stackdriver/src/proto/logging/v2.rs index ae2168a7..b76e9ff1 100644 --- a/opentelemetry-stackdriver/src/proto/logging/v2.rs +++ b/opentelemetry-stackdriver/src/proto/logging/v2.rs @@ -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. @@ -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. @@ -705,10 +711,7 @@ pub mod logging_service_v2_client { request: impl tonic::IntoRequest, ) -> std::result::Result, 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( @@ -734,10 +737,7 @@ pub mod logging_service_v2_client { ) -> std::result::Result, 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( @@ -760,10 +760,7 @@ pub mod logging_service_v2_client { ) -> std::result::Result, 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( @@ -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( @@ -808,10 +802,7 @@ pub mod logging_service_v2_client { request: impl tonic::IntoRequest, ) -> std::result::Result, 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( @@ -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( From 52816c8b7b405e7273de8f43f9d40deebd69466b Mon Sep 17 00:00:00 2001 From: Lalit Kumar Bhasin Date: Mon, 30 Sep 2024 16:12:32 -0700 Subject: [PATCH 5/6] update dependency --- opentelemetry-stackdriver/Cargo.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/opentelemetry-stackdriver/Cargo.toml b/opentelemetry-stackdriver/Cargo.toml index c0e82c7a..ffee756e 100644 --- a/opentelemetry-stackdriver/Cargo.toml +++ b/opentelemetry-stackdriver/Cargo.toml @@ -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 = { features = ["testing"] } From 438371d3c86031383c9682d476a50ba129eb0b16 Mon Sep 17 00:00:00 2001 From: Lalit Kumar Bhasin Date: Mon, 30 Sep 2024 16:14:12 -0700 Subject: [PATCH 6/6] use workspace --- opentelemetry-stackdriver/Cargo.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/opentelemetry-stackdriver/Cargo.toml b/opentelemetry-stackdriver/Cargo.toml index ffee756e..716d7f28 100644 --- a/opentelemetry-stackdriver/Cargo.toml +++ b/opentelemetry-stackdriver/Cargo.toml @@ -42,4 +42,4 @@ tokio = "1" tonic-build = "0.12" walkdir = "2.3.2" futures-util = { version = "0.3", default-features = false } -opentelemetry = { features = ["testing"] } +opentelemetry = { workspace = true, features = ["testing"] }