Skip to content

Commit

Permalink
stackdriver: update schema files
Browse files Browse the repository at this point in the history
  • Loading branch information
djc authored and hdost committed Feb 26, 2024
1 parent c68ed56 commit 6b30502
Show file tree
Hide file tree
Showing 17 changed files with 1,035 additions and 438 deletions.
68 changes: 63 additions & 5 deletions opentelemetry-stackdriver/proto/google/api/client.proto
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright 2018 Google LLC
// Copyright 2023 Google LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -112,7 +112,9 @@ message CommonLanguageSettings {

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

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

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

Expand Down Expand Up @@ -186,6 +188,10 @@ message Publishing {
// 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;

// Optional link to proto reference documentation. Example:
// https://cloud.google.com/pubsub/lite/docs/reference/rpc
string proto_reference_documentation_uri = 110;
}

// Settings for Java client libraries.
Expand Down Expand Up @@ -251,6 +257,36 @@ message NodeSettings {
message DotnetSettings {
// Some settings.
CommonLanguageSettings common = 1;

// Map from original service names to renamed versions.
// This is used when the default generated types
// would cause a naming conflict. (Neither name is
// fully-qualified.)
// Example: Subscriber to SubscriberServiceApi.
map<string, string> renamed_services = 2;

// Map from full resource types to the effective short name
// for the resource. This is used when otherwise resource
// named from different services would cause naming collisions.
// Example entry:
// "datalabeling.googleapis.com/Dataset": "DataLabelingDataset"
map<string, string> renamed_resources = 3;

// List of full resource types to ignore during generation.
// This is typically used for API-specific Location resources,
// which should be handled by the generator as if they were actually
// the common Location resources.
// Example entry: "documentai.googleapis.com/Location"
repeated string ignored_resources = 4;

// Namespaces which must be aliased in snippets due to
// a known (but non-generator-predictable) naming collision
repeated string forced_namespace_aliases = 5;

// Method signatures (in the form "service.method(signature)")
// which are provided separately, so shouldn't be generated.
// Snippets *calling* these methods are still generated, however.
repeated string handwritten_signatures = 6;
}

// Settings for Ruby client libraries.
Expand Down Expand Up @@ -302,8 +338,8 @@ message MethodSettings {
// Example of a YAML configuration::
//
// publishing:
// method_behavior:
// - selector: CreateAdDomain
// method_settings:
// - selector: google.cloud.speech.v2.Speech.BatchRecognize
// long_running:
// initial_poll_delay:
// seconds: 60 # 1 minute
Expand All @@ -313,6 +349,19 @@ message MethodSettings {
// total_poll_timeout:
// seconds: 54000 # 90 minutes
LongRunning long_running = 2;

// List of top-level fields of the request message, that should be
// automatically populated by the client libraries based on their
// (google.api.field_info).format. Currently supported format: UUID4.
//
// Example of a YAML configuration:
//
// publishing:
// method_settings:
// - selector: google.example.v1.ExampleService.CreateExample
// auto_populated_fields:
// - request_id
repeated string auto_populated_fields = 3;
}

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

// Street View Org.
STREET_VIEW = 4;

// Shopping Org.
SHOPPING = 5;

// Geo Org.
GEO = 6;

// Generative AI - https://developers.generativeai.google
GENERATIVE_AI = 7;
}

// To where should client libraries be published?
Expand Down
18 changes: 16 additions & 2 deletions opentelemetry-stackdriver/proto/google/api/field_behavior.proto
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright 2018 Google LLC
// Copyright 2023 Google LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -37,7 +37,7 @@ extend google.protobuf.FieldOptions {
// google.protobuf.Timestamp expire_time = 1
// [(google.api.field_behavior) = OUTPUT_ONLY,
// (google.api.field_behavior) = IMMUTABLE];
repeated google.api.FieldBehavior field_behavior = 1052;
repeated google.api.FieldBehavior field_behavior = 1052 [packed = false];
}

