tracing.proto 2.9 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879
  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. syntax = "proto3";
  15. package google.devtools.cloudtrace.v2;
  16. import "google/api/annotations.proto";
  17. import "google/api/client.proto";
  18. import "google/api/field_behavior.proto";
  19. import "google/api/resource.proto";
  20. import "google/devtools/cloudtrace/v2/trace.proto";
  21. import "google/protobuf/empty.proto";
  22. import "google/protobuf/timestamp.proto";
  23. option csharp_namespace = "Google.Cloud.Trace.V2";
  24. option go_package = "google.golang.org/genproto/googleapis/devtools/cloudtrace/v2;cloudtrace";
  25. option java_multiple_files = true;
  26. option java_outer_classname = "TracingProto";
  27. option java_package = "com.google.devtools.cloudtrace.v2";
  28. option php_namespace = "Google\\Cloud\\Trace\\V2";
  29. option ruby_package = "Google::Cloud::Trace::V2";
  30. // This file describes an API for collecting and viewing traces and spans
  31. // within a trace. A Trace is a collection of spans corresponding to a single
  32. // operation or set of operations for an application. A span is an individual
  33. // timed event which forms a node of the trace tree. A single trace may
  34. // contain span(s) from multiple services.
  35. service TraceService {
  36. option (google.api.default_host) = "cloudtrace.googleapis.com";
  37. option (google.api.oauth_scopes) =
  38. "https://www.googleapis.com/auth/cloud-platform,"
  39. "https://www.googleapis.com/auth/trace.append";
  40. // Sends new spans to new or existing traces. You cannot update
  41. // existing spans.
  42. rpc BatchWriteSpans(BatchWriteSpansRequest) returns (google.protobuf.Empty) {
  43. option (google.api.http) = {
  44. post: "/v2/{name=projects/*}/traces:batchWrite"
  45. body: "*"
  46. };
  47. option (google.api.method_signature) = "name,spans";
  48. }
  49. // Creates a new span.
  50. rpc CreateSpan(Span) returns (Span) {
  51. option (google.api.http) = {
  52. post: "/v2/{name=projects/*/traces/*/spans/*}"
  53. body: "*"
  54. };
  55. }
  56. }
  57. // The request message for the `BatchWriteSpans` method.
  58. message BatchWriteSpansRequest {
  59. // Required. The name of the project where the spans belong. The format is
  60. // `projects/[PROJECT_ID]`.
  61. string name = 1 [
  62. (google.api.field_behavior) = REQUIRED,
  63. (google.api.resource_reference) = {
  64. type: "cloudresourcemanager.googleapis.com/Project"
  65. }
  66. ];
  67. // Required. A list of new spans. The span names must not match existing
  68. // spans, or the results are undefined.
  69. repeated Span spans = 2 [(google.api.field_behavior) = REQUIRED];
  70. }