From 592e77a8f323fe5c490de9eab458b7e40e9c437b Mon Sep 17 00:00:00 2001 From: Dirkjan Ochtman Date: Tue, 14 Mar 2023 05:40:24 +0100 Subject: [PATCH] stackdriver: update gRPC schemas (#992) --- .../proto/google/api/client.proto | 250 +++++++++ .../proto/google/api/launch_stage.proto | 6 +- .../proto/google/api/monitored_resource.proto | 11 +- .../google/devtools/cloudtrace/v2/trace.proto | 94 ++-- .../devtools/cloudtrace/v2/tracing.proto | 18 +- .../proto/google/rpc/status.proto | 8 +- opentelemetry-stackdriver/src/proto/api.rs | 484 +++++++++++++++--- .../src/proto/devtools/cloudtrace/v2.rs | 96 ++-- opentelemetry-stackdriver/src/proto/rpc.rs | 6 +- 9 files changed, 792 insertions(+), 181 deletions(-) diff --git a/opentelemetry-stackdriver/proto/google/api/client.proto b/opentelemetry-stackdriver/proto/google/api/client.proto index 3b3fd0c401..227ccf3a53 100644 --- a/opentelemetry-stackdriver/proto/google/api/client.proto +++ b/opentelemetry-stackdriver/proto/google/api/client.proto @@ -16,7 +16,9 @@ syntax = "proto3"; package google.api; +import "google/api/launch_stage.proto"; import "google/protobuf/descriptor.proto"; +import "google/protobuf/duration.proto"; option go_package = "google.golang.org/genproto/googleapis/api/annotations;annotations"; option java_multiple_files = true; @@ -97,3 +99,251 @@ extend google.protobuf.ServiceOptions { // } string oauth_scopes = 1050; } + +// Required information for every language. +message CommonLanguageSettings { + // Link to automatically generated reference documentation. Example: + // https://cloud.google.com/nodejs/docs/reference/asset/latest + string reference_docs_uri = 1 [deprecated = true]; + + // The destination where API teams want this client library to be published. + repeated ClientLibraryDestination destinations = 2; +} + +// Details about how and where to publish client libraries. +message ClientLibrarySettings { + // Version of the API to apply these settings to. + string version = 1; + + // Launch stage of this version of the API. + LaunchStage launch_stage = 2; + + // When using transport=rest, the client request will encode enums as + // numbers rather than strings. + bool rest_numeric_enums = 3; + + // Settings for legacy Java features, supported in the Service YAML. + JavaSettings java_settings = 21; + + // Settings for C++ client libraries. + CppSettings cpp_settings = 22; + + // Settings for PHP client libraries. + PhpSettings php_settings = 23; + + // Settings for Python client libraries. + PythonSettings python_settings = 24; + + // Settings for Node client libraries. + NodeSettings node_settings = 25; + + // Settings for .NET client libraries. + DotnetSettings dotnet_settings = 26; + + // Settings for Ruby client libraries. + RubySettings ruby_settings = 27; + + // Settings for Go client libraries. + GoSettings go_settings = 28; +} + +// This message configures the settings for publishing [Google Cloud Client +// libraries](https://cloud.google.com/apis/docs/cloud-client-libraries) +// generated from the service config. +message Publishing { + // A list of API method settings, e.g. the behavior for methods that use the + // long-running operation pattern. + repeated MethodSettings method_settings = 2; + + // Link to a place that API users can report issues. Example: + // https://issuetracker.google.com/issues/new?component=190865&template=1161103 + string new_issue_uri = 101; + + // Link to product home page. Example: + // https://cloud.google.com/asset-inventory/docs/overview + string documentation_uri = 102; + + // Used as a tracking tag when collecting data about the APIs developer + // relations artifacts like docs, packages delivered to package managers, + // etc. Example: "speech". + string api_short_name = 103; + + // GitHub label to apply to issues and pull requests opened for this API. + string github_label = 104; + + // GitHub teams to be added to CODEOWNERS in the directory in GitHub + // containing source code for the client libraries for this API. + repeated string codeowner_github_teams = 105; + + // A prefix used in sample code when demarking regions to be included in + // documentation. + string doc_tag_prefix = 106; + + // For whom the client library is being published. + ClientLibraryOrganization organization = 107; + + // Client library settings. If the same version string appears multiple + // times in this list, then the last one wins. Settings from earlier + // settings with the same version string are discarded. + repeated ClientLibrarySettings library_settings = 109; +} + +// Settings for Java client libraries. +message JavaSettings { + // The package name to use in Java. Clobbers the java_package option + // set in the protobuf. This should be used **only** by APIs + // who have already set the language_settings.java.package_name" field + // in gapic.yaml. API teams should use the protobuf java_package option + // where possible. + // + // Example of a YAML configuration:: + // + // publishing: + // java_settings: + // library_package: com.google.cloud.pubsub.v1 + string library_package = 1; + + // Configure the Java class name to use instead of the service's for its + // corresponding generated GAPIC client. Keys are fully-qualified + // service names as they appear in the protobuf (including the full + // the language_settings.java.interface_names" field in gapic.yaml. API + // teams should otherwise use the service name as it appears in the + // protobuf. + // + // Example of a YAML configuration:: + // + // publishing: + // java_settings: + // service_class_names: + // - google.pubsub.v1.Publisher: TopicAdmin + // - google.pubsub.v1.Subscriber: SubscriptionAdmin + map service_class_names = 2; + + // Some settings. + CommonLanguageSettings common = 3; +} + +// Settings for C++ client libraries. +message CppSettings { + // Some settings. + CommonLanguageSettings common = 1; +} + +// Settings for Php client libraries. +message PhpSettings { + // Some settings. + CommonLanguageSettings common = 1; +} + +// Settings for Python client libraries. +message PythonSettings { + // Some settings. + CommonLanguageSettings common = 1; +} + +// Settings for Node client libraries. +message NodeSettings { + // Some settings. + CommonLanguageSettings common = 1; +} + +// Settings for Dotnet client libraries. +message DotnetSettings { + // Some settings. + CommonLanguageSettings common = 1; +} + +// Settings for Ruby client libraries. +message RubySettings { + // Some settings. + CommonLanguageSettings common = 1; +} + +// Settings for Go client libraries. +message GoSettings { + // Some settings. + CommonLanguageSettings common = 1; +} + +// Describes the generator configuration for a method. +message MethodSettings { + // Describes settings to use when generating API methods that use the + // long-running operation pattern. + // All default values below are from those used in the client library + // generators (e.g. + // [Java](https://github.com/googleapis/gapic-generator-java/blob/04c2faa191a9b5a10b92392fe8482279c4404803/src/main/java/com/google/api/generator/gapic/composer/common/RetrySettingsComposer.java)). + message LongRunning { + // Initial delay after which the first poll request will be made. + // Default value: 5 seconds. + google.protobuf.Duration initial_poll_delay = 1; + + // Multiplier to gradually increase delay between subsequent polls until it + // reaches max_poll_delay. + // Default value: 1.5. + float poll_delay_multiplier = 2; + + // Maximum time between two subsequent poll requests. + // Default value: 45 seconds. + google.protobuf.Duration max_poll_delay = 3; + + // Total polling timeout. + // Default value: 5 minutes. + google.protobuf.Duration total_poll_timeout = 4; + } + + // The fully qualified name of the method, for which the options below apply. + // This is used to find the method to apply the options. + string selector = 1; + + // Describes settings to use for long-running operations when generating + // API methods for RPCs. Complements RPCs that use the annotations in + // google/longrunning/operations.proto. + // + // Example of a YAML configuration:: + // + // publishing: + // method_behavior: + // - selector: CreateAdDomain + // long_running: + // initial_poll_delay: + // seconds: 60 # 1 minute + // poll_delay_multiplier: 1.5 + // max_poll_delay: + // seconds: 360 # 6 minutes + // total_poll_timeout: + // seconds: 54000 # 90 minutes + LongRunning long_running = 2; +} + +// The organization for which the client libraries are being published. +// Affects the url where generated docs are published, etc. +enum ClientLibraryOrganization { + // Not useful. + CLIENT_LIBRARY_ORGANIZATION_UNSPECIFIED = 0; + + // Google Cloud Platform Org. + CLOUD = 1; + + // Ads (Advertising) Org. + ADS = 2; + + // Photos Org. + PHOTOS = 3; + + // Street View Org. + STREET_VIEW = 4; +} + +// To where should client libraries be published? +enum ClientLibraryDestination { + // Client libraries will neither be generated nor published to package + // managers. + CLIENT_LIBRARY_DESTINATION_UNSPECIFIED = 0; + + // Generate the client library in a repo under github.com/googleapis, + // but don't publish it to package managers. + GITHUB = 10; + + // Publish the library to package managers like nuget.org and npmjs.com. + PACKAGE_MANAGER = 20; +} diff --git a/opentelemetry-stackdriver/proto/google/api/launch_stage.proto b/opentelemetry-stackdriver/proto/google/api/launch_stage.proto index cca8419a96..6524db5756 100644 --- a/opentelemetry-stackdriver/proto/google/api/launch_stage.proto +++ b/opentelemetry-stackdriver/proto/google/api/launch_stage.proto @@ -23,7 +23,7 @@ option java_package = "com.google.api"; option objc_class_prefix = "GAPI"; // The launch stage as defined by [Google Cloud Platform -// Launch Stages](http://cloud.google.com/terms/launch-stages). +// Launch Stages](https://cloud.google.com/terms/launch-stages). enum LaunchStage { // Do not use this default value. LAUNCH_STAGE_UNSPECIFIED = 0; @@ -45,7 +45,7 @@ enum LaunchStage { // for widespread use. By Alpha, all significant design issues are resolved // and we are in the process of verifying functionality. Alpha customers // need to apply for access, agree to applicable terms, and have their - // projects allowlisted. Alpha releases don’t have to be feature complete, + // projects allowlisted. Alpha releases don't have to be feature complete, // no SLAs are provided, and there are no technical support obligations, but // they will be far enough along that customers can actually use them in // test environments or for limited-use tests -- just like they would in @@ -64,7 +64,7 @@ enum LaunchStage { GA = 4; // Deprecated features are scheduled to be shut down and removed. For more - // information, see the “Deprecation Policy” section of our [Terms of + // information, see the "Deprecation Policy" section of our [Terms of // Service](https://cloud.google.com/terms/) // and the [Google Cloud Platform Subject to the Deprecation // Policy](https://cloud.google.com/terms/deprecation) documentation. diff --git a/opentelemetry-stackdriver/proto/google/api/monitored_resource.proto b/opentelemetry-stackdriver/proto/google/api/monitored_resource.proto index bd5be4e4e8..8b97baa104 100644 --- a/opentelemetry-stackdriver/proto/google/api/monitored_resource.proto +++ b/opentelemetry-stackdriver/proto/google/api/monitored_resource.proto @@ -48,6 +48,10 @@ message MonitoredResourceDescriptor { // Required. The monitored resource type. For example, the type // `"cloudsql_database"` represents databases in Google Cloud SQL. + // For a list of types, see [Monitoring resource + // types](https://cloud.google.com/monitoring/api/resources) + // and [Logging resource + // types](https://cloud.google.com/logging/docs/api/v2/resource-list). string type = 1; // Optional. A concise name for the monitored resource type that might be @@ -77,15 +81,18 @@ message MonitoredResourceDescriptor { // its attributes according to the schema. For example, a particular Compute // Engine VM instance could be represented by the following object, because the // [MonitoredResourceDescriptor][google.api.MonitoredResourceDescriptor] for `"gce_instance"` has labels -// `"instance_id"` and `"zone"`: +// `"project_id"`, `"instance_id"` and `"zone"`: // // { "type": "gce_instance", -// "labels": { "instance_id": "12345678901234", +// "labels": { "project_id": "my-project", +// "instance_id": "12345678901234", // "zone": "us-central1-a" }} message MonitoredResource { // Required. The monitored resource type. This field must match // the `type` field of a [MonitoredResourceDescriptor][google.api.MonitoredResourceDescriptor] object. For // example, the type of a Compute Engine VM instance is `gce_instance`. + // Some descriptors include the service name in the type; for example, + // the type of a Datastream stream is `datastream.googleapis.com/Stream`. string type = 1; // Required. Values for all of the labels listed in the associated monitored diff --git a/opentelemetry-stackdriver/proto/google/devtools/cloudtrace/v2/trace.proto b/opentelemetry-stackdriver/proto/google/devtools/cloudtrace/v2/trace.proto index 2a3f1e31df..f2b4b481c6 100644 --- a/opentelemetry-stackdriver/proto/google/devtools/cloudtrace/v2/trace.proto +++ b/opentelemetry-stackdriver/proto/google/devtools/cloudtrace/v2/trace.proto @@ -1,4 +1,4 @@ -// Copyright 2020 Google LLC +// Copyright 2022 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -33,8 +33,10 @@ option ruby_package = "Google::Cloud::Trace::V2"; // A span represents a single operation within a trace. Spans can be // nested to form a trace tree. Often, a trace contains a root span // that describes the end-to-end latency, and one or more subspans for -// its sub-operations. A trace can also contain multiple root spans, -// or none at all. Spans do not need to be contiguous—there may be +// its sub-operations. +// +// 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. message Span { option (google.api.resource) = { @@ -42,11 +44,11 @@ message Span { pattern: "projects/{project}/traces/{trace}/spans/{span}" }; - // A set of attributes, each in the format `[KEY]:[VALUE]`. + // A set of attributes as key-value pairs. message Attributes { - // The set of attributes. Each attribute's key can be up to 128 bytes + // A set of attributes. Each attribute's key can be up to 128 bytes // long. The value can be a string up to 256 bytes, a signed 64-bit integer, - // or the Boolean values `true` and `false`. For example: + // or the boolean values `true` or `false`. For example: // // "/instance_id": { "string_value": { "value": "my-instance" } } // "/http/request_bytes": { "int_value": 300 } @@ -91,15 +93,15 @@ message Span { Type type = 1; // An identifier for the MessageEvent's message that can be used to match - // SENT and RECEIVED MessageEvents. It is recommended to be unique within - // a Span. + // `SENT` and `RECEIVED` MessageEvents. int64 id = 2; // The number of uncompressed bytes sent or received. int64 uncompressed_size_bytes = 3; - // The number of compressed bytes sent or received. If missing assumed to - // be the same size as uncompressed. + // The number of compressed bytes sent or received. If missing, the + // compressed size is assumed to be the same size as the uncompressed + // size. int64 compressed_size_bytes = 4; } @@ -151,17 +153,17 @@ message Span { PARENT_LINKED_SPAN = 2; } - // The [TRACE_ID] for a trace within a project. + // The `[TRACE_ID]` for a trace within a project. string trace_id = 1; - // The [SPAN_ID] for a span within a trace. + // The `[SPAN_ID]` for a span within a trace. string span_id = 2; // The relationship of the current span relative to the linked span. Type type = 3; - // A set of attributes on the link. You have have up to 32 attributes per - // link. + // A set of attributes on the link. Up to 32 attributes can be + // specified per link. Attributes attributes = 4; } @@ -209,40 +211,46 @@ message Span { // Required. The resource name of the span in the following format: // - // projects/[PROJECT_ID]/traces/[TRACE_ID]/spans/[SPAN_ID] + // * `projects/[PROJECT_ID]/traces/[TRACE_ID]/spans/[SPAN_ID]` // - // [TRACE_ID] is a unique identifier for a trace within a project; - // it is a 32-character hexadecimal encoding of a 16-byte array. + // `[TRACE_ID]` is a unique identifier for a trace within a project; + // it is a 32-character hexadecimal encoding of a 16-byte array. It should + // not be zero. // - // [SPAN_ID] is a unique identifier for a span within a trace; it - // is a 16-character hexadecimal encoding of an 8-byte array. + // `[SPAN_ID]` is a unique identifier for a span within a trace; it + // is a 16-character hexadecimal encoding of an 8-byte array. It should not + // be zero. + // . string name = 1 [(google.api.field_behavior) = REQUIRED]; - // Required. The [SPAN_ID] portion of the span's resource name. + // Required. The `[SPAN_ID]` portion of the span's resource name. string span_id = 2 [(google.api.field_behavior) = REQUIRED]; - // The [SPAN_ID] of this span's parent span. If this is a root span, + // The `[SPAN_ID]` of this span's parent span. If this is a root span, // then this field must be empty. string parent_span_id = 3; // Required. A description of the span's operation (up to 128 bytes). - // Stackdriver Trace displays the description in the - // Google Cloud Platform Console. + // Cloud Trace displays the description in the + // Cloud console. // For example, the display name can be a qualified method name or a file name // and a line number where the operation is called. A best practice is to use // the same display name within an application and at the same call point. // This makes it easier to correlate spans in different traces. TruncatableString display_name = 4 [(google.api.field_behavior) = REQUIRED]; - // Required. The start time of the span. On the client side, this is the time kept by - // the local machine where the span execution starts. On the server side, this - // is the time when the server's application handler starts running. - google.protobuf.Timestamp start_time = 5 [(google.api.field_behavior) = REQUIRED]; + // Required. The start time of the span. On the client side, this is the time + // kept by the local machine where the span execution starts. On the server + // side, this is the time when the server's application handler starts + // running. + google.protobuf.Timestamp start_time = 5 + [(google.api.field_behavior) = REQUIRED]; - // Required. The end time of the span. On the client side, this is the time kept by - // the local machine where the span execution ends. On the server side, this - // is the time when the server application handler stops running. - google.protobuf.Timestamp end_time = 6 [(google.api.field_behavior) = REQUIRED]; + // Required. The end time of the span. On the client side, this is the time + // kept by the local machine where the span execution ends. On the server + // side, this is the time when the server application handler stops running. + google.protobuf.Timestamp end_time = 6 + [(google.api.field_behavior) = REQUIRED]; // A set of attributes on the span. You can have up to 32 attributes per // span. @@ -263,21 +271,22 @@ message Span { // Optional. Set this parameter to indicate whether this span is in // the same process as its parent. If you do not set this parameter, - // Stackdriver Trace is unable to take advantage of this helpful - // information. - google.protobuf.BoolValue same_process_as_parent_span = 12 [(google.api.field_behavior) = OPTIONAL]; + // Trace is unable to take advantage of this helpful information. + google.protobuf.BoolValue same_process_as_parent_span = 12 + [(google.api.field_behavior) = OPTIONAL]; // Optional. The number of child spans that were generated while this span // was active. If set, allows implementation to detect missing child spans. - google.protobuf.Int32Value child_span_count = 13 [(google.api.field_behavior) = OPTIONAL]; + google.protobuf.Int32Value child_span_count = 13 + [(google.api.field_behavior) = OPTIONAL]; - // Optional. Distinguishes between spans generated in a particular context. For example, - // two spans with the same name may be distinguished using `CLIENT` (caller) - // and `SERVER` (callee) to identify an RPC call. + // Optional. Distinguishes between spans generated in a particular context. + // For example, two spans with the same name may be distinguished using + // `CLIENT` (caller) and `SERVER` (callee) to identify an RPC call. SpanKind span_kind = 14 [(google.api.field_behavior) = OPTIONAL]; } -// The allowed types for [VALUE] in a `[KEY]:[VALUE]` attribute. +// The allowed types for `[VALUE]` in a `[KEY]:[VALUE]` attribute. message AttributeValue { // The type of the value. oneof value { @@ -300,9 +309,10 @@ message StackTrace { // method that is active in this frame (up to 1024 bytes). TruncatableString function_name = 1; - // An un-mangled function name, if `function_name` is - // [mangled](http://www.avabodh.com/cxxin/namemangling.html). The name can - // be fully-qualified (up to 1024 bytes). + // An un-mangled function name, if `function_name` is mangled. + // To get information about name mangling, run + // [this search](https://www.google.com/search?q=cxx+name+mangling). + // The name can be fully-qualified (up to 1024 bytes). TruncatableString original_function_name = 2; // The name of the source file where the function call appears (up to 256 diff --git a/opentelemetry-stackdriver/proto/google/devtools/cloudtrace/v2/tracing.proto b/opentelemetry-stackdriver/proto/google/devtools/cloudtrace/v2/tracing.proto index 7e91d92d15..0aac221df2 100644 --- a/opentelemetry-stackdriver/proto/google/devtools/cloudtrace/v2/tracing.proto +++ b/opentelemetry-stackdriver/proto/google/devtools/cloudtrace/v2/tracing.proto @@ -1,4 +1,4 @@ -// Copyright 2020 Google LLC +// Copyright 2022 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -31,18 +31,20 @@ option java_package = "com.google.devtools.cloudtrace.v2"; option php_namespace = "Google\\Cloud\\Trace\\V2"; option ruby_package = "Google::Cloud::Trace::V2"; -// This file describes an API for collecting and viewing traces and spans -// within a trace. A Trace is a collection of spans corresponding to a single -// operation or set of operations for an application. A span is an individual -// timed event which forms a node of the trace tree. A single trace may -// contain span(s) from multiple services. +// Service for collecting and viewing traces and spans within a trace. +// +// A trace is a collection of spans corresponding to a single +// operation or a set of operations in an application. +// +// A span is an individual timed event which forms a node of the trace tree. +// A single trace can contain spans from multiple services. service TraceService { option (google.api.default_host) = "cloudtrace.googleapis.com"; option (google.api.oauth_scopes) = "https://www.googleapis.com/auth/cloud-platform," "https://www.googleapis.com/auth/trace.append"; - // Sends new spans to new or existing traces. You cannot update + // Batch writes new spans to new or existing traces. You cannot update // existing spans. rpc BatchWriteSpans(BatchWriteSpansRequest) returns (google.protobuf.Empty) { option (google.api.http) = { @@ -73,6 +75,6 @@ message BatchWriteSpansRequest { ]; // Required. A list of new spans. The span names must not match existing - // spans, or the results are undefined. + // spans, otherwise the results are undefined. repeated Span spans = 2 [(google.api.field_behavior) = REQUIRED]; } diff --git a/opentelemetry-stackdriver/proto/google/rpc/status.proto b/opentelemetry-stackdriver/proto/google/rpc/status.proto index 3b1f7a932f..923e169381 100644 --- a/opentelemetry-stackdriver/proto/google/rpc/status.proto +++ b/opentelemetry-stackdriver/proto/google/rpc/status.proto @@ -1,4 +1,4 @@ -// Copyright 2020 Google LLC +// Copyright 2022 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -33,12 +33,14 @@ option objc_class_prefix = "RPC"; // You can find out more about this error model and how to work with it in the // [API Design Guide](https://cloud.google.com/apis/design/errors). message Status { - // The status code, which should be an enum value of [google.rpc.Code][google.rpc.Code]. + // The status code, which should be an enum value of + // [google.rpc.Code][google.rpc.Code]. int32 code = 1; // A developer-facing error message, which should be in English. Any // user-facing error message should be localized and sent in the - // [google.rpc.Status.details][google.rpc.Status.details] field, or localized by the client. + // [google.rpc.Status.details][google.rpc.Status.details] field, or localized + // by the client. string message = 2; // A list of messages that carry the error details. There is a common set of diff --git a/opentelemetry-stackdriver/src/proto/api.rs b/opentelemetry-stackdriver/src/proto/api.rs index 3cf8ba3742..eeeb2f2ca0 100644 --- a/opentelemetry-stackdriver/src/proto/api.rs +++ b/opentelemetry-stackdriver/src/proto/api.rs @@ -365,6 +365,404 @@ pub struct CustomHttpPattern { #[prost(string, tag = "2")] pub path: ::prost::alloc::string::String, } +/// The launch stage as defined by [Google Cloud Platform +/// Launch Stages](). +#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)] +#[repr(i32)] +pub enum LaunchStage { + /// Do not use this default value. + Unspecified = 0, + /// The feature is not yet implemented. Users can not use it. + Unimplemented = 6, + /// Prelaunch features are hidden from users and are only visible internally. + Prelaunch = 7, + /// Early Access features are limited to a closed group of testers. To use + /// these features, you must sign up in advance and sign a Trusted Tester + /// agreement (which includes confidentiality provisions). These features may + /// be unstable, changed in backward-incompatible ways, and are not + /// guaranteed to be released. + EarlyAccess = 1, + /// Alpha is a limited availability test for releases before they are cleared + /// for widespread use. By Alpha, all significant design issues are resolved + /// and we are in the process of verifying functionality. Alpha customers + /// need to apply for access, agree to applicable terms, and have their + /// projects allowlisted. Alpha releases don't have to be feature complete, + /// no SLAs are provided, and there are no technical support obligations, but + /// they will be far enough along that customers can actually use them in + /// test environments or for limited-use tests -- just like they would in + /// normal production cases. + Alpha = 2, + /// Beta is the point at which we are ready to open a release for any + /// customer to use. There are no SLA or technical support obligations in a + /// Beta release. Products will be complete from a feature perspective, but + /// may have some open outstanding issues. Beta releases are suitable for + /// limited production use cases. + Beta = 3, + /// GA features are open to all developers and are considered stable and + /// fully qualified for production use. + Ga = 4, + /// Deprecated features are scheduled to be shut down and removed. For more + /// information, see the "Deprecation Policy" section of our [Terms of + /// Service]() + /// and the [Google Cloud Platform Subject to the Deprecation + /// Policy]() documentation. + Deprecated = 5, +} +impl LaunchStage { + /// String value of the enum field names used in the ProtoBuf definition. + /// + /// The values are not transformed in any way and thus are considered stable + /// (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", + } + } + /// Creates an enum from field names used in the ProtoBuf definition. + pub fn from_str_name(value: &str) -> ::core::option::Option { + match value { + "LAUNCH_STAGE_UNSPECIFIED" => Some(Self::Unspecified), + "UNIMPLEMENTED" => Some(Self::Unimplemented), + "PRELAUNCH" => Some(Self::Prelaunch), + "EARLY_ACCESS" => Some(Self::EarlyAccess), + "ALPHA" => Some(Self::Alpha), + "BETA" => Some(Self::Beta), + "GA" => Some(Self::Ga), + "DEPRECATED" => Some(Self::Deprecated), + _ => None, + } + } +} +/// 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: + /// + #[deprecated] + #[prost(string, tag = "1")] + pub reference_docs_uri: ::prost::alloc::string::String, + /// The destination where API teams want this client library to be published. + #[prost(enumeration = "ClientLibraryDestination", repeated, tag = "2")] + 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. + #[prost(string, tag = "1")] + pub version: ::prost::alloc::string::String, + /// Launch stage of this version of the API. + #[prost(enumeration = "LaunchStage", tag = "2")] + pub launch_stage: i32, + /// When using transport=rest, the client request will encode enums as + /// numbers rather than strings. + #[prost(bool, tag = "3")] + pub rest_numeric_enums: bool, + /// Settings for legacy Java features, supported in the Service YAML. + #[prost(message, optional, tag = "21")] + pub java_settings: ::core::option::Option, + /// Settings for C++ client libraries. + #[prost(message, optional, tag = "22")] + pub cpp_settings: ::core::option::Option, + /// Settings for PHP client libraries. + #[prost(message, optional, tag = "23")] + pub php_settings: ::core::option::Option, + /// Settings for Python client libraries. + #[prost(message, optional, tag = "24")] + pub python_settings: ::core::option::Option, + /// Settings for Node client libraries. + #[prost(message, optional, tag = "25")] + pub node_settings: ::core::option::Option, + /// Settings for .NET client libraries. + #[prost(message, optional, tag = "26")] + pub dotnet_settings: ::core::option::Option, + /// Settings for Ruby client libraries. + #[prost(message, optional, tag = "27")] + pub ruby_settings: ::core::option::Option, + /// Settings for Go client libraries. + #[prost(message, optional, tag = "28")] + pub go_settings: ::core::option::Option, +} +/// 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 + /// long-running operation pattern. + #[prost(message, repeated, tag = "2")] + pub method_settings: ::prost::alloc::vec::Vec, + /// Link to a place that API users can report issues. Example: + /// + #[prost(string, tag = "101")] + pub new_issue_uri: ::prost::alloc::string::String, + /// Link to product home page. Example: + /// + #[prost(string, tag = "102")] + pub documentation_uri: ::prost::alloc::string::String, + /// Used as a tracking tag when collecting data about the APIs developer + /// relations artifacts like docs, packages delivered to package managers, + /// etc. Example: "speech". + #[prost(string, tag = "103")] + pub api_short_name: ::prost::alloc::string::String, + /// GitHub label to apply to issues and pull requests opened for this API. + #[prost(string, tag = "104")] + pub github_label: ::prost::alloc::string::String, + /// GitHub teams to be added to CODEOWNERS in the directory in GitHub + /// containing source code for the client libraries for this API. + #[prost(string, repeated, tag = "105")] + pub codeowner_github_teams: ::prost::alloc::vec::Vec<::prost::alloc::string::String>, + /// A prefix used in sample code when demarking regions to be included in + /// documentation. + #[prost(string, tag = "106")] + pub doc_tag_prefix: ::prost::alloc::string::String, + /// For whom the client library is being published. + #[prost(enumeration = "ClientLibraryOrganization", tag = "107")] + pub organization: i32, + /// Client library settings. If the same version string appears multiple + /// times in this list, then the last one wins. Settings from earlier + /// settings with the same version string are discarded. + #[prost(message, repeated, tag = "109")] + pub library_settings: ::prost::alloc::vec::Vec, +} +/// 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 + /// set in the protobuf. This should be used **only** by APIs + /// who have already set the language_settings.java.package_name" field + /// in gapic.yaml. API teams should use the protobuf java_package option + /// where possible. + /// + /// Example of a YAML configuration:: + /// + /// publishing: + /// java_settings: + /// library_package: com.google.cloud.pubsub.v1 + #[prost(string, tag = "1")] + pub library_package: ::prost::alloc::string::String, + /// Configure the Java class name to use instead of the service's for its + /// corresponding generated GAPIC client. Keys are fully-qualified + /// service names as they appear in the protobuf (including the full + /// the language_settings.java.interface_names" field in gapic.yaml. API + /// teams should otherwise use the service name as it appears in the + /// protobuf. + /// + /// Example of a YAML configuration:: + /// + /// publishing: + /// java_settings: + /// service_class_names: + /// - google.pubsub.v1.Publisher: TopicAdmin + /// - google.pubsub.v1.Subscriber: SubscriptionAdmin + #[prost(map = "string, string", tag = "2")] + pub service_class_names: + ::std::collections::HashMap<::prost::alloc::string::String, ::prost::alloc::string::String>, + /// Some settings. + #[prost(message, optional, tag = "3")] + 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. + #[prost(message, optional, tag = "1")] + 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. + #[prost(message, optional, tag = "1")] + 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. + #[prost(message, optional, tag = "1")] + pub common: ::core::option::Option, +} +/// Settings for Node client libraries. +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct NodeSettings { + /// Some settings. + #[prost(message, optional, tag = "1")] + 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. + #[prost(message, optional, tag = "1")] + pub common: ::core::option::Option, +} +/// Settings for Ruby client libraries. +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct RubySettings { + /// Some settings. + #[prost(message, optional, tag = "1")] + 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. + #[prost(message, optional, tag = "1")] + 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. + /// This is used to find the method to apply the options. + #[prost(string, tag = "1")] + pub selector: ::prost::alloc::string::String, + /// Describes settings to use for long-running operations when generating + /// API methods for RPCs. Complements RPCs that use the annotations in + /// google/longrunning/operations.proto. + /// + /// Example of a YAML configuration:: + /// + /// publishing: + /// method_behavior: + /// - selector: CreateAdDomain + /// long_running: + /// initial_poll_delay: + /// seconds: 60 # 1 minute + /// poll_delay_multiplier: 1.5 + /// max_poll_delay: + /// seconds: 360 # 6 minutes + /// total_poll_timeout: + /// seconds: 54000 # 90 minutes + #[prost(message, optional, tag = "2")] + pub long_running: ::core::option::Option, +} +/// Nested message and enum types in `MethodSettings`. +pub mod method_settings { + /// Describes settings to use when generating API methods that use the + /// long-running operation pattern. + /// 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, PartialEq, ::prost::Message)] + pub struct LongRunning { + /// Initial delay after which the first poll request will be made. + /// Default value: 5 seconds. + #[prost(message, optional, tag = "1")] + pub initial_poll_delay: ::core::option::Option<::prost_types::Duration>, + /// Multiplier to gradually increase delay between subsequent polls until it + /// reaches max_poll_delay. + /// Default value: 1.5. + #[prost(float, tag = "2")] + pub poll_delay_multiplier: f32, + /// Maximum time between two subsequent poll requests. + /// Default value: 45 seconds. + #[prost(message, optional, tag = "3")] + pub max_poll_delay: ::core::option::Option<::prost_types::Duration>, + /// Total polling timeout. + /// Default value: 5 minutes. + #[prost(message, optional, tag = "4")] + pub total_poll_timeout: ::core::option::Option<::prost_types::Duration>, + } +} +/// The organization for which the client libraries are being published. +/// Affects the url where generated docs are published, etc. +#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)] +#[repr(i32)] +pub enum ClientLibraryOrganization { + /// Not useful. + Unspecified = 0, + /// Google Cloud Platform Org. + Cloud = 1, + /// Ads (Advertising) Org. + Ads = 2, + /// Photos Org. + Photos = 3, + /// Street View Org. + StreetView = 4, +} +impl ClientLibraryOrganization { + /// String value of the enum field names used in the ProtoBuf definition. + /// + /// The values are not transformed in any way and thus are considered stable + /// (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", + } + } + /// Creates an enum from field names used in the ProtoBuf definition. + pub fn from_str_name(value: &str) -> ::core::option::Option { + match value { + "CLIENT_LIBRARY_ORGANIZATION_UNSPECIFIED" => Some(Self::Unspecified), + "CLOUD" => Some(Self::Cloud), + "ADS" => Some(Self::Ads), + "PHOTOS" => Some(Self::Photos), + "STREET_VIEW" => Some(Self::StreetView), + _ => None, + } + } +} +/// To where should client libraries be published? +#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)] +#[repr(i32)] +pub enum ClientLibraryDestination { + /// Client libraries will neither be generated nor published to package + /// managers. + Unspecified = 0, + /// Generate the client library in a repo under github.com/googleapis, + /// but don't publish it to package managers. + Github = 10, + /// Publish the library to package managers like nuget.org and npmjs.com. + PackageManager = 20, +} +impl ClientLibraryDestination { + /// String value of the enum field names used in the ProtoBuf definition. + /// + /// The values are not transformed in any way and thus are considered stable + /// (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", + } + } + /// Creates an enum from field names used in the ProtoBuf definition. + pub fn from_str_name(value: &str) -> ::core::option::Option { + match value { + "CLIENT_LIBRARY_DESTINATION_UNSPECIFIED" => Some(Self::Unspecified), + "GITHUB" => Some(Self::Github), + "PACKAGE_MANAGER" => Some(Self::PackageManager), + _ => None, + } + } +} /// An indicator of the behavior of a given field (for example, that a field /// is required in requests, or given as output but ignored as input). /// This **does not** change the behavior in protocol buffers itself; it only @@ -732,81 +1130,6 @@ pub mod label_descriptor { } } } -/// The launch stage as defined by [Google Cloud Platform -/// Launch Stages](). -#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)] -#[repr(i32)] -pub enum LaunchStage { - /// Do not use this default value. - Unspecified = 0, - /// The feature is not yet implemented. Users can not use it. - Unimplemented = 6, - /// Prelaunch features are hidden from users and are only visible internally. - Prelaunch = 7, - /// Early Access features are limited to a closed group of testers. To use - /// these features, you must sign up in advance and sign a Trusted Tester - /// agreement (which includes confidentiality provisions). These features may - /// be unstable, changed in backward-incompatible ways, and are not - /// guaranteed to be released. - EarlyAccess = 1, - /// Alpha is a limited availability test for releases before they are cleared - /// for widespread use. By Alpha, all significant design issues are resolved - /// and we are in the process of verifying functionality. Alpha customers - /// need to apply for access, agree to applicable terms, and have their - /// projects allowlisted. Alpha releases don’t have to be feature complete, - /// no SLAs are provided, and there are no technical support obligations, but - /// they will be far enough along that customers can actually use them in - /// test environments or for limited-use tests -- just like they would in - /// normal production cases. - Alpha = 2, - /// Beta is the point at which we are ready to open a release for any - /// customer to use. There are no SLA or technical support obligations in a - /// Beta release. Products will be complete from a feature perspective, but - /// may have some open outstanding issues. Beta releases are suitable for - /// limited production use cases. - Beta = 3, - /// GA features are open to all developers and are considered stable and - /// fully qualified for production use. - Ga = 4, - /// Deprecated features are scheduled to be shut down and removed. For more - /// information, see the “Deprecation Policy” section of our [Terms of - /// Service]() - /// and the [Google Cloud Platform Subject to the Deprecation - /// Policy]() documentation. - Deprecated = 5, -} -impl LaunchStage { - /// String value of the enum field names used in the ProtoBuf definition. - /// - /// The values are not transformed in any way and thus are considered stable - /// (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", - } - } - /// Creates an enum from field names used in the ProtoBuf definition. - pub fn from_str_name(value: &str) -> ::core::option::Option { - match value { - "LAUNCH_STAGE_UNSPECIFIED" => Some(Self::Unspecified), - "UNIMPLEMENTED" => Some(Self::Unimplemented), - "PRELAUNCH" => Some(Self::Prelaunch), - "EARLY_ACCESS" => Some(Self::EarlyAccess), - "ALPHA" => Some(Self::Alpha), - "BETA" => Some(Self::Beta), - "GA" => Some(Self::Ga), - "DEPRECATED" => Some(Self::Deprecated), - _ => None, - } - } -} /// An object that describes the schema of a \[MonitoredResource][google.api.MonitoredResource\] object using a /// type name and a set of labels. For example, the monitored resource /// descriptor for Google Compute Engine VM instances has a type of @@ -830,6 +1153,10 @@ pub struct MonitoredResourceDescriptor { pub name: ::prost::alloc::string::String, /// Required. The monitored resource type. For example, the type /// `"cloudsql_database"` represents databases in Google Cloud SQL. + /// For a list of types, see [Monitoring resource + /// types]() + /// and [Logging resource + /// types](). #[prost(string, tag = "1")] pub r#type: ::prost::alloc::string::String, /// Optional. A concise name for the monitored resource type that might be @@ -859,10 +1186,11 @@ pub struct MonitoredResourceDescriptor { /// its attributes according to the schema. For example, a particular Compute /// Engine VM instance could be represented by the following object, because the /// \[MonitoredResourceDescriptor][google.api.MonitoredResourceDescriptor\] for `"gce_instance"` has labels -/// `"instance_id"` and `"zone"`: +/// `"project_id"`, `"instance_id"` and `"zone"`: /// /// { "type": "gce_instance", -/// "labels": { "instance_id": "12345678901234", +/// "labels": { "project_id": "my-project", +/// "instance_id": "12345678901234", /// "zone": "us-central1-a" }} #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] @@ -870,6 +1198,8 @@ pub struct MonitoredResource { /// Required. The monitored resource type. This field must match /// the `type` field of a \[MonitoredResourceDescriptor][google.api.MonitoredResourceDescriptor\] object. For /// example, the type of a Compute Engine VM instance is `gce_instance`. + /// Some descriptors include the service name in the type; for example, + /// the type of a Datastream stream is `datastream.googleapis.com/Stream`. #[prost(string, tag = "1")] pub r#type: ::prost::alloc::string::String, /// Required. Values for all of the labels listed in the associated monitored diff --git a/opentelemetry-stackdriver/src/proto/devtools/cloudtrace/v2.rs b/opentelemetry-stackdriver/src/proto/devtools/cloudtrace/v2.rs index 24bb8db858..ed8a5540de 100644 --- a/opentelemetry-stackdriver/src/proto/devtools/cloudtrace/v2.rs +++ b/opentelemetry-stackdriver/src/proto/devtools/cloudtrace/v2.rs @@ -1,47 +1,53 @@ /// A span represents a single operation within a trace. Spans can be /// nested to form a trace tree. Often, a trace contains a root span /// that describes the end-to-end latency, and one or more subspans for -/// its sub-operations. A trace can also contain multiple root spans, -/// or none at all. Spans do not need to be contiguous—there may be +/// its sub-operations. +/// +/// 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: /// - /// projects/\[PROJECT_ID]/traces/[TRACE_ID]/spans/[SPAN_ID\] + /// * `projects/\[PROJECT_ID]/traces/[TRACE_ID]/spans/[SPAN_ID\]` /// - /// \[TRACE_ID\] is a unique identifier for a trace within a project; - /// it is a 32-character hexadecimal encoding of a 16-byte array. + /// `\[TRACE_ID\]` is a unique identifier for a trace within a project; + /// it is a 32-character hexadecimal encoding of a 16-byte array. It should + /// not be zero. /// - /// \[SPAN_ID\] is a unique identifier for a span within a trace; it - /// is a 16-character hexadecimal encoding of an 8-byte array. + /// `\[SPAN_ID\]` is a unique identifier for a span within a trace; it + /// is a 16-character hexadecimal encoding of an 8-byte array. It should not + /// be zero. + /// . #[prost(string, tag = "1")] pub name: ::prost::alloc::string::String, - /// Required. The \[SPAN_ID\] portion of the span's resource name. + /// Required. The `\[SPAN_ID\]` portion of the span's resource name. #[prost(string, tag = "2")] pub span_id: ::prost::alloc::string::String, - /// The \[SPAN_ID\] of this span's parent span. If this is a root span, + /// The `\[SPAN_ID\]` of this span's parent span. If this is a root span, /// then this field must be empty. #[prost(string, tag = "3")] pub parent_span_id: ::prost::alloc::string::String, /// Required. A description of the span's operation (up to 128 bytes). - /// Stackdriver Trace displays the description in the - /// Google Cloud Platform Console. + /// Cloud Trace displays the description in the + /// Cloud console. /// For example, the display name can be a qualified method name or a file name /// and a line number where the operation is called. A best practice is to use /// the same display name within an application and at the same call point. /// This makes it easier to correlate spans in different traces. #[prost(message, optional, tag = "4")] pub display_name: ::core::option::Option, - /// Required. The start time of the span. On the client side, this is the time kept by - /// the local machine where the span execution starts. On the server side, this - /// is the time when the server's application handler starts running. + /// Required. The start time of the span. On the client side, this is the time + /// kept by the local machine where the span execution starts. On the server + /// side, this is the time when the server's application handler starts + /// running. #[prost(message, optional, tag = "5")] pub start_time: ::core::option::Option<::prost_types::Timestamp>, - /// Required. The end time of the span. On the client side, this is the time kept by - /// the local machine where the span execution ends. On the server side, this - /// is the time when the server application handler stops running. + /// Required. The end time of the span. On the client side, this is the time + /// kept by the local machine where the span execution ends. On the server + /// side, this is the time when the server application handler stops running. #[prost(message, optional, tag = "6")] pub end_time: ::core::option::Option<::prost_types::Timestamp>, /// A set of attributes on the span. You can have up to 32 attributes per @@ -63,29 +69,28 @@ pub struct Span { pub status: ::core::option::Option, /// Optional. Set this parameter to indicate whether this span is in /// the same process as its parent. If you do not set this parameter, - /// Stackdriver Trace is unable to take advantage of this helpful - /// information. + /// Trace is unable to take advantage of this helpful information. #[prost(message, optional, tag = "12")] pub same_process_as_parent_span: ::core::option::Option, /// Optional. The number of child spans that were generated while this span /// was active. If set, allows implementation to detect missing child spans. #[prost(message, optional, tag = "13")] pub child_span_count: ::core::option::Option, - /// Optional. Distinguishes between spans generated in a particular context. For example, - /// two spans with the same name may be distinguished using `CLIENT` (caller) - /// and `SERVER` (callee) to identify an RPC call. + /// Optional. Distinguishes between spans generated in a particular context. + /// For example, two spans with the same name may be distinguished using + /// `CLIENT` (caller) and `SERVER` (callee) to identify an RPC call. #[prost(enumeration = "span::SpanKind", tag = "14")] pub span_kind: i32, } /// Nested message and enum types in `Span`. pub mod span { - /// A set of attributes, each in the format `\[KEY]:[VALUE\]`. + /// A set of attributes as key-value pairs. #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct Attributes { - /// The set of attributes. Each attribute's key can be up to 128 bytes + /// A set of attributes. Each attribute's key can be up to 128 bytes /// long. The value can be a string up to 256 bytes, a signed 64-bit integer, - /// or the Boolean values `true` and `false`. For example: + /// or the boolean values `true` or `false`. For example: /// /// "/instance_id": { "string_value": { "value": "my-instance" } } /// "/http/request_bytes": { "int_value": 300 } @@ -135,15 +140,15 @@ pub mod span { #[prost(enumeration = "message_event::Type", tag = "1")] pub r#type: i32, /// An identifier for the MessageEvent's message that can be used to match - /// SENT and RECEIVED MessageEvents. It is recommended to be unique within - /// a Span. + /// `SENT` and `RECEIVED` MessageEvents. #[prost(int64, tag = "2")] pub id: i64, /// The number of uncompressed bytes sent or received. #[prost(int64, tag = "3")] pub uncompressed_size_bytes: i64, - /// The number of compressed bytes sent or received. If missing assumed to - /// be the same size as uncompressed. + /// The number of compressed bytes sent or received. If missing, the + /// compressed size is assumed to be the same size as the uncompressed + /// size. #[prost(int64, tag = "4")] pub compressed_size_bytes: i64, } @@ -223,17 +228,17 @@ pub mod span { #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct Link { - /// The \[TRACE_ID\] for a trace within a project. + /// The `\[TRACE_ID\]` for a trace within a project. #[prost(string, tag = "1")] pub trace_id: ::prost::alloc::string::String, - /// The \[SPAN_ID\] for a span within a trace. + /// The `\[SPAN_ID\]` for a span within a trace. #[prost(string, tag = "2")] pub span_id: ::prost::alloc::string::String, /// The relationship of the current span relative to the linked span. #[prost(enumeration = "link::Type", tag = "3")] pub r#type: i32, - /// A set of attributes on the link. You have have up to 32 attributes per - /// link. + /// A set of attributes on the link. Up to 32 attributes can be + /// specified per link. #[prost(message, optional, tag = "4")] pub attributes: ::core::option::Option, } @@ -345,7 +350,7 @@ pub mod span { } } } -/// The allowed types for \[VALUE\] in a `\[KEY]:[VALUE\]` attribute. +/// 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 { @@ -399,9 +404,10 @@ pub mod stack_trace { /// method that is active in this frame (up to 1024 bytes). #[prost(message, optional, tag = "1")] pub function_name: ::core::option::Option, - /// An un-mangled function name, if `function_name` is - /// \[mangled\](). The name can - /// be fully-qualified (up to 1024 bytes). + /// An un-mangled function name, if `function_name` is mangled. + /// To get information about name mangling, run + /// [this search](). + /// The name can be fully-qualified (up to 1024 bytes). #[prost(message, optional, tag = "2")] pub original_function_name: ::core::option::Option, /// The name of the source file where the function call appears (up to 256 @@ -476,7 +482,7 @@ pub struct BatchWriteSpansRequest { #[prost(string, tag = "1")] pub name: ::prost::alloc::string::String, /// Required. A list of new spans. The span names must not match existing - /// spans, or the results are undefined. + /// spans, otherwise the results are undefined. #[prost(message, repeated, tag = "2")] pub spans: ::prost::alloc::vec::Vec, } @@ -485,11 +491,13 @@ pub mod trace_service_client { #![allow(unused_variables, dead_code, missing_docs, clippy::let_unit_value)] use tonic::codegen::http::Uri; use tonic::codegen::*; - /// This file describes an API for collecting and viewing traces and spans - /// within a trace. A Trace is a collection of spans corresponding to a single - /// operation or set of operations for an application. A span is an individual - /// timed event which forms a node of the trace tree. A single trace may - /// contain span(s) from multiple services. + /// Service for collecting and viewing traces and spans within a trace. + /// + /// A trace is a collection of spans corresponding to a single + /// operation or a set of operations in an application. + /// + /// A span is an individual timed event which forms a node of the trace tree. + /// A single trace can contain spans from multiple services. #[derive(Debug, Clone)] pub struct TraceServiceClient { inner: tonic::client::Grpc, @@ -553,7 +561,7 @@ pub mod trace_service_client { self.inner = self.inner.accept_compressed(encoding); self } - /// Sends new spans to new or existing traces. You cannot update + /// Batch writes new spans to new or existing traces. You cannot update /// existing spans. pub async fn batch_write_spans( &mut self, diff --git a/opentelemetry-stackdriver/src/proto/rpc.rs b/opentelemetry-stackdriver/src/proto/rpc.rs index 8f3d2b98ee..e20cb14834 100644 --- a/opentelemetry-stackdriver/src/proto/rpc.rs +++ b/opentelemetry-stackdriver/src/proto/rpc.rs @@ -8,12 +8,14 @@ #[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 \[google.rpc.Code][google.rpc.Code\]. + /// The status code, which should be an enum value of + /// \[google.rpc.Code][google.rpc.Code\]. #[prost(int32, tag = "1")] pub code: i32, /// A developer-facing error message, which should be in English. Any /// user-facing error message should be localized and sent in the - /// \[google.rpc.Status.details][google.rpc.Status.details\] field, or localized by the client. + /// \[google.rpc.Status.details][google.rpc.Status.details\] field, or localized + /// by the client. #[prost(string, tag = "2")] pub message: ::prost::alloc::string::String, /// A list of messages that carry the error details. There is a common set of