// An indicator of the behavior of a given field (for example, that a field
Expand Down Expand Up @@ -87,4 +87,18 @@ enum FieldBehavior {
// a non-empty value will be returned. The user will not be aware of what
// non-empty value to expect.
NON_EMPTY_DEFAULT = 7;

// Denotes that the field in a resource (a message annotated with
// google.api.resource) is used in the resource name to uniquely identify the
// resource. For AIP-compliant APIs, this should only be applied to the
// `name` field on the resource.
//
// This behavior should not be applied to references to other resources within
// the message.
//
// The identifier field of resources often have different field behavior
// depending on the request it is embedded in (e.g. for Create methods name
// is optional and unused, while for Update methods it is required). Instead
// of method-specific annotations, only `IDENTIFIER` is required.
IDENTIFIER = 8;
}
14 changes: 9 additions & 5 deletions opentelemetry-stackdriver/proto/google/api/http.proto
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright 2015 Google LLC
// Copyright 2023 Google LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -210,15 +210,18 @@ message Http {
// 1. Leaf request fields (recursive expansion nested messages in the request
// message) are classified into three categories:
// - Fields referred by the path template. They are passed via the URL path.
// - Fields referred by the [HttpRule.body][google.api.HttpRule.body]. They are passed via the HTTP
// - Fields referred by the [HttpRule.body][google.api.HttpRule.body]. They
// are passed via the HTTP
// request body.
// - All other fields are passed via the URL query parameters, and the
// parameter name is the field path in the request message. A repeated
// field can be represented as multiple query parameters under the same
// name.
// 2. If [HttpRule.body][google.api.HttpRule.body] is "*", there is no URL query parameter, all fields
// 2. If [HttpRule.body][google.api.HttpRule.body] is "*", there is no URL
// query parameter, all fields
// are passed via URL path and HTTP request body.
// 3. If [HttpRule.body][google.api.HttpRule.body] is omitted, there is no HTTP request body, all
// 3. If [HttpRule.body][google.api.HttpRule.body] is omitted, there is no HTTP
// request body, all
// fields are passed via URL path and URL query parameters.
//
// ### Path template syntax
Expand Down Expand Up @@ -313,7 +316,8 @@ message Http {
message HttpRule {
// Selects a method to which this rule applies.
//
// Refer to [selector][google.api.DocumentationRule.selector] for syntax details.
// Refer to [selector][google.api.DocumentationRule.selector] for syntax
// details.
string selector = 1;

// Determines the URL pattern is matched by this rules. This pattern can be
Expand Down
2 changes: 1 addition & 1 deletion opentelemetry-stackdriver/proto/google/api/label.proto
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright 2015 Google LLC
// Copyright 2023 Google LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright 2015 Google LLC
// Copyright 2023 Google LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
Expand Down
43 changes: 24 additions & 19 deletions opentelemetry-stackdriver/proto/google/api/monitored_resource.proto
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright 2015 Google LLC
// Copyright 2023 Google LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -27,9 +27,10 @@ option java_outer_classname = "MonitoredResourceProto";
option java_package = "com.google.api";
option objc_class_prefix = "GAPI";

// 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
// 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
// `"gce_instance"` and specifies the use of the labels `"instance_id"` and
// `"zone"` to identify particular VM instances.
//
Expand Down Expand Up @@ -76,11 +77,13 @@ message MonitoredResourceDescriptor {
// An object representing a resource that can be used for monitoring, logging,
// billing, or other purposes. Examples include virtual machine instances,
// databases, and storage devices such as disks. The `type` field identifies a
// [MonitoredResourceDescriptor][google.api.MonitoredResourceDescriptor] object that describes the resource's
// schema. Information in the `labels` field identifies the actual resource and
// 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
// [MonitoredResourceDescriptor][google.api.MonitoredResourceDescriptor] object
// that describes the resource's schema. Information in the `labels` field
// identifies the actual resource and 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
// `"project_id"`, `"instance_id"` and `"zone"`:
//
// { "type": "gce_instance",
Expand All @@ -89,10 +92,12 @@ message MonitoredResourceDescriptor {
// "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`.
// 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
Expand All @@ -101,12 +106,12 @@ message MonitoredResource {
map<string, string> labels = 2;
}

// Auxiliary metadata for a [MonitoredResource][google.api.MonitoredResource] object.
// [MonitoredResource][google.api.MonitoredResource] objects contain the minimum set of information to
// uniquely identify a monitored resource 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.
// Auxiliary metadata for a [MonitoredResource][google.api.MonitoredResource]
// object. [MonitoredResource][google.api.MonitoredResource] objects contain the
// minimum set of information to uniquely identify a monitored resource
// 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.
message MonitoredResourceMetadata {
// Output only. Values for predefined system metadata labels.
// System labels are a kind of metadata extracted by Google, including
Expand Down
2 changes: 1 addition & 1 deletion opentelemetry-stackdriver/proto/google/api/resource.proto
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright 2018 Google LLC
// Copyright 2023 Google LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ import "google/protobuf/wrappers.proto";
import "google/rpc/status.proto";

option csharp_namespace = "Google.Cloud.Trace.V2";
option go_package = "google.golang.org/genproto/googleapis/devtools/cloudtrace/v2;cloudtrace";
option go_package = "cloud.google.com/go/trace/apiv2/tracepb;tracepb";
option java_multiple_files = true;
option java_outer_classname = "TraceProto";
option java_package = "com.google.devtools.cloudtrace.v2";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ import "google/devtools/cloudtrace/v2/trace.proto";
import "google/protobuf/empty.proto";

option csharp_namespace = "Google.Cloud.Trace.V2";
option go_package = "google.golang.org/genproto/googleapis/devtools/cloudtrace/v2;cloudtrace";
option go_package = "cloud.google.com/go/trace/apiv2/tracepb;tracepb";
option java_multiple_files = true;
option java_outer_classname = "TracingProto";
option java_package = "com.google.devtools.cloudtrace.v2";
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright 2022 Google LLC
// Copyright 2023 Google LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -67,7 +67,7 @@ message HttpRequest {

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

// The request processing latency on the server, from the time the request was
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright 2022 Google LLC
// Copyright 2023 Google LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
Expand Down
Loading

0 comments on commit 6b30502

Please sign in to comment.