You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 

1223 lines
45 KiB

  1. // Package cloudtrace provides access to the Stackdriver Trace API.
  2. //
  3. // See https://cloud.google.com/trace
  4. //
  5. // Usage example:
  6. //
  7. // import "google.golang.org/api/cloudtrace/v2"
  8. // ...
  9. // cloudtraceService, err := cloudtrace.New(oauthHttpClient)
  10. package cloudtrace // import "google.golang.org/api/cloudtrace/v2"
  11. import (
  12. "bytes"
  13. "encoding/json"
  14. "errors"
  15. "fmt"
  16. context "golang.org/x/net/context"
  17. ctxhttp "golang.org/x/net/context/ctxhttp"
  18. gensupport "google.golang.org/api/gensupport"
  19. googleapi "google.golang.org/api/googleapi"
  20. "io"
  21. "net/http"
  22. "net/url"
  23. "strconv"
  24. "strings"
  25. )
  26. // Always reference these packages, just in case the auto-generated code
  27. // below doesn't.
  28. var _ = bytes.NewBuffer
  29. var _ = strconv.Itoa
  30. var _ = fmt.Sprintf
  31. var _ = json.NewDecoder
  32. var _ = io.Copy
  33. var _ = url.Parse
  34. var _ = gensupport.MarshalJSON
  35. var _ = googleapi.Version
  36. var _ = errors.New
  37. var _ = strings.Replace
  38. var _ = context.Canceled
  39. var _ = ctxhttp.Do
  40. const apiId = "cloudtrace:v2"
  41. const apiName = "cloudtrace"
  42. const apiVersion = "v2"
  43. const basePath = "https://cloudtrace.googleapis.com/"
  44. // OAuth2 scopes used by this API.
  45. const (
  46. // View and manage your data across Google Cloud Platform services
  47. CloudPlatformScope = "https://www.googleapis.com/auth/cloud-platform"
  48. // Write Trace data for a project or application
  49. TraceAppendScope = "https://www.googleapis.com/auth/trace.append"
  50. )
  51. func New(client *http.Client) (*Service, error) {
  52. if client == nil {
  53. return nil, errors.New("client is nil")
  54. }
  55. s := &Service{client: client, BasePath: basePath}
  56. s.Projects = NewProjectsService(s)
  57. return s, nil
  58. }
  59. type Service struct {
  60. client *http.Client
  61. BasePath string // API endpoint base URL
  62. UserAgent string // optional additional User-Agent fragment
  63. Projects *ProjectsService
  64. }
  65. func (s *Service) userAgent() string {
  66. if s.UserAgent == "" {
  67. return googleapi.UserAgent
  68. }
  69. return googleapi.UserAgent + " " + s.UserAgent
  70. }
  71. func NewProjectsService(s *Service) *ProjectsService {
  72. rs := &ProjectsService{s: s}
  73. rs.Traces = NewProjectsTracesService(s)
  74. return rs
  75. }
  76. type ProjectsService struct {
  77. s *Service
  78. Traces *ProjectsTracesService
  79. }
  80. func NewProjectsTracesService(s *Service) *ProjectsTracesService {
  81. rs := &ProjectsTracesService{s: s}
  82. rs.Spans = NewProjectsTracesSpansService(s)
  83. return rs
  84. }
  85. type ProjectsTracesService struct {
  86. s *Service
  87. Spans *ProjectsTracesSpansService
  88. }
  89. func NewProjectsTracesSpansService(s *Service) *ProjectsTracesSpansService {
  90. rs := &ProjectsTracesSpansService{s: s}
  91. return rs
  92. }
  93. type ProjectsTracesSpansService struct {
  94. s *Service
  95. }
  96. // Annotation: Text annotation with a set of attributes.
  97. type Annotation struct {
  98. // Attributes: A set of attributes on the annotation. You can have up to
  99. // 4 attributes
  100. // per Annotation.
  101. Attributes *Attributes `json:"attributes,omitempty"`
  102. // Description: A user-supplied message describing the event. The
  103. // maximum length for
  104. // the description is 256 bytes.
  105. Description *TruncatableString `json:"description,omitempty"`
  106. // ForceSendFields is a list of field names (e.g. "Attributes") to
  107. // unconditionally include in API requests. By default, fields with
  108. // empty values are omitted from API requests. However, any non-pointer,
  109. // non-interface field appearing in ForceSendFields will be sent to the
  110. // server regardless of whether the field is empty or not. This may be
  111. // used to include empty fields in Patch requests.
  112. ForceSendFields []string `json:"-"`
  113. // NullFields is a list of field names (e.g. "Attributes") to include in
  114. // API requests with the JSON null value. By default, fields with empty
  115. // values are omitted from API requests. However, any field with an
  116. // empty value appearing in NullFields will be sent to the server as
  117. // null. It is an error if a field in this list has a non-empty value.
  118. // This may be used to include null fields in Patch requests.
  119. NullFields []string `json:"-"`
  120. }
  121. func (s *Annotation) MarshalJSON() ([]byte, error) {
  122. type NoMethod Annotation
  123. raw := NoMethod(*s)
  124. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  125. }
  126. // AttributeValue: The allowed types for [VALUE] in a `[KEY]:[VALUE]`
  127. // attribute.
  128. type AttributeValue struct {
  129. // BoolValue: A Boolean value represented by `true` or `false`.
  130. BoolValue bool `json:"boolValue,omitempty"`
  131. // IntValue: A 64-bit signed integer.
  132. IntValue int64 `json:"intValue,omitempty,string"`
  133. // StringValue: A string up to 256 bytes long.
  134. StringValue *TruncatableString `json:"stringValue,omitempty"`
  135. // ForceSendFields is a list of field names (e.g. "BoolValue") to
  136. // unconditionally include in API requests. By default, fields with
  137. // empty values are omitted from API requests. However, any non-pointer,
  138. // non-interface field appearing in ForceSendFields will be sent to the
  139. // server regardless of whether the field is empty or not. This may be
  140. // used to include empty fields in Patch requests.
  141. ForceSendFields []string `json:"-"`
  142. // NullFields is a list of field names (e.g. "BoolValue") to include in
  143. // API requests with the JSON null value. By default, fields with empty
  144. // values are omitted from API requests. However, any field with an
  145. // empty value appearing in NullFields will be sent to the server as
  146. // null. It is an error if a field in this list has a non-empty value.
  147. // This may be used to include null fields in Patch requests.
  148. NullFields []string `json:"-"`
  149. }
  150. func (s *AttributeValue) MarshalJSON() ([]byte, error) {
  151. type NoMethod AttributeValue
  152. raw := NoMethod(*s)
  153. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  154. }
  155. // Attributes: A set of attributes, each in the format `[KEY]:[VALUE]`.
  156. type Attributes struct {
  157. // AttributeMap: The set of attributes. Each attribute's key can be up
  158. // to 128 bytes
  159. // long. The value can be a string up to 256 bytes, an integer, or
  160. // the
  161. // Boolean values `true` and `false`. For example:
  162. //
  163. // "/instance_id": "my-instance"
  164. // "/http/user_agent": ""
  165. // "/http/request_bytes": 300
  166. // "abc.com/myattribute": true
  167. AttributeMap map[string]AttributeValue `json:"attributeMap,omitempty"`
  168. // DroppedAttributesCount: The number of attributes that were discarded.
  169. // Attributes can be discarded
  170. // because their keys are too long or because there are too many
  171. // attributes.
  172. // If this value is 0 then all attributes are valid.
  173. DroppedAttributesCount int64 `json:"droppedAttributesCount,omitempty"`
  174. // ForceSendFields is a list of field names (e.g. "AttributeMap") to
  175. // unconditionally include in API requests. By default, fields with
  176. // empty values are omitted from API requests. However, any non-pointer,
  177. // non-interface field appearing in ForceSendFields will be sent to the
  178. // server regardless of whether the field is empty or not. This may be
  179. // used to include empty fields in Patch requests.
  180. ForceSendFields []string `json:"-"`
  181. // NullFields is a list of field names (e.g. "AttributeMap") to include
  182. // in API requests with the JSON null value. By default, fields with
  183. // empty values are omitted from API requests. However, any field with
  184. // an empty value appearing in NullFields will be sent to the server as
  185. // null. It is an error if a field in this list has a non-empty value.
  186. // This may be used to include null fields in Patch requests.
  187. NullFields []string `json:"-"`
  188. }
  189. func (s *Attributes) MarshalJSON() ([]byte, error) {
  190. type NoMethod Attributes
  191. raw := NoMethod(*s)
  192. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  193. }
  194. // BatchWriteSpansRequest: The request message for the `BatchWriteSpans`
  195. // method.
  196. type BatchWriteSpansRequest struct {
  197. // Spans: A list of new spans. The span names must not match
  198. // existing
  199. // spans, or the results are undefined.
  200. Spans []*Span `json:"spans,omitempty"`
  201. // ForceSendFields is a list of field names (e.g. "Spans") to
  202. // unconditionally include in API requests. By default, fields with
  203. // empty values are omitted from API requests. However, any non-pointer,
  204. // non-interface field appearing in ForceSendFields will be sent to the
  205. // server regardless of whether the field is empty or not. This may be
  206. // used to include empty fields in Patch requests.
  207. ForceSendFields []string `json:"-"`
  208. // NullFields is a list of field names (e.g. "Spans") to include in API
  209. // requests with the JSON null value. By default, fields with empty
  210. // values are omitted from API requests. However, any field with an
  211. // empty value appearing in NullFields will be sent to the server as
  212. // null. It is an error if a field in this list has a non-empty value.
  213. // This may be used to include null fields in Patch requests.
  214. NullFields []string `json:"-"`
  215. }
  216. func (s *BatchWriteSpansRequest) MarshalJSON() ([]byte, error) {
  217. type NoMethod BatchWriteSpansRequest
  218. raw := NoMethod(*s)
  219. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  220. }
  221. // Empty: A generic empty message that you can re-use to avoid defining
  222. // duplicated
  223. // empty messages in your APIs. A typical example is to use it as the
  224. // request
  225. // or the response type of an API method. For instance:
  226. //
  227. // service Foo {
  228. // rpc Bar(google.protobuf.Empty) returns
  229. // (google.protobuf.Empty);
  230. // }
  231. //
  232. // The JSON representation for `Empty` is empty JSON object `{}`.
  233. type Empty struct {
  234. // ServerResponse contains the HTTP response code and headers from the
  235. // server.
  236. googleapi.ServerResponse `json:"-"`
  237. }
  238. // Link: A pointer from the current span to another span in the same
  239. // trace or in a
  240. // different trace. For example, this can be used in batching
  241. // operations,
  242. // where a single batch handler processes multiple requests from
  243. // different
  244. // traces or when the handler receives a request from a different
  245. // project.
  246. type Link struct {
  247. // Attributes: A set of attributes on the link. You have have up to 32
  248. // attributes per
  249. // link.
  250. Attributes *Attributes `json:"attributes,omitempty"`
  251. // SpanId: The [SPAN_ID] for a span within a trace.
  252. SpanId string `json:"spanId,omitempty"`
  253. // TraceId: The [TRACE_ID] for a trace within a project.
  254. TraceId string `json:"traceId,omitempty"`
  255. // Type: The relationship of the current span relative to the linked
  256. // span.
  257. //
  258. // Possible values:
  259. // "TYPE_UNSPECIFIED" - The relationship of the two spans is unknown.
  260. // "CHILD_LINKED_SPAN" - The linked span is a child of the current
  261. // span.
  262. // "PARENT_LINKED_SPAN" - The linked span is a parent of the current
  263. // span.
  264. Type string `json:"type,omitempty"`
  265. // ForceSendFields is a list of field names (e.g. "Attributes") to
  266. // unconditionally include in API requests. By default, fields with
  267. // empty values are omitted from API requests. However, any non-pointer,
  268. // non-interface field appearing in ForceSendFields will be sent to the
  269. // server regardless of whether the field is empty or not. This may be
  270. // used to include empty fields in Patch requests.
  271. ForceSendFields []string `json:"-"`
  272. // NullFields is a list of field names (e.g. "Attributes") to include in
  273. // API requests with the JSON null value. By default, fields with empty
  274. // values are omitted from API requests. However, any field with an
  275. // empty value appearing in NullFields will be sent to the server as
  276. // null. It is an error if a field in this list has a non-empty value.
  277. // This may be used to include null fields in Patch requests.
  278. NullFields []string `json:"-"`
  279. }
  280. func (s *Link) MarshalJSON() ([]byte, error) {
  281. type NoMethod Link
  282. raw := NoMethod(*s)
  283. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  284. }
  285. // Links: A collection of links, which are references from this span to
  286. // a span
  287. // in the same or different trace.
  288. type Links struct {
  289. // DroppedLinksCount: The number of dropped links after the maximum size
  290. // was enforced. If
  291. // this value is 0, then no links were dropped.
  292. DroppedLinksCount int64 `json:"droppedLinksCount,omitempty"`
  293. // Link: A collection of links.
  294. Link []*Link `json:"link,omitempty"`
  295. // ForceSendFields is a list of field names (e.g. "DroppedLinksCount")
  296. // to unconditionally include in API requests. By default, fields with
  297. // empty values are omitted from API requests. However, any non-pointer,
  298. // non-interface field appearing in ForceSendFields will be sent to the
  299. // server regardless of whether the field is empty or not. This may be
  300. // used to include empty fields in Patch requests.
  301. ForceSendFields []string `json:"-"`
  302. // NullFields is a list of field names (e.g. "DroppedLinksCount") to
  303. // include in API requests with the JSON null value. By default, fields
  304. // with empty values are omitted from API requests. However, any field
  305. // with an empty value appearing in NullFields will be sent to the
  306. // server as null. It is an error if a field in this list has a
  307. // non-empty value. This may be used to include null fields in Patch
  308. // requests.
  309. NullFields []string `json:"-"`
  310. }
  311. func (s *Links) MarshalJSON() ([]byte, error) {
  312. type NoMethod Links
  313. raw := NoMethod(*s)
  314. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  315. }
  316. // MessageEvent: An event describing a message sent/received between
  317. // Spans.
  318. type MessageEvent struct {
  319. // CompressedSizeBytes: The number of compressed bytes sent or received.
  320. // If missing assumed to
  321. // be the same size as uncompressed.
  322. CompressedSizeBytes int64 `json:"compressedSizeBytes,omitempty,string"`
  323. // Id: An identifier for the MessageEvent's message that can be used to
  324. // match
  325. // SENT and RECEIVED MessageEvents. It is recommended to be unique
  326. // within
  327. // a Span.
  328. Id int64 `json:"id,omitempty,string"`
  329. // Type: Type of MessageEvent. Indicates whether the message was sent
  330. // or
  331. // received.
  332. //
  333. // Possible values:
  334. // "TYPE_UNSPECIFIED" - Unknown event type.
  335. // "SENT" - Indicates a sent message.
  336. // "RECEIVED" - Indicates a received message.
  337. Type string `json:"type,omitempty"`
  338. // UncompressedSizeBytes: The number of uncompressed bytes sent or
  339. // received.
  340. UncompressedSizeBytes int64 `json:"uncompressedSizeBytes,omitempty,string"`
  341. // ForceSendFields is a list of field names (e.g. "CompressedSizeBytes")
  342. // to unconditionally include in API requests. By default, fields with
  343. // empty values are omitted from API requests. However, any non-pointer,
  344. // non-interface field appearing in ForceSendFields will be sent to the
  345. // server regardless of whether the field is empty or not. This may be
  346. // used to include empty fields in Patch requests.
  347. ForceSendFields []string `json:"-"`
  348. // NullFields is a list of field names (e.g. "CompressedSizeBytes") to
  349. // include in API requests with the JSON null value. By default, fields
  350. // with empty values are omitted from API requests. However, any field
  351. // with an empty value appearing in NullFields will be sent to the
  352. // server as null. It is an error if a field in this list has a
  353. // non-empty value. This may be used to include null fields in Patch
  354. // requests.
  355. NullFields []string `json:"-"`
  356. }
  357. func (s *MessageEvent) MarshalJSON() ([]byte, error) {
  358. type NoMethod MessageEvent
  359. raw := NoMethod(*s)
  360. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  361. }
  362. // Module: Binary module.
  363. type Module struct {
  364. // BuildId: A unique identifier for the module, usually a hash of
  365. // its
  366. // contents (up to 128 bytes).
  367. BuildId *TruncatableString `json:"buildId,omitempty"`
  368. // Module: For example: main binary, kernel modules, and dynamic
  369. // libraries
  370. // such as libc.so, sharedlib.so (up to 256 bytes).
  371. Module *TruncatableString `json:"module,omitempty"`
  372. // ForceSendFields is a list of field names (e.g. "BuildId") to
  373. // unconditionally include in API requests. By default, fields with
  374. // empty values are omitted from API requests. However, any non-pointer,
  375. // non-interface field appearing in ForceSendFields will be sent to the
  376. // server regardless of whether the field is empty or not. This may be
  377. // used to include empty fields in Patch requests.
  378. ForceSendFields []string `json:"-"`
  379. // NullFields is a list of field names (e.g. "BuildId") to include in
  380. // API requests with the JSON null value. By default, fields with empty
  381. // values are omitted from API requests. However, any field with an
  382. // empty value appearing in NullFields will be sent to the server as
  383. // null. It is an error if a field in this list has a non-empty value.
  384. // This may be used to include null fields in Patch requests.
  385. NullFields []string `json:"-"`
  386. }
  387. func (s *Module) MarshalJSON() ([]byte, error) {
  388. type NoMethod Module
  389. raw := NoMethod(*s)
  390. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  391. }
  392. // Span: A span represents a single operation within a trace. Spans can
  393. // be
  394. // nested to form a trace tree. Often, a trace contains a root span
  395. // that describes the end-to-end latency, and one or more subspans
  396. // for
  397. // its sub-operations. A trace can also contain multiple root spans,
  398. // or none at all. Spans do not need to be contiguous—there may
  399. // be
  400. // gaps or overlaps between spans in a trace.
  401. type Span struct {
  402. // Attributes: A set of attributes on the span. You can have up to 32
  403. // attributes per
  404. // span.
  405. Attributes *Attributes `json:"attributes,omitempty"`
  406. // ChildSpanCount: An optional number of child spans that were generated
  407. // while this span
  408. // was active. If set, allows implementation to detect missing child
  409. // spans.
  410. ChildSpanCount int64 `json:"childSpanCount,omitempty"`
  411. // DisplayName: A description of the span's operation (up to 128
  412. // bytes).
  413. // Stackdriver Trace displays the description in the
  414. // {% dynamic print site_values.console_name %}.
  415. // For example, the display name can be a qualified method name or a
  416. // file name
  417. // and a line number where the operation is called. A best practice is
  418. // to use
  419. // the same display name within an application and at the same call
  420. // point.
  421. // This makes it easier to correlate spans in different traces.
  422. DisplayName *TruncatableString `json:"displayName,omitempty"`
  423. // EndTime: The end time of the span. On the client side, this is the
  424. // time kept by
  425. // the local machine where the span execution ends. On the server side,
  426. // this
  427. // is the time when the server application handler stops running.
  428. EndTime string `json:"endTime,omitempty"`
  429. // Links: Links associated with the span. You can have up to 128 links
  430. // per Span.
  431. Links *Links `json:"links,omitempty"`
  432. // Name: The resource name of the span in the following format:
  433. //
  434. // projects/[PROJECT_ID]/traces/[TRACE_ID]/spans/SPAN_ID is a unique
  435. // identifier for a trace within a project;
  436. // it is a 32-character hexadecimal encoding of a 16-byte
  437. // array.
  438. //
  439. // [SPAN_ID] is a unique identifier for a span within a trace; it
  440. // is a 16-character hexadecimal encoding of an 8-byte array.
  441. Name string `json:"name,omitempty"`
  442. // ParentSpanId: The [SPAN_ID] of this span's parent span. If this is a
  443. // root span,
  444. // then this field must be empty.
  445. ParentSpanId string `json:"parentSpanId,omitempty"`
  446. // SameProcessAsParentSpan: (Optional) Set this parameter to indicate
  447. // whether this span is in
  448. // the same process as its parent. If you do not set this
  449. // parameter,
  450. // Stackdriver Trace is unable to take advantage of this
  451. // helpful
  452. // information.
  453. SameProcessAsParentSpan bool `json:"sameProcessAsParentSpan,omitempty"`
  454. // SpanId: The [SPAN_ID] portion of the span's resource name.
  455. SpanId string `json:"spanId,omitempty"`
  456. // StackTrace: Stack trace captured at the start of the span.
  457. StackTrace *StackTrace `json:"stackTrace,omitempty"`
  458. // StartTime: The start time of the span. On the client side, this is
  459. // the time kept by
  460. // the local machine where the span execution starts. On the server
  461. // side, this
  462. // is the time when the server's application handler starts running.
  463. StartTime string `json:"startTime,omitempty"`
  464. // Status: An optional final status for this span.
  465. Status *Status `json:"status,omitempty"`
  466. // TimeEvents: A set of time events. You can have up to 32 annotations
  467. // and 128 message
  468. // events per span.
  469. TimeEvents *TimeEvents `json:"timeEvents,omitempty"`
  470. // ServerResponse contains the HTTP response code and headers from the
  471. // server.
  472. googleapi.ServerResponse `json:"-"`
  473. // ForceSendFields is a list of field names (e.g. "Attributes") to
  474. // unconditionally include in API requests. By default, fields with
  475. // empty values are omitted from API requests. However, any non-pointer,
  476. // non-interface field appearing in ForceSendFields will be sent to the
  477. // server regardless of whether the field is empty or not. This may be
  478. // used to include empty fields in Patch requests.
  479. ForceSendFields []string `json:"-"`
  480. // NullFields is a list of field names (e.g. "Attributes") to include in
  481. // API requests with the JSON null value. By default, fields with empty
  482. // values are omitted from API requests. However, any field with an
  483. // empty value appearing in NullFields will be sent to the server as
  484. // null. It is an error if a field in this list has a non-empty value.
  485. // This may be used to include null fields in Patch requests.
  486. NullFields []string `json:"-"`
  487. }
  488. func (s *Span) MarshalJSON() ([]byte, error) {
  489. type NoMethod Span
  490. raw := NoMethod(*s)
  491. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  492. }
  493. // StackFrame: Represents a single stack frame in a stack trace.
  494. type StackFrame struct {
  495. // ColumnNumber: The column number where the function call appears, if
  496. // available.
  497. // This is important in JavaScript because of its anonymous functions.
  498. ColumnNumber int64 `json:"columnNumber,omitempty,string"`
  499. // FileName: The name of the source file where the function call appears
  500. // (up to 256
  501. // bytes).
  502. FileName *TruncatableString `json:"fileName,omitempty"`
  503. // FunctionName: The fully-qualified name that uniquely identifies the
  504. // function or
  505. // method that is active in this frame (up to 1024 bytes).
  506. FunctionName *TruncatableString `json:"functionName,omitempty"`
  507. // LineNumber: The line number in `file_name` where the function call
  508. // appears.
  509. LineNumber int64 `json:"lineNumber,omitempty,string"`
  510. // LoadModule: The binary module from where the code was loaded.
  511. LoadModule *Module `json:"loadModule,omitempty"`
  512. // OriginalFunctionName: An un-mangled function name, if `function_name`
  513. // is
  514. // [mangled](http://www.avabodh.com/cxxin/namemangling.html). The name
  515. // can
  516. // be fully-qualified (up to 1024 bytes).
  517. OriginalFunctionName *TruncatableString `json:"originalFunctionName,omitempty"`
  518. // SourceVersion: The version of the deployed source code (up to 128
  519. // bytes).
  520. SourceVersion *TruncatableString `json:"sourceVersion,omitempty"`
  521. // ForceSendFields is a list of field names (e.g. "ColumnNumber") to
  522. // unconditionally include in API requests. By default, fields with
  523. // empty values are omitted from API requests. However, any non-pointer,
  524. // non-interface field appearing in ForceSendFields will be sent to the
  525. // server regardless of whether the field is empty or not. This may be
  526. // used to include empty fields in Patch requests.
  527. ForceSendFields []string `json:"-"`
  528. // NullFields is a list of field names (e.g. "ColumnNumber") to include
  529. // in API requests with the JSON null value. By default, fields with
  530. // empty values are omitted from API requests. However, any field with
  531. // an empty value appearing in NullFields will be sent to the server as
  532. // null. It is an error if a field in this list has a non-empty value.
  533. // This may be used to include null fields in Patch requests.
  534. NullFields []string `json:"-"`
  535. }
  536. func (s *StackFrame) MarshalJSON() ([]byte, error) {
  537. type NoMethod StackFrame
  538. raw := NoMethod(*s)
  539. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  540. }
  541. // StackFrames: A collection of stack frames, which can be truncated.
  542. type StackFrames struct {
  543. // DroppedFramesCount: The number of stack frames that were dropped
  544. // because there
  545. // were too many stack frames.
  546. // If this value is 0, then no stack frames were dropped.
  547. DroppedFramesCount int64 `json:"droppedFramesCount,omitempty"`
  548. // Frame: Stack frames in this call stack.
  549. Frame []*StackFrame `json:"frame,omitempty"`
  550. // ForceSendFields is a list of field names (e.g. "DroppedFramesCount")
  551. // to unconditionally include in API requests. By default, fields with
  552. // empty values are omitted from API requests. However, any non-pointer,
  553. // non-interface field appearing in ForceSendFields will be sent to the
  554. // server regardless of whether the field is empty or not. This may be
  555. // used to include empty fields in Patch requests.
  556. ForceSendFields []string `json:"-"`
  557. // NullFields is a list of field names (e.g. "DroppedFramesCount") to
  558. // include in API requests with the JSON null value. By default, fields
  559. // with empty values are omitted from API requests. However, any field
  560. // with an empty value appearing in NullFields will be sent to the
  561. // server as null. It is an error if a field in this list has a
  562. // non-empty value. This may be used to include null fields in Patch
  563. // requests.
  564. NullFields []string `json:"-"`
  565. }
  566. func (s *StackFrames) MarshalJSON() ([]byte, error) {
  567. type NoMethod StackFrames
  568. raw := NoMethod(*s)
  569. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  570. }
  571. // StackTrace: A call stack appearing in a trace.
  572. type StackTrace struct {
  573. // StackFrames: Stack frames in this stack trace. A maximum of 128
  574. // frames are allowed.
  575. StackFrames *StackFrames `json:"stackFrames,omitempty"`
  576. // StackTraceHashId: The hash ID is used to conserve network bandwidth
  577. // for duplicate
  578. // stack traces within a single trace.
  579. //
  580. // Often multiple spans will have identical stack traces.
  581. // The first occurrence of a stack trace should contain both
  582. // the
  583. // `stackFrame` content and a value in `stackTraceHashId`.
  584. //
  585. // Subsequent spans within the same request can refer
  586. // to that stack trace by only setting `stackTraceHashId`.
  587. StackTraceHashId int64 `json:"stackTraceHashId,omitempty,string"`
  588. // ForceSendFields is a list of field names (e.g. "StackFrames") to
  589. // unconditionally include in API requests. By default, fields with
  590. // empty values are omitted from API requests. However, any non-pointer,
  591. // non-interface field appearing in ForceSendFields will be sent to the
  592. // server regardless of whether the field is empty or not. This may be
  593. // used to include empty fields in Patch requests.
  594. ForceSendFields []string `json:"-"`
  595. // NullFields is a list of field names (e.g. "StackFrames") to include
  596. // in API requests with the JSON null value. By default, fields with
  597. // empty values are omitted from API requests. However, any field with
  598. // an empty value appearing in NullFields will be sent to the server as
  599. // null. It is an error if a field in this list has a non-empty value.
  600. // This may be used to include null fields in Patch requests.
  601. NullFields []string `json:"-"`
  602. }
  603. func (s *StackTrace) MarshalJSON() ([]byte, error) {
  604. type NoMethod StackTrace
  605. raw := NoMethod(*s)
  606. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  607. }
  608. // Status: The `Status` type defines a logical error model that is
  609. // suitable for different
  610. // programming environments, including REST APIs and RPC APIs. It is
  611. // used by
  612. // [gRPC](https://github.com/grpc). The error model is designed to
  613. // be:
  614. //
  615. // - Simple to use and understand for most users
  616. // - Flexible enough to meet unexpected needs
  617. //
  618. // # Overview
  619. //
  620. // The `Status` message contains three pieces of data: error code, error
  621. // message,
  622. // and error details. The error code should be an enum value
  623. // of
  624. // google.rpc.Code, but it may accept additional error codes if needed.
  625. // The
  626. // error message should be a developer-facing English message that
  627. // helps
  628. // developers *understand* and *resolve* the error. If a localized
  629. // user-facing
  630. // error message is needed, put the localized message in the error
  631. // details or
  632. // localize it in the client. The optional error details may contain
  633. // arbitrary
  634. // information about the error. There is a predefined set of error
  635. // detail types
  636. // in the package `google.rpc` that can be used for common error
  637. // conditions.
  638. //
  639. // # Language mapping
  640. //
  641. // The `Status` message is the logical representation of the error
  642. // model, but it
  643. // is not necessarily the actual wire format. When the `Status` message
  644. // is
  645. // exposed in different client libraries and different wire protocols,
  646. // it can be
  647. // mapped differently. For example, it will likely be mapped to some
  648. // exceptions
  649. // in Java, but more likely mapped to some error codes in C.
  650. //
  651. // # Other uses
  652. //
  653. // The error model and the `Status` message can be used in a variety
  654. // of
  655. // environments, either with or without APIs, to provide a
  656. // consistent developer experience across different
  657. // environments.
  658. //
  659. // Example uses of this error model include:
  660. //
  661. // - Partial errors. If a service needs to return partial errors to the
  662. // client,
  663. // it may embed the `Status` in the normal response to indicate the
  664. // partial
  665. // errors.
  666. //
  667. // - Workflow errors. A typical workflow has multiple steps. Each step
  668. // may
  669. // have a `Status` message for error reporting.
  670. //
  671. // - Batch operations. If a client uses batch request and batch
  672. // response, the
  673. // `Status` message should be used directly inside batch response,
  674. // one for
  675. // each error sub-response.
  676. //
  677. // - Asynchronous operations. If an API call embeds asynchronous
  678. // operation
  679. // results in its response, the status of those operations should
  680. // be
  681. // represented directly using the `Status` message.
  682. //
  683. // - Logging. If some API errors are stored in logs, the message
  684. // `Status` could
  685. // be used directly after any stripping needed for security/privacy
  686. // reasons.
  687. type Status struct {
  688. // Code: The status code, which should be an enum value of
  689. // google.rpc.Code.
  690. Code int64 `json:"code,omitempty"`
  691. // Details: A list of messages that carry the error details. There is a
  692. // common set of
  693. // message types for APIs to use.
  694. Details []googleapi.RawMessage `json:"details,omitempty"`
  695. // Message: A developer-facing error message, which should be in
  696. // English. Any
  697. // user-facing error message should be localized and sent in
  698. // the
  699. // google.rpc.Status.details field, or localized by the client.
  700. Message string `json:"message,omitempty"`
  701. // ForceSendFields is a list of field names (e.g. "Code") to
  702. // unconditionally include in API requests. By default, fields with
  703. // empty values are omitted from API requests. However, any non-pointer,
  704. // non-interface field appearing in ForceSendFields will be sent to the
  705. // server regardless of whether the field is empty or not. This may be
  706. // used to include empty fields in Patch requests.
  707. ForceSendFields []string `json:"-"`
  708. // NullFields is a list of field names (e.g. "Code") to include in API
  709. // requests with the JSON null value. By default, fields with empty
  710. // values are omitted from API requests. However, any field with an
  711. // empty value appearing in NullFields will be sent to the server as
  712. // null. It is an error if a field in this list has a non-empty value.
  713. // This may be used to include null fields in Patch requests.
  714. NullFields []string `json:"-"`
  715. }
  716. func (s *Status) MarshalJSON() ([]byte, error) {
  717. type NoMethod Status
  718. raw := NoMethod(*s)
  719. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  720. }
  721. // TimeEvent: A time-stamped annotation or message event in the Span.
  722. type TimeEvent struct {
  723. // Annotation: Text annotation with a set of attributes.
  724. Annotation *Annotation `json:"annotation,omitempty"`
  725. // MessageEvent: An event describing a message sent/received between
  726. // Spans.
  727. MessageEvent *MessageEvent `json:"messageEvent,omitempty"`
  728. // Time: The timestamp indicating the time the event occurred.
  729. Time string `json:"time,omitempty"`
  730. // ForceSendFields is a list of field names (e.g. "Annotation") to
  731. // unconditionally include in API requests. By default, fields with
  732. // empty values are omitted from API requests. However, any non-pointer,
  733. // non-interface field appearing in ForceSendFields will be sent to the
  734. // server regardless of whether the field is empty or not. This may be
  735. // used to include empty fields in Patch requests.
  736. ForceSendFields []string `json:"-"`
  737. // NullFields is a list of field names (e.g. "Annotation") to include in
  738. // API requests with the JSON null value. By default, fields with empty
  739. // values are omitted from API requests. However, any field with an
  740. // empty value appearing in NullFields will be sent to the server as
  741. // null. It is an error if a field in this list has a non-empty value.
  742. // This may be used to include null fields in Patch requests.
  743. NullFields []string `json:"-"`
  744. }
  745. func (s *TimeEvent) MarshalJSON() ([]byte, error) {
  746. type NoMethod TimeEvent
  747. raw := NoMethod(*s)
  748. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  749. }
  750. // TimeEvents: A collection of `TimeEvent`s. A `TimeEvent` is a
  751. // time-stamped annotation
  752. // on the span, consisting of either user-supplied key:value pairs,
  753. // or
  754. // details of a message sent/received between Spans.
  755. type TimeEvents struct {
  756. // DroppedAnnotationsCount: The number of dropped annotations in all the
  757. // included time events.
  758. // If the value is 0, then no annotations were dropped.
  759. DroppedAnnotationsCount int64 `json:"droppedAnnotationsCount,omitempty"`
  760. // DroppedMessageEventsCount: The number of dropped message events in
  761. // all the included time events.
  762. // If the value is 0, then no message events were dropped.
  763. DroppedMessageEventsCount int64 `json:"droppedMessageEventsCount,omitempty"`
  764. // TimeEvent: A collection of `TimeEvent`s.
  765. TimeEvent []*TimeEvent `json:"timeEvent,omitempty"`
  766. // ForceSendFields is a list of field names (e.g.
  767. // "DroppedAnnotationsCount") to unconditionally include in API
  768. // requests. By default, fields with empty values are omitted from API
  769. // requests. However, any non-pointer, non-interface field appearing in
  770. // ForceSendFields will be sent to the server regardless of whether the
  771. // field is empty or not. This may be used to include empty fields in
  772. // Patch requests.
  773. ForceSendFields []string `json:"-"`
  774. // NullFields is a list of field names (e.g. "DroppedAnnotationsCount")
  775. // to include in API requests with the JSON null value. By default,
  776. // fields with empty values are omitted from API requests. However, any
  777. // field with an empty value appearing in NullFields will be sent to the
  778. // server as null. It is an error if a field in this list has a
  779. // non-empty value. This may be used to include null fields in Patch
  780. // requests.
  781. NullFields []string `json:"-"`
  782. }
  783. func (s *TimeEvents) MarshalJSON() ([]byte, error) {
  784. type NoMethod TimeEvents
  785. raw := NoMethod(*s)
  786. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  787. }
  788. // TruncatableString: Represents a string that might be shortened to a
  789. // specified length.
  790. type TruncatableString struct {
  791. // TruncatedByteCount: The number of bytes removed from the original
  792. // string. If this
  793. // value is 0, then the string was not shortened.
  794. TruncatedByteCount int64 `json:"truncatedByteCount,omitempty"`
  795. // Value: The shortened string. For example, if the original string is
  796. // 500
  797. // bytes long and the limit of the string is 128 bytes, then
  798. // `value` contains the first 128 bytes of the 500-byte
  799. // string.
  800. //
  801. // Truncation always happens on a UTF8 character boundary. If there
  802. // are multi-byte characters in the string, then the length of
  803. // the
  804. // shortened string might be less than the size limit.
  805. Value string `json:"value,omitempty"`
  806. // ForceSendFields is a list of field names (e.g. "TruncatedByteCount")
  807. // to unconditionally include in API requests. By default, fields with
  808. // empty values are omitted from API requests. However, any non-pointer,
  809. // non-interface field appearing in ForceSendFields will be sent to the
  810. // server regardless of whether the field is empty or not. This may be
  811. // used to include empty fields in Patch requests.
  812. ForceSendFields []string `json:"-"`
  813. // NullFields is a list of field names (e.g. "TruncatedByteCount") to
  814. // include in API requests with the JSON null value. By default, fields
  815. // with empty values are omitted from API requests. However, any field
  816. // with an empty value appearing in NullFields will be sent to the
  817. // server as null. It is an error if a field in this list has a
  818. // non-empty value. This may be used to include null fields in Patch
  819. // requests.
  820. NullFields []string `json:"-"`
  821. }
  822. func (s *TruncatableString) MarshalJSON() ([]byte, error) {
  823. type NoMethod TruncatableString
  824. raw := NoMethod(*s)
  825. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  826. }
  827. // method id "cloudtrace.projects.traces.batchWrite":
  828. type ProjectsTracesBatchWriteCall struct {
  829. s *Service
  830. name string
  831. batchwritespansrequest *BatchWriteSpansRequest
  832. urlParams_ gensupport.URLParams
  833. ctx_ context.Context
  834. header_ http.Header
  835. }
  836. // BatchWrite: Sends new spans to new or existing traces. You cannot
  837. // update
  838. // existing spans.
  839. func (r *ProjectsTracesService) BatchWrite(name string, batchwritespansrequest *BatchWriteSpansRequest) *ProjectsTracesBatchWriteCall {
  840. c := &ProjectsTracesBatchWriteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  841. c.name = name
  842. c.batchwritespansrequest = batchwritespansrequest
  843. return c
  844. }
  845. // Fields allows partial responses to be retrieved. See
  846. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  847. // for more information.
  848. func (c *ProjectsTracesBatchWriteCall) Fields(s ...googleapi.Field) *ProjectsTracesBatchWriteCall {
  849. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  850. return c
  851. }
  852. // Context sets the context to be used in this call's Do method. Any
  853. // pending HTTP request will be aborted if the provided context is
  854. // canceled.
  855. func (c *ProjectsTracesBatchWriteCall) Context(ctx context.Context) *ProjectsTracesBatchWriteCall {
  856. c.ctx_ = ctx
  857. return c
  858. }
  859. // Header returns an http.Header that can be modified by the caller to
  860. // add HTTP headers to the request.
  861. func (c *ProjectsTracesBatchWriteCall) Header() http.Header {
  862. if c.header_ == nil {
  863. c.header_ = make(http.Header)
  864. }
  865. return c.header_
  866. }
  867. func (c *ProjectsTracesBatchWriteCall) doRequest(alt string) (*http.Response, error) {
  868. reqHeaders := make(http.Header)
  869. for k, v := range c.header_ {
  870. reqHeaders[k] = v
  871. }
  872. reqHeaders.Set("User-Agent", c.s.userAgent())
  873. var body io.Reader = nil
  874. body, err := googleapi.WithoutDataWrapper.JSONReader(c.batchwritespansrequest)
  875. if err != nil {
  876. return nil, err
  877. }
  878. reqHeaders.Set("Content-Type", "application/json")
  879. c.urlParams_.Set("alt", alt)
  880. urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+name}/traces:batchWrite")
  881. urls += "?" + c.urlParams_.Encode()
  882. req, _ := http.NewRequest("POST", urls, body)
  883. req.Header = reqHeaders
  884. googleapi.Expand(req.URL, map[string]string{
  885. "name": c.name,
  886. })
  887. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  888. }
  889. // Do executes the "cloudtrace.projects.traces.batchWrite" call.
  890. // Exactly one of *Empty or error will be non-nil. Any non-2xx status
  891. // code is an error. Response headers are in either
  892. // *Empty.ServerResponse.Header or (if a response was returned at all)
  893. // in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
  894. // check whether the returned error was because http.StatusNotModified
  895. // was returned.
  896. func (c *ProjectsTracesBatchWriteCall) Do(opts ...googleapi.CallOption) (*Empty, error) {
  897. gensupport.SetOptions(c.urlParams_, opts...)
  898. res, err := c.doRequest("json")
  899. if res != nil && res.StatusCode == http.StatusNotModified {
  900. if res.Body != nil {
  901. res.Body.Close()
  902. }
  903. return nil, &googleapi.Error{
  904. Code: res.StatusCode,
  905. Header: res.Header,
  906. }
  907. }
  908. if err != nil {
  909. return nil, err
  910. }
  911. defer googleapi.CloseBody(res)
  912. if err := googleapi.CheckResponse(res); err != nil {
  913. return nil, err
  914. }
  915. ret := &Empty{
  916. ServerResponse: googleapi.ServerResponse{
  917. Header: res.Header,
  918. HTTPStatusCode: res.StatusCode,
  919. },
  920. }
  921. target := &ret
  922. if err := gensupport.DecodeResponse(target, res); err != nil {
  923. return nil, err
  924. }
  925. return ret, nil
  926. // {
  927. // "description": "Sends new spans to new or existing traces. You cannot update\nexisting spans.",
  928. // "flatPath": "v2/projects/{projectsId}/traces:batchWrite",
  929. // "httpMethod": "POST",
  930. // "id": "cloudtrace.projects.traces.batchWrite",
  931. // "parameterOrder": [
  932. // "name"
  933. // ],
  934. // "parameters": {
  935. // "name": {
  936. // "description": "Required. The name of the project where the spans belong. The format is\n`projects/[PROJECT_ID]`.",
  937. // "location": "path",
  938. // "pattern": "^projects/[^/]+$",
  939. // "required": true,
  940. // "type": "string"
  941. // }
  942. // },
  943. // "path": "v2/{+name}/traces:batchWrite",
  944. // "request": {
  945. // "$ref": "BatchWriteSpansRequest"
  946. // },
  947. // "response": {
  948. // "$ref": "Empty"
  949. // },
  950. // "scopes": [
  951. // "https://www.googleapis.com/auth/cloud-platform",
  952. // "https://www.googleapis.com/auth/trace.append"
  953. // ]
  954. // }
  955. }
  956. // method id "cloudtrace.projects.traces.spans.createSpan":
  957. type ProjectsTracesSpansCreateSpanCall struct {
  958. s *Service
  959. nameid string
  960. span *Span
  961. urlParams_ gensupport.URLParams
  962. ctx_ context.Context
  963. header_ http.Header
  964. }
  965. // CreateSpan: Creates a new span.
  966. func (r *ProjectsTracesSpansService) CreateSpan(nameid string, span *Span) *ProjectsTracesSpansCreateSpanCall {
  967. c := &ProjectsTracesSpansCreateSpanCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  968. c.nameid = nameid
  969. c.span = span
  970. return c
  971. }
  972. // Fields allows partial responses to be retrieved. See
  973. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  974. // for more information.
  975. func (c *ProjectsTracesSpansCreateSpanCall) Fields(s ...googleapi.Field) *ProjectsTracesSpansCreateSpanCall {
  976. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  977. return c
  978. }
  979. // Context sets the context to be used in this call's Do method. Any
  980. // pending HTTP request will be aborted if the provided context is
  981. // canceled.
  982. func (c *ProjectsTracesSpansCreateSpanCall) Context(ctx context.Context) *ProjectsTracesSpansCreateSpanCall {
  983. c.ctx_ = ctx
  984. return c
  985. }
  986. // Header returns an http.Header that can be modified by the caller to
  987. // add HTTP headers to the request.
  988. func (c *ProjectsTracesSpansCreateSpanCall) Header() http.Header {
  989. if c.header_ == nil {
  990. c.header_ = make(http.Header)
  991. }
  992. return c.header_
  993. }
  994. func (c *ProjectsTracesSpansCreateSpanCall) doRequest(alt string) (*http.Response, error) {
  995. reqHeaders := make(http.Header)
  996. for k, v := range c.header_ {
  997. reqHeaders[k] = v
  998. }
  999. reqHeaders.Set("User-Agent", c.s.userAgent())
  1000. var body io.Reader = nil
  1001. body, err := googleapi.WithoutDataWrapper.JSONReader(c.span)
  1002. if err != nil {
  1003. return nil, err
  1004. }
  1005. reqHeaders.Set("Content-Type", "application/json")
  1006. c.urlParams_.Set("alt", alt)
  1007. urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+name}")
  1008. urls += "?" + c.urlParams_.Encode()
  1009. req, _ := http.NewRequest("POST", urls, body)
  1010. req.Header = reqHeaders
  1011. googleapi.Expand(req.URL, map[string]string{
  1012. "name": c.nameid,
  1013. })
  1014. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  1015. }
  1016. // Do executes the "cloudtrace.projects.traces.spans.createSpan" call.
  1017. // Exactly one of *Span or error will be non-nil. Any non-2xx status
  1018. // code is an error. Response headers are in either
  1019. // *Span.ServerResponse.Header or (if a response was returned at all) in
  1020. // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  1021. // whether the returned error was because http.StatusNotModified was
  1022. // returned.
  1023. func (c *ProjectsTracesSpansCreateSpanCall) Do(opts ...googleapi.CallOption) (*Span, error) {
  1024. gensupport.SetOptions(c.urlParams_, opts...)
  1025. res, err := c.doRequest("json")
  1026. if res != nil && res.StatusCode == http.StatusNotModified {
  1027. if res.Body != nil {
  1028. res.Body.Close()
  1029. }
  1030. return nil, &googleapi.Error{
  1031. Code: res.StatusCode,
  1032. Header: res.Header,
  1033. }
  1034. }
  1035. if err != nil {
  1036. return nil, err
  1037. }
  1038. defer googleapi.CloseBody(res)
  1039. if err := googleapi.CheckResponse(res); err != nil {
  1040. return nil, err
  1041. }
  1042. ret := &Span{
  1043. ServerResponse: googleapi.ServerResponse{
  1044. Header: res.Header,
  1045. HTTPStatusCode: res.StatusCode,
  1046. },
  1047. }
  1048. target := &ret
  1049. if err := gensupport.DecodeResponse(target, res); err != nil {
  1050. return nil, err
  1051. }
  1052. return ret, nil
  1053. // {
  1054. // "description": "Creates a new span.",
  1055. // "flatPath": "v2/projects/{projectsId}/traces/{tracesId}/spans/{spansId}",
  1056. // "httpMethod": "POST",
  1057. // "id": "cloudtrace.projects.traces.spans.createSpan",
  1058. // "parameterOrder": [
  1059. // "name"
  1060. // ],
  1061. // "parameters": {
  1062. // "name": {
  1063. // "description": "The resource name of the span in the following format:\n\n projects/[PROJECT_ID]/traces/[TRACE_ID]/spans/SPAN_ID is a unique identifier for a trace within a project;\nit is a 32-character hexadecimal encoding of a 16-byte array.\n\n[SPAN_ID] is a unique identifier for a span within a trace; it\nis a 16-character hexadecimal encoding of an 8-byte array.",
  1064. // "location": "path",
  1065. // "pattern": "^projects/[^/]+/traces/[^/]+/spans/[^/]+$",
  1066. // "required": true,
  1067. // "type": "string"
  1068. // }
  1069. // },
  1070. // "path": "v2/{+name}",
  1071. // "request": {
  1072. // "$ref": "Span"
  1073. // },
  1074. // "response": {
  1075. // "$ref": "Span"
  1076. // },
  1077. // "scopes": [
  1078. // "https://www.googleapis.com/auth/cloud-platform",
  1079. // "https://www.googleapis.com/auth/trace.append"
  1080. // ]
  1081. // }
  1082. }