Skip to content

Commit 6b30502

Browse files
djchdost
authored andcommitted
stackdriver: update schema files
1 parent c68ed56 commit 6b30502

17 files changed

Lines changed: 1035 additions & 438 deletions

File tree

opentelemetry-stackdriver/proto/google/api/client.proto

Lines changed: 63 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// Copyright 2018 Google LLC
1+
// Copyright 2023 Google LLC
22
//
33
// Licensed under the Apache License, Version 2.0 (the "License");
44
// you may not use this file except in compliance with the License.
@@ -112,7 +112,9 @@ message CommonLanguageSettings {
112112

113113
// Details about how and where to publish client libraries.
114114
message ClientLibrarySettings {
115-
// Version of the API to apply these settings to.
115+
// Version of the API to apply these settings to. This is the full protobuf
116+
// package for the API, ending in the version element.
117+
// Examples: "google.cloud.speech.v1" and "google.spanner.admin.database.v1".
116118
string version = 1;
117119

118120
// Launch stage of this version of the API.
@@ -155,7 +157,7 @@ message Publishing {
155157
// long-running operation pattern.
156158
repeated MethodSettings method_settings = 2;
157159

158-
// Link to a place that API users can report issues. Example:
160+
// Link to a *public* URI where users can report issues. Example:
159161
// https://issuetracker.google.com/issues/new?component=190865&template=1161103
160162
string new_issue_uri = 101;
161163

@@ -186,6 +188,10 @@ message Publishing {
186188
// times in this list, then the last one wins. Settings from earlier
187189
// settings with the same version string are discarded.
188190
repeated ClientLibrarySettings library_settings = 109;
191+
192+
// Optional link to proto reference documentation. Example:
193+
// https://cloud.google.com/pubsub/lite/docs/reference/rpc
194+
string proto_reference_documentation_uri = 110;
189195
}
190196

191197
// Settings for Java client libraries.
@@ -251,6 +257,36 @@ message NodeSettings {
251257
message DotnetSettings {
252258
// Some settings.
253259
CommonLanguageSettings common = 1;
260+
261+
// Map from original service names to renamed versions.
262+
// This is used when the default generated types
263+
// would cause a naming conflict. (Neither name is
264+
// fully-qualified.)
265+
// Example: Subscriber to SubscriberServiceApi.
266+
map<string, string> renamed_services = 2;
267+
268+
// Map from full resource types to the effective short name
269+
// for the resource. This is used when otherwise resource
270+
// named from different services would cause naming collisions.
271+
// Example entry:
272+
// "datalabeling.googleapis.com/Dataset": "DataLabelingDataset"
273+
map<string, string> renamed_resources = 3;
274+
275+
// List of full resource types to ignore during generation.
276+
// This is typically used for API-specific Location resources,
277+
// which should be handled by the generator as if they were actually
278+
// the common Location resources.
279+
// Example entry: "documentai.googleapis.com/Location"
280+
repeated string ignored_resources = 4;
281+
282+
// Namespaces which must be aliased in snippets due to
283+
// a known (but non-generator-predictable) naming collision
284+
repeated string forced_namespace_aliases = 5;
285+
286+
// Method signatures (in the form "service.method(signature)")
287+
// which are provided separately, so shouldn't be generated.
288+
// Snippets *calling* these methods are still generated, however.
289+
repeated string handwritten_signatures = 6;
254290
}
255291

256292
// Settings for Ruby client libraries.
@@ -302,8 +338,8 @@ message MethodSettings {
302338
// Example of a YAML configuration::
303339
//
304340
// publishing:
305-
// method_behavior:
306-
// - selector: CreateAdDomain
341+
// method_settings:
342+
// - selector: google.cloud.speech.v2.Speech.BatchRecognize
307343
// long_running:
308344
// initial_poll_delay:
309345
// seconds: 60 # 1 minute
@@ -313,6 +349,19 @@ message MethodSettings {
313349
// total_poll_timeout:
314350
// seconds: 54000 # 90 minutes
315351
LongRunning long_running = 2;
352+
353+
// List of top-level fields of the request message, that should be
354+
// automatically populated by the client libraries based on their
355+
// (google.api.field_info).format. Currently supported format: UUID4.
356+
//
357+
// Example of a YAML configuration:
358+
//
359+
// publishing:
360+
// method_settings:
361+
// - selector: google.example.v1.ExampleService.CreateExample
362+
// auto_populated_fields:
363+
// - request_id
364+
repeated string auto_populated_fields = 3;
316365
}
317366

318367
// The organization for which the client libraries are being published.
@@ -332,6 +381,15 @@ enum ClientLibraryOrganization {
332381

333382
// Street View Org.
334383
STREET_VIEW = 4;
384+
385+
// Shopping Org.
386+
SHOPPING = 5;
387+
388+
// Geo Org.
389+
GEO = 6;
390+
391+
// Generative AI - https://developers.generativeai.google
392+
GENERATIVE_AI = 7;
335393
}
336394

337395
// To where should client libraries be published?

opentelemetry-stackdriver/proto/google/api/field_behavior.proto

Lines changed: 16 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// Copyright 2018 Google LLC
1+
// Copyright 2023 Google LLC
22
//
33
// Licensed under the Apache License, Version 2.0 (the "License");
44
// you may not use this file except in compliance with the License.
@@ -37,7 +37,7 @@ extend google.protobuf.FieldOptions {
3737
// google.protobuf.Timestamp expire_time = 1
3838
// [(google.api.field_behavior) = OUTPUT_ONLY,
3939
// (google.api.field_behavior) = IMMUTABLE];
40-
repeated google.api.FieldBehavior field_behavior = 1052;
40+
repeated google.api.FieldBehavior field_behavior = 1052 [packed = false];
4141
}
4242

4343
// An indicator of the behavior of a given field (for example, that a field
@@ -87,4 +87,18 @@ enum FieldBehavior {
8787
// a non-empty value will be returned. The user will not be aware of what
8888
// non-empty value to expect.
8989
NON_EMPTY_DEFAULT = 7;
90+
91+
// Denotes that the field in a resource (a message annotated with
92+
// google.api.resource) is used in the resource name to uniquely identify the
93+
// resource. For AIP-compliant APIs, this should only be applied to the
94+
// `name` field on the resource.
95+
//
96+
// This behavior should not be applied to references to other resources within
97+
// the message.
98+
//
99+
// The identifier field of resources often have different field behavior
100+
// depending on the request it is embedded in (e.g. for Create methods name
101+
// is optional and unused, while for Update methods it is required). Instead
102+
// of method-specific annotations, only `IDENTIFIER` is required.
103+
IDENTIFIER = 8;
90104
}

opentelemetry-stackdriver/proto/google/api/http.proto

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// Copyright 2015 Google LLC
1+
// Copyright 2023 Google LLC
22
//
33
// Licensed under the Apache License, Version 2.0 (the "License");
44
// you may not use this file except in compliance with the License.
@@ -210,15 +210,18 @@ message Http {
210210
// 1. Leaf request fields (recursive expansion nested messages in the request
211211
// message) are classified into three categories:
212212
// - Fields referred by the path template. They are passed via the URL path.
213-
// - Fields referred by the [HttpRule.body][google.api.HttpRule.body]. They are passed via the HTTP
213+
// - Fields referred by the [HttpRule.body][google.api.HttpRule.body]. They
214+
// are passed via the HTTP
214215
// request body.
215216
// - All other fields are passed via the URL query parameters, and the
216217
// parameter name is the field path in the request message. A repeated
217218
// field can be represented as multiple query parameters under the same
218219
// name.
219-
// 2. If [HttpRule.body][google.api.HttpRule.body] is "*", there is no URL query parameter, all fields
220+
// 2. If [HttpRule.body][google.api.HttpRule.body] is "*", there is no URL
221+
// query parameter, all fields
220222
// are passed via URL path and HTTP request body.
221-
// 3. If [HttpRule.body][google.api.HttpRule.body] is omitted, there is no HTTP request body, all
223+
// 3. If [HttpRule.body][google.api.HttpRule.body] is omitted, there is no HTTP
224+
// request body, all
222225
// fields are passed via URL path and URL query parameters.
223226
//
224227
// ### Path template syntax
@@ -313,7 +316,8 @@ message Http {
313316
message HttpRule {
314317
// Selects a method to which this rule applies.
315318
//
316-
// Refer to [selector][google.api.DocumentationRule.selector] for syntax details.
319+
// Refer to [selector][google.api.DocumentationRule.selector] for syntax
320+
// details.
317321
string selector = 1;
318322

319323
// Determines the URL pattern is matched by this rules. This pattern can be

opentelemetry-stackdriver/proto/google/api/label.proto

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// Copyright 2015 Google LLC
1+
// Copyright 2023 Google LLC
22
//
33
// Licensed under the Apache License, Version 2.0 (the "License");
44
// you may not use this file except in compliance with the License.

opentelemetry-stackdriver/proto/google/api/launch_stage.proto

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// Copyright 2015 Google LLC
1+
// Copyright 2023 Google LLC
22
//
33
// Licensed under the Apache License, Version 2.0 (the "License");
44
// you may not use this file except in compliance with the License.

opentelemetry-stackdriver/proto/google/api/monitored_resource.proto

Lines changed: 24 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// Copyright 2015 Google LLC
1+
// Copyright 2023 Google LLC
22
//
33
// Licensed under the Apache License, Version 2.0 (the "License");
44
// you may not use this file except in compliance with the License.
@@ -27,9 +27,10 @@ option java_outer_classname = "MonitoredResourceProto";
2727
option java_package = "com.google.api";
2828
option objc_class_prefix = "GAPI";
2929

30-
// An object that describes the schema of a [MonitoredResource][google.api.MonitoredResource] object using a
31-
// type name and a set of labels. For example, the monitored resource
32-
// descriptor for Google Compute Engine VM instances has a type of
30+
// An object that describes the schema of a
31+
// [MonitoredResource][google.api.MonitoredResource] object using a type name
32+
// and a set of labels. For example, the monitored resource descriptor for
33+
// Google Compute Engine VM instances has a type of
3334
// `"gce_instance"` and specifies the use of the labels `"instance_id"` and
3435
// `"zone"` to identify particular VM instances.
3536
//
@@ -76,11 +77,13 @@ message MonitoredResourceDescriptor {
7677
// An object representing a resource that can be used for monitoring, logging,
7778
// billing, or other purposes. Examples include virtual machine instances,
7879
// databases, and storage devices such as disks. The `type` field identifies a
79-
// [MonitoredResourceDescriptor][google.api.MonitoredResourceDescriptor] object that describes the resource's
80-
// schema. Information in the `labels` field identifies the actual resource and
81-
// its attributes according to the schema. For example, a particular Compute
82-
// Engine VM instance could be represented by the following object, because the
83-
// [MonitoredResourceDescriptor][google.api.MonitoredResourceDescriptor] for `"gce_instance"` has labels
80+
// [MonitoredResourceDescriptor][google.api.MonitoredResourceDescriptor] object
81+
// that describes the resource's schema. Information in the `labels` field
82+
// identifies the actual resource and its attributes according to the schema.
83+
// For example, a particular Compute Engine VM instance could be represented by
84+
// the following object, because the
85+
// [MonitoredResourceDescriptor][google.api.MonitoredResourceDescriptor] for
86+
// `"gce_instance"` has labels
8487
// `"project_id"`, `"instance_id"` and `"zone"`:
8588
//
8689
// { "type": "gce_instance",
@@ -89,10 +92,12 @@ message MonitoredResourceDescriptor {
8992
// "zone": "us-central1-a" }}
9093
message MonitoredResource {
9194
// Required. The monitored resource type. This field must match
92-
// the `type` field of a [MonitoredResourceDescriptor][google.api.MonitoredResourceDescriptor] object. For
93-
// example, the type of a Compute Engine VM instance is `gce_instance`.
94-
// Some descriptors include the service name in the type; for example,
95-
// the type of a Datastream stream is `datastream.googleapis.com/Stream`.
95+
// the `type` field of a
96+
// [MonitoredResourceDescriptor][google.api.MonitoredResourceDescriptor]
97+
// object. For example, the type of a Compute Engine VM instance is
98+
// `gce_instance`. Some descriptors include the service name in the type; for
99+
// example, the type of a Datastream stream is
100+
// `datastream.googleapis.com/Stream`.
96101
string type = 1;
97102

98103
// Required. Values for all of the labels listed in the associated monitored
@@ -101,12 +106,12 @@ message MonitoredResource {
101106
map<string, string> labels = 2;
102107
}
103108

104-
// Auxiliary metadata for a [MonitoredResource][google.api.MonitoredResource] object.
105-
// [MonitoredResource][google.api.MonitoredResource] objects contain the minimum set of information to
106-
// uniquely identify a monitored resource instance. There is some other useful
107-
// auxiliary metadata. Monitoring and Logging use an ingestion
108-
// pipeline to extract metadata for cloud resources of all types, and store
109-
// the metadata in this message.
109+
// Auxiliary metadata for a [MonitoredResource][google.api.MonitoredResource]
110+
// object. [MonitoredResource][google.api.MonitoredResource] objects contain the
111+
// minimum set of information to uniquely identify a monitored resource
112+
// instance. There is some other useful auxiliary metadata. Monitoring and
113+
// Logging use an ingestion pipeline to extract metadata for cloud resources of
114+
// all types, and store the metadata in this message.
110115
message MonitoredResourceMetadata {
111116
// Output only. Values for predefined system metadata labels.
112117
// System labels are a kind of metadata extracted by Google, including

opentelemetry-stackdriver/proto/google/api/resource.proto

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// Copyright 2018 Google LLC
1+
// Copyright 2023 Google LLC
22
//
33
// Licensed under the Apache License, Version 2.0 (the "License");
44
// you may not use this file except in compliance with the License.

opentelemetry-stackdriver/proto/google/devtools/cloudtrace/v2/trace.proto

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ import "google/protobuf/wrappers.proto";
2323
import "google/rpc/status.proto";
2424

2525
option csharp_namespace = "Google.Cloud.Trace.V2";
26-
option go_package = "google.golang.org/genproto/googleapis/devtools/cloudtrace/v2;cloudtrace";
26+
option go_package = "cloud.google.com/go/trace/apiv2/tracepb;tracepb";
2727
option java_multiple_files = true;
2828
option java_outer_classname = "TraceProto";
2929
option java_package = "com.google.devtools.cloudtrace.v2";

opentelemetry-stackdriver/proto/google/devtools/cloudtrace/v2/tracing.proto

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ import "google/devtools/cloudtrace/v2/trace.proto";
2424
import "google/protobuf/empty.proto";
2525

2626
option csharp_namespace = "Google.Cloud.Trace.V2";
27-
option go_package = "google.golang.org/genproto/googleapis/devtools/cloudtrace/v2;cloudtrace";
27+
option go_package = "cloud.google.com/go/trace/apiv2/tracepb;tracepb";
2828
option java_multiple_files = true;
2929
option java_outer_classname = "TracingProto";
3030
option java_package = "com.google.devtools.cloudtrace.v2";

opentelemetry-stackdriver/proto/google/logging/type/http_request.proto

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// Copyright 2022 Google LLC
1+
// Copyright 2023 Google LLC
22
//
33
// Licensed under the Apache License, Version 2.0 (the "License");
44
// you may not use this file except in compliance with the License.
@@ -67,7 +67,7 @@ message HttpRequest {
6767

6868
// The referer URL of the request, as defined in
6969
// [HTTP/1.1 Header Field
70-
// Definitions](http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html).
70+
// Definitions](https://datatracker.ietf.org/doc/html/rfc2616#section-14.36).
7171
string referer = 8;
7272

7373
// The request processing latency on the server, from the time the request was

0 commit comments

Comments
 (0)