Skip to content

Commit 1fb1181

Browse files
feat: [cloudprofiler] add start_time to Profile proto (#5086)
* feat: add `start_time` to Profile proto docs: update documentation to add guidance around use of ProfilerService API methods PiperOrigin-RevId: 609836544 Source-Link: googleapis/googleapis@c5b43c8 Source-Link: googleapis/googleapis-gen@aefdaf1 Copy-Tag: eyJwIjoicGFja2FnZXMvZ29vZ2xlLWRldnRvb2xzLWNsb3VkcHJvZmlsZXIvLk93bEJvdC55YW1sIiwiaCI6ImFlZmRhZjE1MjA0Mjk4MDhiNWQ5NTRhZTI0ZjI5MjJlMjUxYzJhODkifQ== * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md --------- Co-authored-by: Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com>
1 parent d1cc37b commit 1fb1181

8 files changed

Lines changed: 457 additions & 21 deletions

File tree

packages/google-devtools-cloudprofiler/protos/google/devtools/cloudprofiler/v2/profiler.proto

Lines changed: 28 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ import "google/api/field_behavior.proto";
2222
import "google/api/resource.proto";
2323
import "google/protobuf/duration.proto";
2424
import "google/protobuf/field_mask.proto";
25+
import "google/protobuf/timestamp.proto";
2526

2627
option csharp_namespace = "Google.Cloud.Profiler.V2";
2728
option go_package = "cloud.google.com/go/cloudprofiler/apiv2/cloudprofilerpb;cloudprofilerpb";
@@ -34,9 +35,8 @@ option ruby_package = "Google::Cloud::Profiler::V2";
3435
// Manage the collection of continuous profiling data provided by profiling
3536
// agents running in the cloud or by an offline provider of profiling data.
3637
//
37-
// General guidelines:
38-
// * Profiles for a single deployment must be created in ascending time order.
39-
// * Profiles can be created in either online or offline mode, see below.
38+
// __The APIs listed in this service are intended for use within our profiler
39+
// agents only.__
4040
service ProfilerService {
4141
option (google.api.default_host) = "cloudprofiler.googleapis.com";
4242
option (google.api.oauth_scopes) =
@@ -46,6 +46,11 @@ service ProfilerService {
4646

4747
// CreateProfile creates a new profile resource in the online mode.
4848
//
49+
// _Direct use of this API is discouraged, please use a [supported
50+
// profiler
51+
// agent](https://cloud.google.com/profiler/docs/about-profiler#profiling_agent)
52+
// instead for profile collection._
53+
//
4954
// The server ensures that the new profiles are created at a constant rate per
5055
// deployment, so the creation request may hang for some time until the next
5156
// profile session is available.
@@ -65,9 +70,14 @@ service ProfilerService {
6570
};
6671
}
6772

68-
// CreateOfflineProfile creates a new profile resource in the offline mode.
69-
// The client provides the profile to create along with the profile bytes, the
70-
// server records it.
73+
// CreateOfflineProfile creates a new profile resource in the offline
74+
// mode. The client provides the profile to create along with the profile
75+
// bytes, the server records it.
76+
//
77+
// _Direct use of this API is discouraged, please use a [supported
78+
// profiler
79+
// agent](https://cloud.google.com/profiler/docs/about-profiler#profiling_agent)
80+
// instead for profile collection._
7181
rpc CreateOfflineProfile(CreateOfflineProfileRequest) returns (Profile) {
7282
option (google.api.http) = {
7383
post: "/v2/{parent=projects/*}/profiles:createOffline"
@@ -80,6 +90,11 @@ service ProfilerService {
8090
// created in the online mode. Updating the bytes for profiles created in the
8191
// offline mode is currently not supported: the profile content must be
8292
// provided at the time of the profile creation.
93+
//
94+
// _Direct use of this API is discouraged, please use a [supported
95+
// profiler
96+
// agent](https://cloud.google.com/profiler/docs/about-profiler#profiling_agent)
97+
// instead for profile collection._
8398
rpc UpdateProfile(UpdateProfileRequest) returns (Profile) {
8499
option (google.api.http) = {
85100
patch: "/v2/{profile.name=projects/*/profiles/*}"
@@ -104,6 +119,7 @@ service ExportService {
104119
option (google.api.http) = {
105120
get: "/v2/{parent=projects/*}/profiles"
106121
};
122+
option (google.api.method_signature) = "parent";
107123
}
108124
}
109125

@@ -183,6 +199,11 @@ message Profile {
183199
// get merged with the deployment labels for the final data set. See
184200
// documentation on deployment labels for validation rules and limits.
185201
map<string, string> labels = 6 [(google.api.field_behavior) = INPUT_ONLY];
202+
203+
// Output only. Start time for the profile.
204+
// This output is only present in response from the ListProfiles method.
205+
google.protobuf.Timestamp start_time = 7
206+
[(google.api.field_behavior) = OUTPUT_ONLY];
186207
}
187208

188209
// Deployment contains the deployment identification information.
@@ -264,7 +285,7 @@ message ListProfilesRequest {
264285

265286
// The maximum number of items to return.
266287
// Default page_size is 1000.
267-
// Max limit is 10000.
288+
// Max limit is 1000.
268289
int32 page_size = 2;
269290

270291
// The token to continue pagination and get profiles from a particular page.

packages/google-devtools-cloudprofiler/protos/protos.d.ts

Lines changed: 109 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)