google-apis-cloudtrace_v2 0.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/.yardopts +13 -0
- data/CHANGELOG.md +7 -0
- data/LICENSE.md +202 -0
- data/OVERVIEW.md +96 -0
- data/lib/google-apis-cloudtrace_v2.rb +15 -0
- data/lib/google/apis/cloudtrace_v2.rb +43 -0
- data/lib/google/apis/cloudtrace_v2/classes.rb +652 -0
- data/lib/google/apis/cloudtrace_v2/gem_version.rb +28 -0
- data/lib/google/apis/cloudtrace_v2/representations.rb +311 -0
- data/lib/google/apis/cloudtrace_v2/service.rb +136 -0
- metadata +76 -0
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: 66fcf72e404f6ba9f12cbf6f228ea54c67b2d2e0c7d2683e430bc85d676d20ed
|
4
|
+
data.tar.gz: 555b0d546625d55a38bb13622900f872832cc72c7a47099589751df8490df8f4
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: 11fd5c009c87d90d243392e117baf50763430633cbf29634c14f1cb62a0b27351d1030d49e74bae6a39b8b3f1f1e989bbc8a27017d32c2243385442ccd0c0322
|
7
|
+
data.tar.gz: 46adcb7f9b49a3d94c9f2acd9df34c2d2a7ff79093aedd7f540dcf29c0693242fc942bee3c2ca4e1a16da9d16c7225e44ab2e049e26467cc4904a22939e50d5b
|
data/.yardopts
ADDED
@@ -0,0 +1,13 @@
|
|
1
|
+
--hide-void-return
|
2
|
+
--no-private
|
3
|
+
--verbose
|
4
|
+
--title=google-apis-cloudtrace_v2
|
5
|
+
--markup-provider=redcarpet
|
6
|
+
--markup=markdown
|
7
|
+
--main OVERVIEW.md
|
8
|
+
lib/google/apis/cloudtrace_v2/*.rb
|
9
|
+
lib/google/apis/cloudtrace_v2.rb
|
10
|
+
-
|
11
|
+
OVERVIEW.md
|
12
|
+
CHANGELOG.md
|
13
|
+
LICENSE.md
|
data/CHANGELOG.md
ADDED
data/LICENSE.md
ADDED
@@ -0,0 +1,202 @@
|
|
1
|
+
|
2
|
+
Apache License
|
3
|
+
Version 2.0, January 2004
|
4
|
+
http://www.apache.org/licenses/
|
5
|
+
|
6
|
+
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
7
|
+
|
8
|
+
1. Definitions.
|
9
|
+
|
10
|
+
"License" shall mean the terms and conditions for use, reproduction,
|
11
|
+
and distribution as defined by Sections 1 through 9 of this document.
|
12
|
+
|
13
|
+
"Licensor" shall mean the copyright owner or entity authorized by
|
14
|
+
the copyright owner that is granting the License.
|
15
|
+
|
16
|
+
"Legal Entity" shall mean the union of the acting entity and all
|
17
|
+
other entities that control, are controlled by, or are under common
|
18
|
+
control with that entity. For the purposes of this definition,
|
19
|
+
"control" means (i) the power, direct or indirect, to cause the
|
20
|
+
direction or management of such entity, whether by contract or
|
21
|
+
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
22
|
+
outstanding shares, or (iii) beneficial ownership of such entity.
|
23
|
+
|
24
|
+
"You" (or "Your") shall mean an individual or Legal Entity
|
25
|
+
exercising permissions granted by this License.
|
26
|
+
|
27
|
+
"Source" form shall mean the preferred form for making modifications,
|
28
|
+
including but not limited to software source code, documentation
|
29
|
+
source, and configuration files.
|
30
|
+
|
31
|
+
"Object" form shall mean any form resulting from mechanical
|
32
|
+
transformation or translation of a Source form, including but
|
33
|
+
not limited to compiled object code, generated documentation,
|
34
|
+
and conversions to other media types.
|
35
|
+
|
36
|
+
"Work" shall mean the work of authorship, whether in Source or
|
37
|
+
Object form, made available under the License, as indicated by a
|
38
|
+
copyright notice that is included in or attached to the work
|
39
|
+
(an example is provided in the Appendix below).
|
40
|
+
|
41
|
+
"Derivative Works" shall mean any work, whether in Source or Object
|
42
|
+
form, that is based on (or derived from) the Work and for which the
|
43
|
+
editorial revisions, annotations, elaborations, or other modifications
|
44
|
+
represent, as a whole, an original work of authorship. For the purposes
|
45
|
+
of this License, Derivative Works shall not include works that remain
|
46
|
+
separable from, or merely link (or bind by name) to the interfaces of,
|
47
|
+
the Work and Derivative Works thereof.
|
48
|
+
|
49
|
+
"Contribution" shall mean any work of authorship, including
|
50
|
+
the original version of the Work and any modifications or additions
|
51
|
+
to that Work or Derivative Works thereof, that is intentionally
|
52
|
+
submitted to Licensor for inclusion in the Work by the copyright owner
|
53
|
+
or by an individual or Legal Entity authorized to submit on behalf of
|
54
|
+
the copyright owner. For the purposes of this definition, "submitted"
|
55
|
+
means any form of electronic, verbal, or written communication sent
|
56
|
+
to the Licensor or its representatives, including but not limited to
|
57
|
+
communication on electronic mailing lists, source code control systems,
|
58
|
+
and issue tracking systems that are managed by, or on behalf of, the
|
59
|
+
Licensor for the purpose of discussing and improving the Work, but
|
60
|
+
excluding communication that is conspicuously marked or otherwise
|
61
|
+
designated in writing by the copyright owner as "Not a Contribution."
|
62
|
+
|
63
|
+
"Contributor" shall mean Licensor and any individual or Legal Entity
|
64
|
+
on behalf of whom a Contribution has been received by Licensor and
|
65
|
+
subsequently incorporated within the Work.
|
66
|
+
|
67
|
+
2. Grant of Copyright License. Subject to the terms and conditions of
|
68
|
+
this License, each Contributor hereby grants to You a perpetual,
|
69
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
70
|
+
copyright license to reproduce, prepare Derivative Works of,
|
71
|
+
publicly display, publicly perform, sublicense, and distribute the
|
72
|
+
Work and such Derivative Works in Source or Object form.
|
73
|
+
|
74
|
+
3. Grant of Patent License. Subject to the terms and conditions of
|
75
|
+
this License, each Contributor hereby grants to You a perpetual,
|
76
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
77
|
+
(except as stated in this section) patent license to make, have made,
|
78
|
+
use, offer to sell, sell, import, and otherwise transfer the Work,
|
79
|
+
where such license applies only to those patent claims licensable
|
80
|
+
by such Contributor that are necessarily infringed by their
|
81
|
+
Contribution(s) alone or by combination of their Contribution(s)
|
82
|
+
with the Work to which such Contribution(s) was submitted. If You
|
83
|
+
institute patent litigation against any entity (including a
|
84
|
+
cross-claim or counterclaim in a lawsuit) alleging that the Work
|
85
|
+
or a Contribution incorporated within the Work constitutes direct
|
86
|
+
or contributory patent infringement, then any patent licenses
|
87
|
+
granted to You under this License for that Work shall terminate
|
88
|
+
as of the date such litigation is filed.
|
89
|
+
|
90
|
+
4. Redistribution. You may reproduce and distribute copies of the
|
91
|
+
Work or Derivative Works thereof in any medium, with or without
|
92
|
+
modifications, and in Source or Object form, provided that You
|
93
|
+
meet the following conditions:
|
94
|
+
|
95
|
+
(a) You must give any other recipients of the Work or
|
96
|
+
Derivative Works a copy of this License; and
|
97
|
+
|
98
|
+
(b) You must cause any modified files to carry prominent notices
|
99
|
+
stating that You changed the files; and
|
100
|
+
|
101
|
+
(c) You must retain, in the Source form of any Derivative Works
|
102
|
+
that You distribute, all copyright, patent, trademark, and
|
103
|
+
attribution notices from the Source form of the Work,
|
104
|
+
excluding those notices that do not pertain to any part of
|
105
|
+
the Derivative Works; and
|
106
|
+
|
107
|
+
(d) If the Work includes a "NOTICE" text file as part of its
|
108
|
+
distribution, then any Derivative Works that You distribute must
|
109
|
+
include a readable copy of the attribution notices contained
|
110
|
+
within such NOTICE file, excluding those notices that do not
|
111
|
+
pertain to any part of the Derivative Works, in at least one
|
112
|
+
of the following places: within a NOTICE text file distributed
|
113
|
+
as part of the Derivative Works; within the Source form or
|
114
|
+
documentation, if provided along with the Derivative Works; or,
|
115
|
+
within a display generated by the Derivative Works, if and
|
116
|
+
wherever such third-party notices normally appear. The contents
|
117
|
+
of the NOTICE file are for informational purposes only and
|
118
|
+
do not modify the License. You may add Your own attribution
|
119
|
+
notices within Derivative Works that You distribute, alongside
|
120
|
+
or as an addendum to the NOTICE text from the Work, provided
|
121
|
+
that such additional attribution notices cannot be construed
|
122
|
+
as modifying the License.
|
123
|
+
|
124
|
+
You may add Your own copyright statement to Your modifications and
|
125
|
+
may provide additional or different license terms and conditions
|
126
|
+
for use, reproduction, or distribution of Your modifications, or
|
127
|
+
for any such Derivative Works as a whole, provided Your use,
|
128
|
+
reproduction, and distribution of the Work otherwise complies with
|
129
|
+
the conditions stated in this License.
|
130
|
+
|
131
|
+
5. Submission of Contributions. Unless You explicitly state otherwise,
|
132
|
+
any Contribution intentionally submitted for inclusion in the Work
|
133
|
+
by You to the Licensor shall be under the terms and conditions of
|
134
|
+
this License, without any additional terms or conditions.
|
135
|
+
Notwithstanding the above, nothing herein shall supersede or modify
|
136
|
+
the terms of any separate license agreement you may have executed
|
137
|
+
with Licensor regarding such Contributions.
|
138
|
+
|
139
|
+
6. Trademarks. This License does not grant permission to use the trade
|
140
|
+
names, trademarks, service marks, or product names of the Licensor,
|
141
|
+
except as required for reasonable and customary use in describing the
|
142
|
+
origin of the Work and reproducing the content of the NOTICE file.
|
143
|
+
|
144
|
+
7. Disclaimer of Warranty. Unless required by applicable law or
|
145
|
+
agreed to in writing, Licensor provides the Work (and each
|
146
|
+
Contributor provides its Contributions) on an "AS IS" BASIS,
|
147
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
148
|
+
implied, including, without limitation, any warranties or conditions
|
149
|
+
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
150
|
+
PARTICULAR PURPOSE. You are solely responsible for determining the
|
151
|
+
appropriateness of using or redistributing the Work and assume any
|
152
|
+
risks associated with Your exercise of permissions under this License.
|
153
|
+
|
154
|
+
8. Limitation of Liability. In no event and under no legal theory,
|
155
|
+
whether in tort (including negligence), contract, or otherwise,
|
156
|
+
unless required by applicable law (such as deliberate and grossly
|
157
|
+
negligent acts) or agreed to in writing, shall any Contributor be
|
158
|
+
liable to You for damages, including any direct, indirect, special,
|
159
|
+
incidental, or consequential damages of any character arising as a
|
160
|
+
result of this License or out of the use or inability to use the
|
161
|
+
Work (including but not limited to damages for loss of goodwill,
|
162
|
+
work stoppage, computer failure or malfunction, or any and all
|
163
|
+
other commercial damages or losses), even if such Contributor
|
164
|
+
has been advised of the possibility of such damages.
|
165
|
+
|
166
|
+
9. Accepting Warranty or Additional Liability. While redistributing
|
167
|
+
the Work or Derivative Works thereof, You may choose to offer,
|
168
|
+
and charge a fee for, acceptance of support, warranty, indemnity,
|
169
|
+
or other liability obligations and/or rights consistent with this
|
170
|
+
License. However, in accepting such obligations, You may act only
|
171
|
+
on Your own behalf and on Your sole responsibility, not on behalf
|
172
|
+
of any other Contributor, and only if You agree to indemnify,
|
173
|
+
defend, and hold each Contributor harmless for any liability
|
174
|
+
incurred by, or claims asserted against, such Contributor by reason
|
175
|
+
of your accepting any such warranty or additional liability.
|
176
|
+
|
177
|
+
END OF TERMS AND CONDITIONS
|
178
|
+
|
179
|
+
APPENDIX: How to apply the Apache License to your work.
|
180
|
+
|
181
|
+
To apply the Apache License to your work, attach the following
|
182
|
+
boilerplate notice, with the fields enclosed by brackets "[]"
|
183
|
+
replaced with your own identifying information. (Don't include
|
184
|
+
the brackets!) The text should be enclosed in the appropriate
|
185
|
+
comment syntax for the file format. We also recommend that a
|
186
|
+
file or class name and description of purpose be included on the
|
187
|
+
same "printed page" as the copyright notice for easier
|
188
|
+
identification within third-party archives.
|
189
|
+
|
190
|
+
Copyright [yyyy] [name of copyright owner]
|
191
|
+
|
192
|
+
Licensed under the Apache License, Version 2.0 (the "License");
|
193
|
+
you may not use this file except in compliance with the License.
|
194
|
+
You may obtain a copy of the License at
|
195
|
+
|
196
|
+
http://www.apache.org/licenses/LICENSE-2.0
|
197
|
+
|
198
|
+
Unless required by applicable law or agreed to in writing, software
|
199
|
+
distributed under the License is distributed on an "AS IS" BASIS,
|
200
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
201
|
+
See the License for the specific language governing permissions and
|
202
|
+
limitations under the License.
|
data/OVERVIEW.md
ADDED
@@ -0,0 +1,96 @@
|
|
1
|
+
# Simple REST client for version V2 of the Cloud Trace API
|
2
|
+
|
3
|
+
This is a simple client library for version V2 of the Cloud Trace API. It provides:
|
4
|
+
|
5
|
+
* A client object that connects to the HTTP/JSON REST endpoint for the service.
|
6
|
+
* Ruby objects for data structures related to the service.
|
7
|
+
* Integration with the googleauth gem for authentication using OAuth, API keys, and service accounts.
|
8
|
+
* Control of retry, pagination, and timeouts.
|
9
|
+
|
10
|
+
Note that although this client library is supported and will continue to be updated to track changes to the service, it is otherwise considered complete and not under active development. Many Google services, especially Google Cloud Platform services, may provide a more modern client that is under more active development and improvement. See the section below titled *Which client should I use?* for more information.
|
11
|
+
|
12
|
+
## Getting started
|
13
|
+
|
14
|
+
### Before you begin
|
15
|
+
|
16
|
+
There are a few setup steps you need to complete before you can use this library:
|
17
|
+
|
18
|
+
1. If you don't already have a Google account, [sign up](https://www.google.com/accounts).
|
19
|
+
2. If you have never created a Google APIs Console project, read about [Managing Projects](https://cloud.google.com/resource-manager/docs/creating-managing-projects) and create a project in the [Google API Console](https://console.cloud.google.com/).
|
20
|
+
3. Most APIs need to be enabled for your project. [Enable it](https://console.cloud.google.com/apis/library/cloudtrace.googleapis.com) in the console.
|
21
|
+
|
22
|
+
### Installation
|
23
|
+
|
24
|
+
Add this line to your application's Gemfile:
|
25
|
+
|
26
|
+
```ruby
|
27
|
+
gem 'google-apis-cloudtrace_v2', '~> 0.1'
|
28
|
+
```
|
29
|
+
|
30
|
+
And then execute:
|
31
|
+
|
32
|
+
```
|
33
|
+
$ bundle
|
34
|
+
```
|
35
|
+
|
36
|
+
Or install it yourself as:
|
37
|
+
|
38
|
+
```
|
39
|
+
$ gem install google-apis-cloudtrace_v2
|
40
|
+
```
|
41
|
+
|
42
|
+
### Creating a client object
|
43
|
+
|
44
|
+
Once the gem is installed, you can load the client code and instantiate a client.
|
45
|
+
|
46
|
+
```ruby
|
47
|
+
# Load the client
|
48
|
+
require "google/apis/cloudtrace_v2"
|
49
|
+
|
50
|
+
# Create a client object
|
51
|
+
client = Google::Apis::CloudtraceV2::CloudTraceService.new
|
52
|
+
|
53
|
+
# Authenticate calls
|
54
|
+
client.authentication = # ... use the googleauth gem to create credentials
|
55
|
+
```
|
56
|
+
|
57
|
+
See the class reference docs for information on the methods you can call from a client.
|
58
|
+
|
59
|
+
## Documentation
|
60
|
+
|
61
|
+
More detailed descriptions of the Google simple REST clients are available in two documents.
|
62
|
+
|
63
|
+
* The [Usage Guide](https://github.com/googleapis/google-api-ruby-client/blob/master/docs/usage-guide.md) discusses how to make API calls, how to use the provided data structures, and how to work the various features of the client library, including media upload and download, error handling, retries, pagination, and logging.
|
64
|
+
* The [Auth Guide](https://github.com/googleapis/google-api-ruby-client/blob/master/docs/auth-guide.md) discusses authentication in the client libraries, including API keys, OAuth 2.0, service accounts, and environment variables.
|
65
|
+
|
66
|
+
(Note: the above documents are written for the simple REST clients in general, and their examples may not reflect the Cloudtrace service in particular.)
|
67
|
+
|
68
|
+
For reference information on specific calls in the Cloud Trace API, see the {Google::Apis::CloudtraceV2::CloudTraceService class reference docs}.
|
69
|
+
|
70
|
+
## Which client should I use?
|
71
|
+
|
72
|
+
Google provides two types of Ruby API client libraries: **simple REST clients** and **modern clients**.
|
73
|
+
|
74
|
+
This library, `google-apis-cloudtrace_v2`, is a simple REST client. You can identify these clients by their gem names, which are always in the form `google-apis-<servicename>_<serviceversion>`. The simple REST clients connect to HTTP/JSON REST endpoints and are automatically generated from service discovery documents. They support most API functionality, but their class interfaces are sometimes awkward.
|
75
|
+
|
76
|
+
Modern clients are produced by a modern code generator, sometimes combined with hand-crafted functionality. Most modern clients connect to high-performance gRPC endpoints, although a few are backed by REST services. Modern clients are available for many Google services, especially Google Cloud Platform services, but do not yet support all the services covered by the simple clients.
|
77
|
+
|
78
|
+
Gem names for modern clients are often of the form `google-cloud-<service_name>`. (For example, [google-cloud-pubsub](https://rubygems.org/gems/google-cloud-pubsub).) Note that most modern clients also have corresponding "versioned" gems with names like `google-cloud-<service_name>-<version>`. (For example, [google-cloud-pubsub-v1](https://rubygems.org/gems/google-cloud-pubsub-v1).) The "versioned" gems can be used directly, but often provide lower-level interfaces. In most cases, the main gem is recommended.
|
79
|
+
|
80
|
+
**For most users, we recommend the modern client, if one is available.** Compared with simple clients, modern clients are generally much easier to use and more Ruby-like, support more advanced features such as streaming and long-running operations, and often provide much better performance. You may consider using a simple client instead, if a modern client is not yet available for the service you want to use, or if you are not able to use gRPC on your infrastructure.
|
81
|
+
|
82
|
+
The [product documentation](https://cloud.google.com/trace) may provide guidance regarding the preferred client library to use.
|
83
|
+
|
84
|
+
## Supported Ruby versions
|
85
|
+
|
86
|
+
This library is supported on Ruby 2.5+.
|
87
|
+
|
88
|
+
Google provides official support for Ruby versions that are actively supported by Ruby Core -- that is, Ruby versions that are either in normal maintenance or in security maintenance, and not end of life. Currently, this means Ruby 2.5 and later. Older versions of Ruby _may_ still work, but are unsupported and not recommended. See https://www.ruby-lang.org/en/downloads/branches/ for details about the Ruby support schedule.
|
89
|
+
|
90
|
+
## License
|
91
|
+
|
92
|
+
This library is licensed under Apache 2.0. Full license text is available in the {file:LICENSE.md LICENSE}.
|
93
|
+
|
94
|
+
## Support
|
95
|
+
|
96
|
+
Please [report bugs at the project on Github](https://github.com/google/google-api-ruby-client/issues). Don't hesitate to [ask questions](http://stackoverflow.com/questions/tagged/google-api-ruby-client) about the client or APIs on [StackOverflow](http://stackoverflow.com).
|
@@ -0,0 +1,15 @@
|
|
1
|
+
# Copyright 2020 Google LLC
|
2
|
+
#
|
3
|
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
4
|
+
# you may not use this file except in compliance with the License.
|
5
|
+
# You may obtain a copy of the License at
|
6
|
+
#
|
7
|
+
# http://www.apache.org/licenses/LICENSE-2.0
|
8
|
+
#
|
9
|
+
# Unless required by applicable law or agreed to in writing, software
|
10
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
11
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
12
|
+
# See the License for the specific language governing permissions and
|
13
|
+
# limitations under the License.
|
14
|
+
|
15
|
+
require "google/apis/cloudtrace_v2"
|
@@ -0,0 +1,43 @@
|
|
1
|
+
# Copyright 2020 Google LLC
|
2
|
+
#
|
3
|
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
4
|
+
# you may not use this file except in compliance with the License.
|
5
|
+
# You may obtain a copy of the License at
|
6
|
+
#
|
7
|
+
# http://www.apache.org/licenses/LICENSE-2.0
|
8
|
+
#
|
9
|
+
# Unless required by applicable law or agreed to in writing, software
|
10
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
11
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
12
|
+
# See the License for the specific language governing permissions and
|
13
|
+
# limitations under the License.
|
14
|
+
|
15
|
+
require 'google/apis/cloudtrace_v2/service.rb'
|
16
|
+
require 'google/apis/cloudtrace_v2/classes.rb'
|
17
|
+
require 'google/apis/cloudtrace_v2/representations.rb'
|
18
|
+
require 'google/apis/cloudtrace_v2/gem_version.rb'
|
19
|
+
|
20
|
+
module Google
|
21
|
+
module Apis
|
22
|
+
# Cloud Trace API
|
23
|
+
#
|
24
|
+
# Sends application trace data to Cloud Trace for viewing. Trace data is
|
25
|
+
# collected for all App Engine applications by default. Trace data from other
|
26
|
+
# applications can be provided using this API. This library is used to interact
|
27
|
+
# with the Cloud Trace API directly. If you are looking to instrument your
|
28
|
+
# application for Cloud Trace, we recommend using OpenCensus.
|
29
|
+
#
|
30
|
+
# @see https://cloud.google.com/trace
|
31
|
+
module CloudtraceV2
|
32
|
+
# Version of the Cloud Trace API this client connects to.
|
33
|
+
# This is NOT the gem version.
|
34
|
+
VERSION = 'V2'
|
35
|
+
|
36
|
+
# View and manage your data across Google Cloud Platform services
|
37
|
+
AUTH_CLOUD_PLATFORM = 'https://www.googleapis.com/auth/cloud-platform'
|
38
|
+
|
39
|
+
# Write Trace data for a project or application
|
40
|
+
AUTH_TRACE_APPEND = 'https://www.googleapis.com/auth/trace.append'
|
41
|
+
end
|
42
|
+
end
|
43
|
+
end
|
@@ -0,0 +1,652 @@
|
|
1
|
+
# Copyright 2020 Google LLC
|
2
|
+
#
|
3
|
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
4
|
+
# you may not use this file except in compliance with the License.
|
5
|
+
# You may obtain a copy of the License at
|
6
|
+
#
|
7
|
+
# http://www.apache.org/licenses/LICENSE-2.0
|
8
|
+
#
|
9
|
+
# Unless required by applicable law or agreed to in writing, software
|
10
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
11
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
12
|
+
# See the License for the specific language governing permissions and
|
13
|
+
# limitations under the License.
|
14
|
+
|
15
|
+
require 'date'
|
16
|
+
require 'google/apis/core/base_service'
|
17
|
+
require 'google/apis/core/json_representation'
|
18
|
+
require 'google/apis/core/hashable'
|
19
|
+
require 'google/apis/errors'
|
20
|
+
|
21
|
+
module Google
|
22
|
+
module Apis
|
23
|
+
module CloudtraceV2
|
24
|
+
|
25
|
+
# Text annotation with a set of attributes.
|
26
|
+
class Annotation
|
27
|
+
include Google::Apis::Core::Hashable
|
28
|
+
|
29
|
+
# A set of attributes, each in the format `[KEY]:[VALUE]`.
|
30
|
+
# Corresponds to the JSON property `attributes`
|
31
|
+
# @return [Google::Apis::CloudtraceV2::Attributes]
|
32
|
+
attr_accessor :attributes
|
33
|
+
|
34
|
+
# Represents a string that might be shortened to a specified length.
|
35
|
+
# Corresponds to the JSON property `description`
|
36
|
+
# @return [Google::Apis::CloudtraceV2::TruncatableString]
|
37
|
+
attr_accessor :description
|
38
|
+
|
39
|
+
def initialize(**args)
|
40
|
+
update!(**args)
|
41
|
+
end
|
42
|
+
|
43
|
+
# Update properties of this object
|
44
|
+
def update!(**args)
|
45
|
+
@attributes = args[:attributes] if args.key?(:attributes)
|
46
|
+
@description = args[:description] if args.key?(:description)
|
47
|
+
end
|
48
|
+
end
|
49
|
+
|
50
|
+
# The allowed types for [VALUE] in a `[KEY]:[VALUE]` attribute.
|
51
|
+
class AttributeValue
|
52
|
+
include Google::Apis::Core::Hashable
|
53
|
+
|
54
|
+
# A Boolean value represented by `true` or `false`.
|
55
|
+
# Corresponds to the JSON property `boolValue`
|
56
|
+
# @return [Boolean]
|
57
|
+
attr_accessor :bool_value
|
58
|
+
alias_method :bool_value?, :bool_value
|
59
|
+
|
60
|
+
# A 64-bit signed integer.
|
61
|
+
# Corresponds to the JSON property `intValue`
|
62
|
+
# @return [Fixnum]
|
63
|
+
attr_accessor :int_value
|
64
|
+
|
65
|
+
# Represents a string that might be shortened to a specified length.
|
66
|
+
# Corresponds to the JSON property `stringValue`
|
67
|
+
# @return [Google::Apis::CloudtraceV2::TruncatableString]
|
68
|
+
attr_accessor :string_value
|
69
|
+
|
70
|
+
def initialize(**args)
|
71
|
+
update!(**args)
|
72
|
+
end
|
73
|
+
|
74
|
+
# Update properties of this object
|
75
|
+
def update!(**args)
|
76
|
+
@bool_value = args[:bool_value] if args.key?(:bool_value)
|
77
|
+
@int_value = args[:int_value] if args.key?(:int_value)
|
78
|
+
@string_value = args[:string_value] if args.key?(:string_value)
|
79
|
+
end
|
80
|
+
end
|
81
|
+
|
82
|
+
# A set of attributes, each in the format `[KEY]:[VALUE]`.
|
83
|
+
class Attributes
|
84
|
+
include Google::Apis::Core::Hashable
|
85
|
+
|
86
|
+
# The set of attributes. Each attribute's key can be up to 128 bytes long. The
|
87
|
+
# value can be a string up to 256 bytes, a signed 64-bit integer, or the Boolean
|
88
|
+
# values `true` and `false`. For example: "/instance_id": ` "string_value": ` "
|
89
|
+
# value": "my-instance" ` ` "/http/request_bytes": ` "int_value": 300 ` "abc.com/
|
90
|
+
# myattribute": ` "bool_value": false `
|
91
|
+
# Corresponds to the JSON property `attributeMap`
|
92
|
+
# @return [Hash<String,Google::Apis::CloudtraceV2::AttributeValue>]
|
93
|
+
attr_accessor :attribute_map
|
94
|
+
|
95
|
+
# The number of attributes that were discarded. Attributes can be discarded
|
96
|
+
# because their keys are too long or because there are too many attributes. If
|
97
|
+
# this value is 0 then all attributes are valid.
|
98
|
+
# Corresponds to the JSON property `droppedAttributesCount`
|
99
|
+
# @return [Fixnum]
|
100
|
+
attr_accessor :dropped_attributes_count
|
101
|
+
|
102
|
+
def initialize(**args)
|
103
|
+
update!(**args)
|
104
|
+
end
|
105
|
+
|
106
|
+
# Update properties of this object
|
107
|
+
def update!(**args)
|
108
|
+
@attribute_map = args[:attribute_map] if args.key?(:attribute_map)
|
109
|
+
@dropped_attributes_count = args[:dropped_attributes_count] if args.key?(:dropped_attributes_count)
|
110
|
+
end
|
111
|
+
end
|
112
|
+
|
113
|
+
# The request message for the `BatchWriteSpans` method.
|
114
|
+
class BatchWriteSpansRequest
|
115
|
+
include Google::Apis::Core::Hashable
|
116
|
+
|
117
|
+
# Required. A list of new spans. The span names must not match existing spans,
|
118
|
+
# or the results are undefined.
|
119
|
+
# Corresponds to the JSON property `spans`
|
120
|
+
# @return [Array<Google::Apis::CloudtraceV2::Span>]
|
121
|
+
attr_accessor :spans
|
122
|
+
|
123
|
+
def initialize(**args)
|
124
|
+
update!(**args)
|
125
|
+
end
|
126
|
+
|
127
|
+
# Update properties of this object
|
128
|
+
def update!(**args)
|
129
|
+
@spans = args[:spans] if args.key?(:spans)
|
130
|
+
end
|
131
|
+
end
|
132
|
+
|
133
|
+
# A generic empty message that you can re-use to avoid defining duplicated empty
|
134
|
+
# messages in your APIs. A typical example is to use it as the request or the
|
135
|
+
# response type of an API method. For instance: service Foo ` rpc Bar(google.
|
136
|
+
# protobuf.Empty) returns (google.protobuf.Empty); ` The JSON representation for
|
137
|
+
# `Empty` is empty JSON object ````.
|
138
|
+
class Empty
|
139
|
+
include Google::Apis::Core::Hashable
|
140
|
+
|
141
|
+
def initialize(**args)
|
142
|
+
update!(**args)
|
143
|
+
end
|
144
|
+
|
145
|
+
# Update properties of this object
|
146
|
+
def update!(**args)
|
147
|
+
end
|
148
|
+
end
|
149
|
+
|
150
|
+
# A pointer from the current span to another span in the same trace or in a
|
151
|
+
# different trace. For example, this can be used in batching operations, where a
|
152
|
+
# single batch handler processes multiple requests from different traces or when
|
153
|
+
# the handler receives a request from a different project.
|
154
|
+
class Link
|
155
|
+
include Google::Apis::Core::Hashable
|
156
|
+
|
157
|
+
# A set of attributes, each in the format `[KEY]:[VALUE]`.
|
158
|
+
# Corresponds to the JSON property `attributes`
|
159
|
+
# @return [Google::Apis::CloudtraceV2::Attributes]
|
160
|
+
attr_accessor :attributes
|
161
|
+
|
162
|
+
# The [SPAN_ID] for a span within a trace.
|
163
|
+
# Corresponds to the JSON property `spanId`
|
164
|
+
# @return [String]
|
165
|
+
attr_accessor :span_id
|
166
|
+
|
167
|
+
# The [TRACE_ID] for a trace within a project.
|
168
|
+
# Corresponds to the JSON property `traceId`
|
169
|
+
# @return [String]
|
170
|
+
attr_accessor :trace_id
|
171
|
+
|
172
|
+
# The relationship of the current span relative to the linked span.
|
173
|
+
# Corresponds to the JSON property `type`
|
174
|
+
# @return [String]
|
175
|
+
attr_accessor :type
|
176
|
+
|
177
|
+
def initialize(**args)
|
178
|
+
update!(**args)
|
179
|
+
end
|
180
|
+
|
181
|
+
# Update properties of this object
|
182
|
+
def update!(**args)
|
183
|
+
@attributes = args[:attributes] if args.key?(:attributes)
|
184
|
+
@span_id = args[:span_id] if args.key?(:span_id)
|
185
|
+
@trace_id = args[:trace_id] if args.key?(:trace_id)
|
186
|
+
@type = args[:type] if args.key?(:type)
|
187
|
+
end
|
188
|
+
end
|
189
|
+
|
190
|
+
# A collection of links, which are references from this span to a span in the
|
191
|
+
# same or different trace.
|
192
|
+
class Links
|
193
|
+
include Google::Apis::Core::Hashable
|
194
|
+
|
195
|
+
# The number of dropped links after the maximum size was enforced. If this value
|
196
|
+
# is 0, then no links were dropped.
|
197
|
+
# Corresponds to the JSON property `droppedLinksCount`
|
198
|
+
# @return [Fixnum]
|
199
|
+
attr_accessor :dropped_links_count
|
200
|
+
|
201
|
+
# A collection of links.
|
202
|
+
# Corresponds to the JSON property `link`
|
203
|
+
# @return [Array<Google::Apis::CloudtraceV2::Link>]
|
204
|
+
attr_accessor :link
|
205
|
+
|
206
|
+
def initialize(**args)
|
207
|
+
update!(**args)
|
208
|
+
end
|
209
|
+
|
210
|
+
# Update properties of this object
|
211
|
+
def update!(**args)
|
212
|
+
@dropped_links_count = args[:dropped_links_count] if args.key?(:dropped_links_count)
|
213
|
+
@link = args[:link] if args.key?(:link)
|
214
|
+
end
|
215
|
+
end
|
216
|
+
|
217
|
+
# An event describing a message sent/received between Spans.
|
218
|
+
class MessageEvent
|
219
|
+
include Google::Apis::Core::Hashable
|
220
|
+
|
221
|
+
# The number of compressed bytes sent or received. If missing assumed to be the
|
222
|
+
# same size as uncompressed.
|
223
|
+
# Corresponds to the JSON property `compressedSizeBytes`
|
224
|
+
# @return [Fixnum]
|
225
|
+
attr_accessor :compressed_size_bytes
|
226
|
+
|
227
|
+
# An identifier for the MessageEvent's message that can be used to match SENT
|
228
|
+
# and RECEIVED MessageEvents. It is recommended to be unique within a Span.
|
229
|
+
# Corresponds to the JSON property `id`
|
230
|
+
# @return [Fixnum]
|
231
|
+
attr_accessor :id
|
232
|
+
|
233
|
+
# Type of MessageEvent. Indicates whether the message was sent or received.
|
234
|
+
# Corresponds to the JSON property `type`
|
235
|
+
# @return [String]
|
236
|
+
attr_accessor :type
|
237
|
+
|
238
|
+
# The number of uncompressed bytes sent or received.
|
239
|
+
# Corresponds to the JSON property `uncompressedSizeBytes`
|
240
|
+
# @return [Fixnum]
|
241
|
+
attr_accessor :uncompressed_size_bytes
|
242
|
+
|
243
|
+
def initialize(**args)
|
244
|
+
update!(**args)
|
245
|
+
end
|
246
|
+
|
247
|
+
# Update properties of this object
|
248
|
+
def update!(**args)
|
249
|
+
@compressed_size_bytes = args[:compressed_size_bytes] if args.key?(:compressed_size_bytes)
|
250
|
+
@id = args[:id] if args.key?(:id)
|
251
|
+
@type = args[:type] if args.key?(:type)
|
252
|
+
@uncompressed_size_bytes = args[:uncompressed_size_bytes] if args.key?(:uncompressed_size_bytes)
|
253
|
+
end
|
254
|
+
end
|
255
|
+
|
256
|
+
# Binary module.
|
257
|
+
class Module
|
258
|
+
include Google::Apis::Core::Hashable
|
259
|
+
|
260
|
+
# Represents a string that might be shortened to a specified length.
|
261
|
+
# Corresponds to the JSON property `buildId`
|
262
|
+
# @return [Google::Apis::CloudtraceV2::TruncatableString]
|
263
|
+
attr_accessor :build_id
|
264
|
+
|
265
|
+
# Represents a string that might be shortened to a specified length.
|
266
|
+
# Corresponds to the JSON property `module`
|
267
|
+
# @return [Google::Apis::CloudtraceV2::TruncatableString]
|
268
|
+
attr_accessor :module
|
269
|
+
|
270
|
+
def initialize(**args)
|
271
|
+
update!(**args)
|
272
|
+
end
|
273
|
+
|
274
|
+
# Update properties of this object
|
275
|
+
def update!(**args)
|
276
|
+
@build_id = args[:build_id] if args.key?(:build_id)
|
277
|
+
@module = args[:module] if args.key?(:module)
|
278
|
+
end
|
279
|
+
end
|
280
|
+
|
281
|
+
# A span represents a single operation within a trace. Spans can be nested to
|
282
|
+
# form a trace tree. Often, a trace contains a root span that describes the end-
|
283
|
+
# to-end latency, and one or more subspans for its sub-operations. A trace can
|
284
|
+
# also contain multiple root spans, or none at all. Spans do not need to be
|
285
|
+
# contiguous—there may be gaps or overlaps between spans in a trace.
|
286
|
+
class Span
|
287
|
+
include Google::Apis::Core::Hashable
|
288
|
+
|
289
|
+
# A set of attributes, each in the format `[KEY]:[VALUE]`.
|
290
|
+
# Corresponds to the JSON property `attributes`
|
291
|
+
# @return [Google::Apis::CloudtraceV2::Attributes]
|
292
|
+
attr_accessor :attributes
|
293
|
+
|
294
|
+
# Optional. The number of child spans that were generated while this span was
|
295
|
+
# active. If set, allows implementation to detect missing child spans.
|
296
|
+
# Corresponds to the JSON property `childSpanCount`
|
297
|
+
# @return [Fixnum]
|
298
|
+
attr_accessor :child_span_count
|
299
|
+
|
300
|
+
# Represents a string that might be shortened to a specified length.
|
301
|
+
# Corresponds to the JSON property `displayName`
|
302
|
+
# @return [Google::Apis::CloudtraceV2::TruncatableString]
|
303
|
+
attr_accessor :display_name
|
304
|
+
|
305
|
+
# Required. The end time of the span. On the client side, this is the time kept
|
306
|
+
# by the local machine where the span execution ends. On the server side, this
|
307
|
+
# is the time when the server application handler stops running.
|
308
|
+
# Corresponds to the JSON property `endTime`
|
309
|
+
# @return [String]
|
310
|
+
attr_accessor :end_time
|
311
|
+
|
312
|
+
# A collection of links, which are references from this span to a span in the
|
313
|
+
# same or different trace.
|
314
|
+
# Corresponds to the JSON property `links`
|
315
|
+
# @return [Google::Apis::CloudtraceV2::Links]
|
316
|
+
attr_accessor :links
|
317
|
+
|
318
|
+
# Required. The resource name of the span in the following format: projects/[
|
319
|
+
# PROJECT_ID]/traces/[TRACE_ID]/spans/SPAN_ID is a unique identifier for a trace
|
320
|
+
# within a project; it is a 32-character hexadecimal encoding of a 16-byte array.
|
321
|
+
# [SPAN_ID] is a unique identifier for a span within a trace; it is a 16-
|
322
|
+
# character hexadecimal encoding of an 8-byte array. It should not be zero.
|
323
|
+
# Corresponds to the JSON property `name`
|
324
|
+
# @return [String]
|
325
|
+
attr_accessor :name
|
326
|
+
|
327
|
+
# The [SPAN_ID] of this span's parent span. If this is a root span, then this
|
328
|
+
# field must be empty.
|
329
|
+
# Corresponds to the JSON property `parentSpanId`
|
330
|
+
# @return [String]
|
331
|
+
attr_accessor :parent_span_id
|
332
|
+
|
333
|
+
# Optional. Set this parameter to indicate whether this span is in the same
|
334
|
+
# process as its parent. If you do not set this parameter, Trace is unable to
|
335
|
+
# take advantage of this helpful information.
|
336
|
+
# Corresponds to the JSON property `sameProcessAsParentSpan`
|
337
|
+
# @return [Boolean]
|
338
|
+
attr_accessor :same_process_as_parent_span
|
339
|
+
alias_method :same_process_as_parent_span?, :same_process_as_parent_span
|
340
|
+
|
341
|
+
# Required. The [SPAN_ID] portion of the span's resource name.
|
342
|
+
# Corresponds to the JSON property `spanId`
|
343
|
+
# @return [String]
|
344
|
+
attr_accessor :span_id
|
345
|
+
|
346
|
+
# Optional. Distinguishes between spans generated in a particular context. For
|
347
|
+
# example, two spans with the same name may be distinguished using `CLIENT` (
|
348
|
+
# caller) and `SERVER` (callee) to identify an RPC call.
|
349
|
+
# Corresponds to the JSON property `spanKind`
|
350
|
+
# @return [String]
|
351
|
+
attr_accessor :span_kind
|
352
|
+
|
353
|
+
# A call stack appearing in a trace.
|
354
|
+
# Corresponds to the JSON property `stackTrace`
|
355
|
+
# @return [Google::Apis::CloudtraceV2::StackTrace]
|
356
|
+
attr_accessor :stack_trace
|
357
|
+
|
358
|
+
# Required. The start time of the span. On the client side, this is the time
|
359
|
+
# kept by the local machine where the span execution starts. On the server side,
|
360
|
+
# this is the time when the server's application handler starts running.
|
361
|
+
# Corresponds to the JSON property `startTime`
|
362
|
+
# @return [String]
|
363
|
+
attr_accessor :start_time
|
364
|
+
|
365
|
+
# The `Status` type defines a logical error model that is suitable for different
|
366
|
+
# programming environments, including REST APIs and RPC APIs. It is used by [
|
367
|
+
# gRPC](https://github.com/grpc). Each `Status` message contains three pieces of
|
368
|
+
# data: error code, error message, and error details. You can find out more
|
369
|
+
# about this error model and how to work with it in the [API Design Guide](https:
|
370
|
+
# //cloud.google.com/apis/design/errors).
|
371
|
+
# Corresponds to the JSON property `status`
|
372
|
+
# @return [Google::Apis::CloudtraceV2::Status]
|
373
|
+
attr_accessor :status
|
374
|
+
|
375
|
+
# A collection of `TimeEvent`s. A `TimeEvent` is a time-stamped annotation on
|
376
|
+
# the span, consisting of either user-supplied key:value pairs, or details of a
|
377
|
+
# message sent/received between Spans.
|
378
|
+
# Corresponds to the JSON property `timeEvents`
|
379
|
+
# @return [Google::Apis::CloudtraceV2::TimeEvents]
|
380
|
+
attr_accessor :time_events
|
381
|
+
|
382
|
+
def initialize(**args)
|
383
|
+
update!(**args)
|
384
|
+
end
|
385
|
+
|
386
|
+
# Update properties of this object
|
387
|
+
def update!(**args)
|
388
|
+
@attributes = args[:attributes] if args.key?(:attributes)
|
389
|
+
@child_span_count = args[:child_span_count] if args.key?(:child_span_count)
|
390
|
+
@display_name = args[:display_name] if args.key?(:display_name)
|
391
|
+
@end_time = args[:end_time] if args.key?(:end_time)
|
392
|
+
@links = args[:links] if args.key?(:links)
|
393
|
+
@name = args[:name] if args.key?(:name)
|
394
|
+
@parent_span_id = args[:parent_span_id] if args.key?(:parent_span_id)
|
395
|
+
@same_process_as_parent_span = args[:same_process_as_parent_span] if args.key?(:same_process_as_parent_span)
|
396
|
+
@span_id = args[:span_id] if args.key?(:span_id)
|
397
|
+
@span_kind = args[:span_kind] if args.key?(:span_kind)
|
398
|
+
@stack_trace = args[:stack_trace] if args.key?(:stack_trace)
|
399
|
+
@start_time = args[:start_time] if args.key?(:start_time)
|
400
|
+
@status = args[:status] if args.key?(:status)
|
401
|
+
@time_events = args[:time_events] if args.key?(:time_events)
|
402
|
+
end
|
403
|
+
end
|
404
|
+
|
405
|
+
# Represents a single stack frame in a stack trace.
|
406
|
+
class StackFrame
|
407
|
+
include Google::Apis::Core::Hashable
|
408
|
+
|
409
|
+
# The column number where the function call appears, if available. This is
|
410
|
+
# important in JavaScript because of its anonymous functions.
|
411
|
+
# Corresponds to the JSON property `columnNumber`
|
412
|
+
# @return [Fixnum]
|
413
|
+
attr_accessor :column_number
|
414
|
+
|
415
|
+
# Represents a string that might be shortened to a specified length.
|
416
|
+
# Corresponds to the JSON property `fileName`
|
417
|
+
# @return [Google::Apis::CloudtraceV2::TruncatableString]
|
418
|
+
attr_accessor :file_name
|
419
|
+
|
420
|
+
# Represents a string that might be shortened to a specified length.
|
421
|
+
# Corresponds to the JSON property `functionName`
|
422
|
+
# @return [Google::Apis::CloudtraceV2::TruncatableString]
|
423
|
+
attr_accessor :function_name
|
424
|
+
|
425
|
+
# The line number in `file_name` where the function call appears.
|
426
|
+
# Corresponds to the JSON property `lineNumber`
|
427
|
+
# @return [Fixnum]
|
428
|
+
attr_accessor :line_number
|
429
|
+
|
430
|
+
# Binary module.
|
431
|
+
# Corresponds to the JSON property `loadModule`
|
432
|
+
# @return [Google::Apis::CloudtraceV2::Module]
|
433
|
+
attr_accessor :load_module
|
434
|
+
|
435
|
+
# Represents a string that might be shortened to a specified length.
|
436
|
+
# Corresponds to the JSON property `originalFunctionName`
|
437
|
+
# @return [Google::Apis::CloudtraceV2::TruncatableString]
|
438
|
+
attr_accessor :original_function_name
|
439
|
+
|
440
|
+
# Represents a string that might be shortened to a specified length.
|
441
|
+
# Corresponds to the JSON property `sourceVersion`
|
442
|
+
# @return [Google::Apis::CloudtraceV2::TruncatableString]
|
443
|
+
attr_accessor :source_version
|
444
|
+
|
445
|
+
def initialize(**args)
|
446
|
+
update!(**args)
|
447
|
+
end
|
448
|
+
|
449
|
+
# Update properties of this object
|
450
|
+
def update!(**args)
|
451
|
+
@column_number = args[:column_number] if args.key?(:column_number)
|
452
|
+
@file_name = args[:file_name] if args.key?(:file_name)
|
453
|
+
@function_name = args[:function_name] if args.key?(:function_name)
|
454
|
+
@line_number = args[:line_number] if args.key?(:line_number)
|
455
|
+
@load_module = args[:load_module] if args.key?(:load_module)
|
456
|
+
@original_function_name = args[:original_function_name] if args.key?(:original_function_name)
|
457
|
+
@source_version = args[:source_version] if args.key?(:source_version)
|
458
|
+
end
|
459
|
+
end
|
460
|
+
|
461
|
+
# A collection of stack frames, which can be truncated.
|
462
|
+
class StackFrames
|
463
|
+
include Google::Apis::Core::Hashable
|
464
|
+
|
465
|
+
# The number of stack frames that were dropped because there were too many stack
|
466
|
+
# frames. If this value is 0, then no stack frames were dropped.
|
467
|
+
# Corresponds to the JSON property `droppedFramesCount`
|
468
|
+
# @return [Fixnum]
|
469
|
+
attr_accessor :dropped_frames_count
|
470
|
+
|
471
|
+
# Stack frames in this call stack.
|
472
|
+
# Corresponds to the JSON property `frame`
|
473
|
+
# @return [Array<Google::Apis::CloudtraceV2::StackFrame>]
|
474
|
+
attr_accessor :frame
|
475
|
+
|
476
|
+
def initialize(**args)
|
477
|
+
update!(**args)
|
478
|
+
end
|
479
|
+
|
480
|
+
# Update properties of this object
|
481
|
+
def update!(**args)
|
482
|
+
@dropped_frames_count = args[:dropped_frames_count] if args.key?(:dropped_frames_count)
|
483
|
+
@frame = args[:frame] if args.key?(:frame)
|
484
|
+
end
|
485
|
+
end
|
486
|
+
|
487
|
+
# A call stack appearing in a trace.
|
488
|
+
class StackTrace
|
489
|
+
include Google::Apis::Core::Hashable
|
490
|
+
|
491
|
+
# A collection of stack frames, which can be truncated.
|
492
|
+
# Corresponds to the JSON property `stackFrames`
|
493
|
+
# @return [Google::Apis::CloudtraceV2::StackFrames]
|
494
|
+
attr_accessor :stack_frames
|
495
|
+
|
496
|
+
# The hash ID is used to conserve network bandwidth for duplicate stack traces
|
497
|
+
# within a single trace. Often multiple spans will have identical stack traces.
|
498
|
+
# The first occurrence of a stack trace should contain both the `stackFrame`
|
499
|
+
# content and a value in `stackTraceHashId`. Subsequent spans within the same
|
500
|
+
# request can refer to that stack trace by only setting `stackTraceHashId`.
|
501
|
+
# Corresponds to the JSON property `stackTraceHashId`
|
502
|
+
# @return [Fixnum]
|
503
|
+
attr_accessor :stack_trace_hash_id
|
504
|
+
|
505
|
+
def initialize(**args)
|
506
|
+
update!(**args)
|
507
|
+
end
|
508
|
+
|
509
|
+
# Update properties of this object
|
510
|
+
def update!(**args)
|
511
|
+
@stack_frames = args[:stack_frames] if args.key?(:stack_frames)
|
512
|
+
@stack_trace_hash_id = args[:stack_trace_hash_id] if args.key?(:stack_trace_hash_id)
|
513
|
+
end
|
514
|
+
end
|
515
|
+
|
516
|
+
# The `Status` type defines a logical error model that is suitable for different
|
517
|
+
# programming environments, including REST APIs and RPC APIs. It is used by [
|
518
|
+
# gRPC](https://github.com/grpc). Each `Status` message contains three pieces of
|
519
|
+
# data: error code, error message, and error details. You can find out more
|
520
|
+
# about this error model and how to work with it in the [API Design Guide](https:
|
521
|
+
# //cloud.google.com/apis/design/errors).
|
522
|
+
class Status
|
523
|
+
include Google::Apis::Core::Hashable
|
524
|
+
|
525
|
+
# The status code, which should be an enum value of google.rpc.Code.
|
526
|
+
# Corresponds to the JSON property `code`
|
527
|
+
# @return [Fixnum]
|
528
|
+
attr_accessor :code
|
529
|
+
|
530
|
+
# A list of messages that carry the error details. There is a common set of
|
531
|
+
# message types for APIs to use.
|
532
|
+
# Corresponds to the JSON property `details`
|
533
|
+
# @return [Array<Hash<String,Object>>]
|
534
|
+
attr_accessor :details
|
535
|
+
|
536
|
+
# A developer-facing error message, which should be in English. Any user-facing
|
537
|
+
# error message should be localized and sent in the google.rpc.Status.details
|
538
|
+
# field, or localized by the client.
|
539
|
+
# Corresponds to the JSON property `message`
|
540
|
+
# @return [String]
|
541
|
+
attr_accessor :message
|
542
|
+
|
543
|
+
def initialize(**args)
|
544
|
+
update!(**args)
|
545
|
+
end
|
546
|
+
|
547
|
+
# Update properties of this object
|
548
|
+
def update!(**args)
|
549
|
+
@code = args[:code] if args.key?(:code)
|
550
|
+
@details = args[:details] if args.key?(:details)
|
551
|
+
@message = args[:message] if args.key?(:message)
|
552
|
+
end
|
553
|
+
end
|
554
|
+
|
555
|
+
# A time-stamped annotation or message event in the Span.
|
556
|
+
class TimeEvent
|
557
|
+
include Google::Apis::Core::Hashable
|
558
|
+
|
559
|
+
# Text annotation with a set of attributes.
|
560
|
+
# Corresponds to the JSON property `annotation`
|
561
|
+
# @return [Google::Apis::CloudtraceV2::Annotation]
|
562
|
+
attr_accessor :annotation
|
563
|
+
|
564
|
+
# An event describing a message sent/received between Spans.
|
565
|
+
# Corresponds to the JSON property `messageEvent`
|
566
|
+
# @return [Google::Apis::CloudtraceV2::MessageEvent]
|
567
|
+
attr_accessor :message_event
|
568
|
+
|
569
|
+
# The timestamp indicating the time the event occurred.
|
570
|
+
# Corresponds to the JSON property `time`
|
571
|
+
# @return [String]
|
572
|
+
attr_accessor :time
|
573
|
+
|
574
|
+
def initialize(**args)
|
575
|
+
update!(**args)
|
576
|
+
end
|
577
|
+
|
578
|
+
# Update properties of this object
|
579
|
+
def update!(**args)
|
580
|
+
@annotation = args[:annotation] if args.key?(:annotation)
|
581
|
+
@message_event = args[:message_event] if args.key?(:message_event)
|
582
|
+
@time = args[:time] if args.key?(:time)
|
583
|
+
end
|
584
|
+
end
|
585
|
+
|
586
|
+
# A collection of `TimeEvent`s. A `TimeEvent` is a time-stamped annotation on
|
587
|
+
# the span, consisting of either user-supplied key:value pairs, or details of a
|
588
|
+
# message sent/received between Spans.
|
589
|
+
class TimeEvents
|
590
|
+
include Google::Apis::Core::Hashable
|
591
|
+
|
592
|
+
# The number of dropped annotations in all the included time events. If the
|
593
|
+
# value is 0, then no annotations were dropped.
|
594
|
+
# Corresponds to the JSON property `droppedAnnotationsCount`
|
595
|
+
# @return [Fixnum]
|
596
|
+
attr_accessor :dropped_annotations_count
|
597
|
+
|
598
|
+
# The number of dropped message events in all the included time events. If the
|
599
|
+
# value is 0, then no message events were dropped.
|
600
|
+
# Corresponds to the JSON property `droppedMessageEventsCount`
|
601
|
+
# @return [Fixnum]
|
602
|
+
attr_accessor :dropped_message_events_count
|
603
|
+
|
604
|
+
# A collection of `TimeEvent`s.
|
605
|
+
# Corresponds to the JSON property `timeEvent`
|
606
|
+
# @return [Array<Google::Apis::CloudtraceV2::TimeEvent>]
|
607
|
+
attr_accessor :time_event
|
608
|
+
|
609
|
+
def initialize(**args)
|
610
|
+
update!(**args)
|
611
|
+
end
|
612
|
+
|
613
|
+
# Update properties of this object
|
614
|
+
def update!(**args)
|
615
|
+
@dropped_annotations_count = args[:dropped_annotations_count] if args.key?(:dropped_annotations_count)
|
616
|
+
@dropped_message_events_count = args[:dropped_message_events_count] if args.key?(:dropped_message_events_count)
|
617
|
+
@time_event = args[:time_event] if args.key?(:time_event)
|
618
|
+
end
|
619
|
+
end
|
620
|
+
|
621
|
+
# Represents a string that might be shortened to a specified length.
|
622
|
+
class TruncatableString
|
623
|
+
include Google::Apis::Core::Hashable
|
624
|
+
|
625
|
+
# The number of bytes removed from the original string. If this value is 0, then
|
626
|
+
# the string was not shortened.
|
627
|
+
# Corresponds to the JSON property `truncatedByteCount`
|
628
|
+
# @return [Fixnum]
|
629
|
+
attr_accessor :truncated_byte_count
|
630
|
+
|
631
|
+
# The shortened string. For example, if the original string is 500 bytes long
|
632
|
+
# and the limit of the string is 128 bytes, then `value` contains the first 128
|
633
|
+
# bytes of the 500-byte string. Truncation always happens on a UTF8 character
|
634
|
+
# boundary. If there are multi-byte characters in the string, then the length of
|
635
|
+
# the shortened string might be less than the size limit.
|
636
|
+
# Corresponds to the JSON property `value`
|
637
|
+
# @return [String]
|
638
|
+
attr_accessor :value
|
639
|
+
|
640
|
+
def initialize(**args)
|
641
|
+
update!(**args)
|
642
|
+
end
|
643
|
+
|
644
|
+
# Update properties of this object
|
645
|
+
def update!(**args)
|
646
|
+
@truncated_byte_count = args[:truncated_byte_count] if args.key?(:truncated_byte_count)
|
647
|
+
@value = args[:value] if args.key?(:value)
|
648
|
+
end
|
649
|
+
end
|
650
|
+
end
|
651
|
+
end
|
652
|
+
end
|