1{ 2 "auth": { 3 "oauth2": { 4 "scopes": { 5 "https://www.googleapis.com/auth/cloud-platform": { 6 "description": "See, edit, configure, and delete your Google Cloud data and see the email address for your Google Account." 7 }, 8 "https://www.googleapis.com/auth/trace.append": { 9 "description": "Write Trace data for a project or application" 10 } 11 } 12 } 13 }, 14 "basePath": "", 15 "baseUrl": "https://cloudtrace.googleapis.com/", 16 "batchPath": "batch", 17 "canonicalName": "Cloud Trace", 18 "description": "Sends application trace data to Cloud Trace for viewing. Trace data is collected for all App Engine applications by default. Trace data from other applications can be provided using this API. This library is used to interact with the Cloud Trace API directly. If you are looking to instrument your application for Cloud Trace, we recommend using OpenCensus. ", 19 "discoveryVersion": "v1", 20 "documentationLink": "https://cloud.google.com/trace", 21 "fullyEncodeReservedExpansion": true, 22 "icons": { 23 "x16": "http://www.google.com/images/icons/product/search-16.gif", 24 "x32": "http://www.google.com/images/icons/product/search-32.gif" 25 }, 26 "id": "cloudtrace:v2", 27 "kind": "discovery#restDescription", 28 "mtlsRootUrl": "https://cloudtrace.mtls.googleapis.com/", 29 "name": "cloudtrace", 30 "ownerDomain": "google.com", 31 "ownerName": "Google", 32 "parameters": { 33 "$.xgafv": { 34 "description": "V1 error format.", 35 "enum": [ 36 "1", 37 "2" 38 ], 39 "enumDescriptions": [ 40 "v1 error format", 41 "v2 error format" 42 ], 43 "location": "query", 44 "type": "string" 45 }, 46 "access_token": { 47 "description": "OAuth access token.", 48 "location": "query", 49 "type": "string" 50 }, 51 "alt": { 52 "default": "json", 53 "description": "Data format for response.", 54 "enum": [ 55 "json", 56 "media", 57 "proto" 58 ], 59 "enumDescriptions": [ 60 "Responses with Content-Type of application/json", 61 "Media download with context-dependent Content-Type", 62 "Responses with Content-Type of application/x-protobuf" 63 ], 64 "location": "query", 65 "type": "string" 66 }, 67 "callback": { 68 "description": "JSONP", 69 "location": "query", 70 "type": "string" 71 }, 72 "fields": { 73 "description": "Selector specifying which fields to include in a partial response.", 74 "location": "query", 75 "type": "string" 76 }, 77 "key": { 78 "description": "API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token.", 79 "location": "query", 80 "type": "string" 81 }, 82 "oauth_token": { 83 "description": "OAuth 2.0 token for the current user.", 84 "location": "query", 85 "type": "string" 86 }, 87 "prettyPrint": { 88 "default": "true", 89 "description": "Returns response with indentations and line breaks.", 90 "location": "query", 91 "type": "boolean" 92 }, 93 "quotaUser": { 94 "description": "Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters.", 95 "location": "query", 96 "type": "string" 97 }, 98 "uploadType": { 99 "description": "Legacy upload protocol for media (e.g. \"media\", \"multipart\").", 100 "location": "query", 101 "type": "string" 102 }, 103 "upload_protocol": { 104 "description": "Upload protocol for media (e.g. \"raw\", \"multipart\").", 105 "location": "query", 106 "type": "string" 107 } 108 }, 109 "protocol": "rest", 110 "resources": { 111 "projects": { 112 "resources": { 113 "traces": { 114 "methods": { 115 "batchWrite": { 116 "description": "Sends new spans to new or existing traces. You cannot update existing spans.", 117 "flatPath": "v2/projects/{projectsId}/traces:batchWrite", 118 "httpMethod": "POST", 119 "id": "cloudtrace.projects.traces.batchWrite", 120 "parameterOrder": [ 121 "name" 122 ], 123 "parameters": { 124 "name": { 125 "description": "Required. The name of the project where the spans belong. The format is `projects/[PROJECT_ID]`.", 126 "location": "path", 127 "pattern": "^projects/[^/]+$", 128 "required": true, 129 "type": "string" 130 } 131 }, 132 "path": "v2/{+name}/traces:batchWrite", 133 "request": { 134 "$ref": "BatchWriteSpansRequest" 135 }, 136 "response": { 137 "$ref": "Empty" 138 }, 139 "scopes": [ 140 "https://www.googleapis.com/auth/cloud-platform", 141 "https://www.googleapis.com/auth/trace.append" 142 ] 143 } 144 }, 145 "resources": { 146 "spans": { 147 "methods": { 148 "createSpan": { 149 "description": "Creates a new span.", 150 "flatPath": "v2/projects/{projectsId}/traces/{tracesId}/spans/{spansId}", 151 "httpMethod": "POST", 152 "id": "cloudtrace.projects.traces.spans.createSpan", 153 "parameterOrder": [ 154 "name" 155 ], 156 "parameters": { 157 "name": { 158 "description": "Required. The resource name of the span in the following format: projects/[PROJECT_ID]/traces/[TRACE_ID]/spans/SPAN_ID is a unique identifier for a trace within a project; it is a 32-character hexadecimal encoding of a 16-byte array. [SPAN_ID] is a unique identifier for a span within a trace; it is a 16-character hexadecimal encoding of an 8-byte array. It should not be zero.", 159 "location": "path", 160 "pattern": "^projects/[^/]+/traces/[^/]+/spans/[^/]+$", 161 "required": true, 162 "type": "string" 163 } 164 }, 165 "path": "v2/{+name}", 166 "request": { 167 "$ref": "Span" 168 }, 169 "response": { 170 "$ref": "Span" 171 }, 172 "scopes": [ 173 "https://www.googleapis.com/auth/cloud-platform", 174 "https://www.googleapis.com/auth/trace.append" 175 ] 176 } 177 } 178 } 179 } 180 } 181 } 182 } 183 }, 184 "revision": "20211203", 185 "rootUrl": "https://cloudtrace.googleapis.com/", 186 "schemas": { 187 "Annotation": { 188 "description": "Text annotation with a set of attributes.", 189 "id": "Annotation", 190 "properties": { 191 "attributes": { 192 "$ref": "Attributes", 193 "description": "A set of attributes on the annotation. You can have up to 4 attributes per Annotation." 194 }, 195 "description": { 196 "$ref": "TruncatableString", 197 "description": "A user-supplied message describing the event. The maximum length for the description is 256 bytes." 198 } 199 }, 200 "type": "object" 201 }, 202 "AttributeValue": { 203 "description": "The allowed types for [VALUE] in a `[KEY]:[VALUE]` attribute.", 204 "id": "AttributeValue", 205 "properties": { 206 "boolValue": { 207 "description": "A Boolean value represented by `true` or `false`.", 208 "type": "boolean" 209 }, 210 "intValue": { 211 "description": "A 64-bit signed integer.", 212 "format": "int64", 213 "type": "string" 214 }, 215 "stringValue": { 216 "$ref": "TruncatableString", 217 "description": "A string up to 256 bytes long." 218 } 219 }, 220 "type": "object" 221 }, 222 "Attributes": { 223 "description": "A set of attributes, each in the format `[KEY]:[VALUE]`.", 224 "id": "Attributes", 225 "properties": { 226 "attributeMap": { 227 "additionalProperties": { 228 "$ref": "AttributeValue" 229 }, 230 "description": "The set of attributes. Each attribute's key can be up to 128 bytes long. The value can be a string up to 256 bytes, a signed 64-bit integer, or the Boolean values `true` and `false`. For example: \"/instance_id\": { \"string_value\": { \"value\": \"my-instance\" } } \"/http/request_bytes\": { \"int_value\": 300 } \"abc.com/myattribute\": { \"bool_value\": false }", 231 "type": "object" 232 }, 233 "droppedAttributesCount": { 234 "description": "The number of attributes that were discarded. Attributes can be discarded because their keys are too long or because there are too many attributes. If this value is 0 then all attributes are valid.", 235 "format": "int32", 236 "type": "integer" 237 } 238 }, 239 "type": "object" 240 }, 241 "BatchWriteSpansRequest": { 242 "description": "The request message for the `BatchWriteSpans` method.", 243 "id": "BatchWriteSpansRequest", 244 "properties": { 245 "spans": { 246 "description": "Required. A list of new spans. The span names must not match existing spans, or the results are undefined.", 247 "items": { 248 "$ref": "Span" 249 }, 250 "type": "array" 251 } 252 }, 253 "type": "object" 254 }, 255 "Empty": { 256 "description": "A generic empty message that you can re-use to avoid defining duplicated empty messages in your APIs. A typical example is to use it as the request or the response type of an API method. For instance: service Foo { rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty); } The JSON representation for `Empty` is empty JSON object `{}`.", 257 "id": "Empty", 258 "properties": {}, 259 "type": "object" 260 }, 261 "Link": { 262 "description": "A pointer from the current span to another span in the same trace or in a different trace. For example, this can be used in batching operations, where a single batch handler processes multiple requests from different traces or when the handler receives a request from a different project.", 263 "id": "Link", 264 "properties": { 265 "attributes": { 266 "$ref": "Attributes", 267 "description": "A set of attributes on the link. You have have up to 32 attributes per link." 268 }, 269 "spanId": { 270 "description": "The [SPAN_ID] for a span within a trace.", 271 "type": "string" 272 }, 273 "traceId": { 274 "description": "The [TRACE_ID] for a trace within a project.", 275 "type": "string" 276 }, 277 "type": { 278 "description": "The relationship of the current span relative to the linked span.", 279 "enum": [ 280 "TYPE_UNSPECIFIED", 281 "CHILD_LINKED_SPAN", 282 "PARENT_LINKED_SPAN" 283 ], 284 "enumDescriptions": [ 285 "The relationship of the two spans is unknown.", 286 "The linked span is a child of the current span.", 287 "The linked span is a parent of the current span." 288 ], 289 "type": "string" 290 } 291 }, 292 "type": "object" 293 }, 294 "Links": { 295 "description": "A collection of links, which are references from this span to a span in the same or different trace.", 296 "id": "Links", 297 "properties": { 298 "droppedLinksCount": { 299 "description": "The number of dropped links after the maximum size was enforced. If this value is 0, then no links were dropped.", 300 "format": "int32", 301 "type": "integer" 302 }, 303 "link": { 304 "description": "A collection of links.", 305 "items": { 306 "$ref": "Link" 307 }, 308 "type": "array" 309 } 310 }, 311 "type": "object" 312 }, 313 "MessageEvent": { 314 "description": "An event describing a message sent/received between Spans.", 315 "id": "MessageEvent", 316 "properties": { 317 "compressedSizeBytes": { 318 "description": "The number of compressed bytes sent or received. If missing assumed to be the same size as uncompressed.", 319 "format": "int64", 320 "type": "string" 321 }, 322 "id": { 323 "description": "An identifier for the MessageEvent's message that can be used to match SENT and RECEIVED MessageEvents. It is recommended to be unique within a Span.", 324 "format": "int64", 325 "type": "string" 326 }, 327 "type": { 328 "description": "Type of MessageEvent. Indicates whether the message was sent or received.", 329 "enum": [ 330 "TYPE_UNSPECIFIED", 331 "SENT", 332 "RECEIVED" 333 ], 334 "enumDescriptions": [ 335 "Unknown event type.", 336 "Indicates a sent message.", 337 "Indicates a received message." 338 ], 339 "type": "string" 340 }, 341 "uncompressedSizeBytes": { 342 "description": "The number of uncompressed bytes sent or received.", 343 "format": "int64", 344 "type": "string" 345 } 346 }, 347 "type": "object" 348 }, 349 "Module": { 350 "description": "Binary module.", 351 "id": "Module", 352 "properties": { 353 "buildId": { 354 "$ref": "TruncatableString", 355 "description": "A unique identifier for the module, usually a hash of its contents (up to 128 bytes)." 356 }, 357 "module": { 358 "$ref": "TruncatableString", 359 "description": "For example: main binary, kernel modules, and dynamic libraries such as libc.so, sharedlib.so (up to 256 bytes)." 360 } 361 }, 362 "type": "object" 363 }, 364 "Span": { 365 "description": "A span represents a single operation within a trace. Spans can be nested to form a trace tree. Often, a trace contains a root span that describes the end-to-end latency, and one or more subspans for its sub-operations. A trace can also contain multiple root spans, or none at all. Spans do not need to be contiguous\u2014there may be gaps or overlaps between spans in a trace.", 366 "id": "Span", 367 "properties": { 368 "attributes": { 369 "$ref": "Attributes", 370 "description": "A set of attributes on the span. You can have up to 32 attributes per span." 371 }, 372 "childSpanCount": { 373 "description": "Optional. The number of child spans that were generated while this span was active. If set, allows implementation to detect missing child spans.", 374 "format": "int32", 375 "type": "integer" 376 }, 377 "displayName": { 378 "$ref": "TruncatableString", 379 "description": "Required. A description of the span's operation (up to 128 bytes). Trace displays the description in the Google Cloud Platform Console. For example, the display name can be a qualified method name or a file name and a line number where the operation is called. A best practice is to use the same display name within an application and at the same call point. This makes it easier to correlate spans in different traces." 380 }, 381 "endTime": { 382 "description": "Required. The end time of the span. On the client side, this is the time kept by the local machine where the span execution ends. On the server side, this is the time when the server application handler stops running.", 383 "format": "google-datetime", 384 "type": "string" 385 }, 386 "links": { 387 "$ref": "Links", 388 "description": "Links associated with the span. You can have up to 128 links per Span." 389 }, 390 "name": { 391 "description": "Required. The resource name of the span in the following format: projects/[PROJECT_ID]/traces/[TRACE_ID]/spans/SPAN_ID is a unique identifier for a trace within a project; it is a 32-character hexadecimal encoding of a 16-byte array. [SPAN_ID] is a unique identifier for a span within a trace; it is a 16-character hexadecimal encoding of an 8-byte array. It should not be zero.", 392 "type": "string" 393 }, 394 "parentSpanId": { 395 "description": "The [SPAN_ID] of this span's parent span. If this is a root span, then this field must be empty.", 396 "type": "string" 397 }, 398 "sameProcessAsParentSpan": { 399 "description": "Optional. Set this parameter to indicate whether this span is in the same process as its parent. If you do not set this parameter, Trace is unable to take advantage of this helpful information.", 400 "type": "boolean" 401 }, 402 "spanId": { 403 "description": "Required. The [SPAN_ID] portion of the span's resource name.", 404 "type": "string" 405 }, 406 "spanKind": { 407 "description": "Optional. Distinguishes between spans generated in a particular context. For example, two spans with the same name may be distinguished using `CLIENT` (caller) and `SERVER` (callee) to identify an RPC call.", 408 "enum": [ 409 "SPAN_KIND_UNSPECIFIED", 410 "INTERNAL", 411 "SERVER", 412 "CLIENT", 413 "PRODUCER", 414 "CONSUMER" 415 ], 416 "enumDescriptions": [ 417 "Unspecified. Do NOT use as default. Implementations MAY assume SpanKind.INTERNAL to be default.", 418 "Indicates that the span is used internally. Default value.", 419 "Indicates that the span covers server-side handling of an RPC or other remote network request.", 420 "Indicates that the span covers the client-side wrapper around an RPC or other remote request.", 421 "Indicates that the span describes producer sending a message to a broker. Unlike client and server, there is no direct critical path latency relationship between producer and consumer spans (e.g. publishing a message to a pubsub service).", 422 "Indicates that the span describes consumer receiving a message from a broker. Unlike client and server, there is no direct critical path latency relationship between producer and consumer spans (e.g. receiving a message from a pubsub service subscription)." 423 ], 424 "type": "string" 425 }, 426 "stackTrace": { 427 "$ref": "StackTrace", 428 "description": "Stack trace captured at the start of the span." 429 }, 430 "startTime": { 431 "description": "Required. The start time of the span. On the client side, this is the time kept by the local machine where the span execution starts. On the server side, this is the time when the server's application handler starts running.", 432 "format": "google-datetime", 433 "type": "string" 434 }, 435 "status": { 436 "$ref": "Status", 437 "description": "Optional. The final status for this span." 438 }, 439 "timeEvents": { 440 "$ref": "TimeEvents", 441 "description": "A set of time events. You can have up to 32 annotations and 128 message events per span." 442 } 443 }, 444 "type": "object" 445 }, 446 "StackFrame": { 447 "description": "Represents a single stack frame in a stack trace.", 448 "id": "StackFrame", 449 "properties": { 450 "columnNumber": { 451 "description": "The column number where the function call appears, if available. This is important in JavaScript because of its anonymous functions.", 452 "format": "int64", 453 "type": "string" 454 }, 455 "fileName": { 456 "$ref": "TruncatableString", 457 "description": "The name of the source file where the function call appears (up to 256 bytes)." 458 }, 459 "functionName": { 460 "$ref": "TruncatableString", 461 "description": "The fully-qualified name that uniquely identifies the function or method that is active in this frame (up to 1024 bytes)." 462 }, 463 "lineNumber": { 464 "description": "The line number in `file_name` where the function call appears.", 465 "format": "int64", 466 "type": "string" 467 }, 468 "loadModule": { 469 "$ref": "Module", 470 "description": "The binary module from where the code was loaded." 471 }, 472 "originalFunctionName": { 473 "$ref": "TruncatableString", 474 "description": "An un-mangled function name, if `function_name` is [mangled](http://www.avabodh.com/cxxin/namemangling.html). The name can be fully-qualified (up to 1024 bytes)." 475 }, 476 "sourceVersion": { 477 "$ref": "TruncatableString", 478 "description": "The version of the deployed source code (up to 128 bytes)." 479 } 480 }, 481 "type": "object" 482 }, 483 "StackFrames": { 484 "description": "A collection of stack frames, which can be truncated.", 485 "id": "StackFrames", 486 "properties": { 487 "droppedFramesCount": { 488 "description": "The number of stack frames that were dropped because there were too many stack frames. If this value is 0, then no stack frames were dropped.", 489 "format": "int32", 490 "type": "integer" 491 }, 492 "frame": { 493 "description": "Stack frames in this call stack.", 494 "items": { 495 "$ref": "StackFrame" 496 }, 497 "type": "array" 498 } 499 }, 500 "type": "object" 501 }, 502 "StackTrace": { 503 "description": "A call stack appearing in a trace.", 504 "id": "StackTrace", 505 "properties": { 506 "stackFrames": { 507 "$ref": "StackFrames", 508 "description": "Stack frames in this stack trace. A maximum of 128 frames are allowed." 509 }, 510 "stackTraceHashId": { 511 "description": "The hash ID is used to conserve network bandwidth for duplicate stack traces within a single trace. Often multiple spans will have identical stack traces. The first occurrence of a stack trace should contain both the `stackFrame` content and a value in `stackTraceHashId`. Subsequent spans within the same request can refer to that stack trace by only setting `stackTraceHashId`.", 512 "format": "int64", 513 "type": "string" 514 } 515 }, 516 "type": "object" 517 }, 518 "Status": { 519 "description": "The `Status` type defines a logical error model that is suitable for different programming environments, including REST APIs and RPC APIs. It is used by [gRPC](https://github.com/grpc). Each `Status` message contains three pieces of data: error code, error message, and error details. You can find out more about this error model and how to work with it in the [API Design Guide](https://cloud.google.com/apis/design/errors).", 520 "id": "Status", 521 "properties": { 522 "code": { 523 "description": "The status code, which should be an enum value of google.rpc.Code.", 524 "format": "int32", 525 "type": "integer" 526 }, 527 "details": { 528 "description": "A list of messages that carry the error details. There is a common set of message types for APIs to use.", 529 "items": { 530 "additionalProperties": { 531 "description": "Properties of the object. Contains field @type with type URL.", 532 "type": "any" 533 }, 534 "type": "object" 535 }, 536 "type": "array" 537 }, 538 "message": { 539 "description": "A developer-facing error message, which should be in English. Any user-facing error message should be localized and sent in the google.rpc.Status.details field, or localized by the client.", 540 "type": "string" 541 } 542 }, 543 "type": "object" 544 }, 545 "TimeEvent": { 546 "description": "A time-stamped annotation or message event in the Span.", 547 "id": "TimeEvent", 548 "properties": { 549 "annotation": { 550 "$ref": "Annotation", 551 "description": "Text annotation with a set of attributes." 552 }, 553 "messageEvent": { 554 "$ref": "MessageEvent", 555 "description": "An event describing a message sent/received between Spans." 556 }, 557 "time": { 558 "description": "The timestamp indicating the time the event occurred.", 559 "format": "google-datetime", 560 "type": "string" 561 } 562 }, 563 "type": "object" 564 }, 565 "TimeEvents": { 566 "description": "A collection of `TimeEvent`s. A `TimeEvent` is a time-stamped annotation on the span, consisting of either user-supplied key:value pairs, or details of a message sent/received between Spans.", 567 "id": "TimeEvents", 568 "properties": { 569 "droppedAnnotationsCount": { 570 "description": "The number of dropped annotations in all the included time events. If the value is 0, then no annotations were dropped.", 571 "format": "int32", 572 "type": "integer" 573 }, 574 "droppedMessageEventsCount": { 575 "description": "The number of dropped message events in all the included time events. If the value is 0, then no message events were dropped.", 576 "format": "int32", 577 "type": "integer" 578 }, 579 "timeEvent": { 580 "description": "A collection of `TimeEvent`s.", 581 "items": { 582 "$ref": "TimeEvent" 583 }, 584 "type": "array" 585 } 586 }, 587 "type": "object" 588 }, 589 "TruncatableString": { 590 "description": "Represents a string that might be shortened to a specified length.", 591 "id": "TruncatableString", 592 "properties": { 593 "truncatedByteCount": { 594 "description": "The number of bytes removed from the original string. If this value is 0, then the string was not shortened.", 595 "format": "int32", 596 "type": "integer" 597 }, 598 "value": { 599 "description": "The shortened string. For example, if the original string is 500 bytes long and the limit of the string is 128 bytes, then `value` contains the first 128 bytes of the 500-byte string. Truncation always happens on a UTF8 character boundary. If there are multi-byte characters in the string, then the length of the shortened string might be less than the size limit.", 600 "type": "string" 601 } 602 }, 603 "type": "object" 604 } 605 }, 606 "servicePath": "", 607 "title": "Cloud Trace API", 608 "version": "v2", 609 "version_module": true 610}