tracing.proto 2.9 KB

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