1 /* 2 * Copyright 2020 Google LLC 3 * 4 * Licensed under the Apache License, Version 2.0 (the "License"); 5 * you may not use this file except in compliance with the License. 6 * You may obtain a copy of the License at 7 * 8 * https://www.apache.org/licenses/LICENSE-2.0 9 * 10 * Unless required by applicable law or agreed to in writing, software 11 * distributed under the License is distributed on an "AS IS" BASIS, 12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 * See the License for the specific language governing permissions and 14 * limitations under the License. 15 */ 16 // Generated by the protocol buffer compiler. DO NOT EDIT! 17 // source: google/devtools/cloudtrace/v1/trace.proto 18 19 package com.google.devtools.cloudtrace.v1; 20 21 public interface TraceSpanOrBuilder 22 extends 23 // @@protoc_insertion_point(interface_extends:google.devtools.cloudtrace.v1.TraceSpan) 24 com.google.protobuf.MessageOrBuilder { 25 26 /** 27 * 28 * 29 * <pre> 30 * Identifier for the span. Must be a 64-bit integer other than 0 and 31 * unique within a trace. For example, `2205310701640571284`. 32 * </pre> 33 * 34 * <code>fixed64 span_id = 1;</code> 35 * 36 * @return The spanId. 37 */ getSpanId()38 long getSpanId(); 39 40 /** 41 * 42 * 43 * <pre> 44 * Distinguishes between spans generated in a particular context. For example, 45 * two spans with the same name may be distinguished using `RPC_CLIENT` 46 * and `RPC_SERVER` to identify queueing latency associated with the span. 47 * </pre> 48 * 49 * <code>.google.devtools.cloudtrace.v1.TraceSpan.SpanKind kind = 2;</code> 50 * 51 * @return The enum numeric value on the wire for kind. 52 */ getKindValue()53 int getKindValue(); 54 /** 55 * 56 * 57 * <pre> 58 * Distinguishes between spans generated in a particular context. For example, 59 * two spans with the same name may be distinguished using `RPC_CLIENT` 60 * and `RPC_SERVER` to identify queueing latency associated with the span. 61 * </pre> 62 * 63 * <code>.google.devtools.cloudtrace.v1.TraceSpan.SpanKind kind = 2;</code> 64 * 65 * @return The kind. 66 */ getKind()67 com.google.devtools.cloudtrace.v1.TraceSpan.SpanKind getKind(); 68 69 /** 70 * 71 * 72 * <pre> 73 * Name of the span. Must be less than 128 bytes. The span name is sanitized 74 * and displayed in the Stackdriver Trace tool in the 75 * Google Cloud Platform Console. 76 * The name may be a method name or some other per-call site name. 77 * For the same executable and the same call point, a best practice is 78 * to use a consistent name, which makes it easier to correlate 79 * cross-trace spans. 80 * </pre> 81 * 82 * <code>string name = 3;</code> 83 * 84 * @return The name. 85 */ getName()86 java.lang.String getName(); 87 /** 88 * 89 * 90 * <pre> 91 * Name of the span. Must be less than 128 bytes. The span name is sanitized 92 * and displayed in the Stackdriver Trace tool in the 93 * Google Cloud Platform Console. 94 * The name may be a method name or some other per-call site name. 95 * For the same executable and the same call point, a best practice is 96 * to use a consistent name, which makes it easier to correlate 97 * cross-trace spans. 98 * </pre> 99 * 100 * <code>string name = 3;</code> 101 * 102 * @return The bytes for name. 103 */ getNameBytes()104 com.google.protobuf.ByteString getNameBytes(); 105 106 /** 107 * 108 * 109 * <pre> 110 * Start time of the span in nanoseconds from the UNIX epoch. 111 * </pre> 112 * 113 * <code>.google.protobuf.Timestamp start_time = 4;</code> 114 * 115 * @return Whether the startTime field is set. 116 */ hasStartTime()117 boolean hasStartTime(); 118 /** 119 * 120 * 121 * <pre> 122 * Start time of the span in nanoseconds from the UNIX epoch. 123 * </pre> 124 * 125 * <code>.google.protobuf.Timestamp start_time = 4;</code> 126 * 127 * @return The startTime. 128 */ getStartTime()129 com.google.protobuf.Timestamp getStartTime(); 130 /** 131 * 132 * 133 * <pre> 134 * Start time of the span in nanoseconds from the UNIX epoch. 135 * </pre> 136 * 137 * <code>.google.protobuf.Timestamp start_time = 4;</code> 138 */ getStartTimeOrBuilder()139 com.google.protobuf.TimestampOrBuilder getStartTimeOrBuilder(); 140 141 /** 142 * 143 * 144 * <pre> 145 * End time of the span in nanoseconds from the UNIX epoch. 146 * </pre> 147 * 148 * <code>.google.protobuf.Timestamp end_time = 5;</code> 149 * 150 * @return Whether the endTime field is set. 151 */ hasEndTime()152 boolean hasEndTime(); 153 /** 154 * 155 * 156 * <pre> 157 * End time of the span in nanoseconds from the UNIX epoch. 158 * </pre> 159 * 160 * <code>.google.protobuf.Timestamp end_time = 5;</code> 161 * 162 * @return The endTime. 163 */ getEndTime()164 com.google.protobuf.Timestamp getEndTime(); 165 /** 166 * 167 * 168 * <pre> 169 * End time of the span in nanoseconds from the UNIX epoch. 170 * </pre> 171 * 172 * <code>.google.protobuf.Timestamp end_time = 5;</code> 173 */ getEndTimeOrBuilder()174 com.google.protobuf.TimestampOrBuilder getEndTimeOrBuilder(); 175 176 /** 177 * 178 * 179 * <pre> 180 * Optional. ID of the parent span, if any. 181 * </pre> 182 * 183 * <code>fixed64 parent_span_id = 6 [(.google.api.field_behavior) = OPTIONAL];</code> 184 * 185 * @return The parentSpanId. 186 */ getParentSpanId()187 long getParentSpanId(); 188 189 /** 190 * 191 * 192 * <pre> 193 * Collection of labels associated with the span. Label keys must be less than 194 * 128 bytes. Label values must be less than 16 kilobytes (10MB for 195 * `/stacktrace` values). 196 * Some predefined label keys exist, or you may create your own. When creating 197 * your own, we recommend the following formats: 198 * * `/category/product/key` for agents of well-known products (e.g. 199 * `/db/mongodb/read_size`). 200 * * `short_host/path/key` for domain-specific keys (e.g. 201 * `foo.com/myproduct/bar`) 202 * Predefined labels include: 203 * * `/agent` 204 * * `/component` 205 * * `/error/message` 206 * * `/error/name` 207 * * `/http/client_city` 208 * * `/http/client_country` 209 * * `/http/client_protocol` 210 * * `/http/client_region` 211 * * `/http/host` 212 * * `/http/method` 213 * * `/http/path` 214 * * `/http/redirected_url` 215 * * `/http/request/size` 216 * * `/http/response/size` 217 * * `/http/route` 218 * * `/http/status_code` 219 * * `/http/url` 220 * * `/http/user_agent` 221 * * `/pid` 222 * * `/stacktrace` 223 * * `/tid` 224 * </pre> 225 * 226 * <code>map<string, string> labels = 7;</code> 227 */ getLabelsCount()228 int getLabelsCount(); 229 /** 230 * 231 * 232 * <pre> 233 * Collection of labels associated with the span. Label keys must be less than 234 * 128 bytes. Label values must be less than 16 kilobytes (10MB for 235 * `/stacktrace` values). 236 * Some predefined label keys exist, or you may create your own. When creating 237 * your own, we recommend the following formats: 238 * * `/category/product/key` for agents of well-known products (e.g. 239 * `/db/mongodb/read_size`). 240 * * `short_host/path/key` for domain-specific keys (e.g. 241 * `foo.com/myproduct/bar`) 242 * Predefined labels include: 243 * * `/agent` 244 * * `/component` 245 * * `/error/message` 246 * * `/error/name` 247 * * `/http/client_city` 248 * * `/http/client_country` 249 * * `/http/client_protocol` 250 * * `/http/client_region` 251 * * `/http/host` 252 * * `/http/method` 253 * * `/http/path` 254 * * `/http/redirected_url` 255 * * `/http/request/size` 256 * * `/http/response/size` 257 * * `/http/route` 258 * * `/http/status_code` 259 * * `/http/url` 260 * * `/http/user_agent` 261 * * `/pid` 262 * * `/stacktrace` 263 * * `/tid` 264 * </pre> 265 * 266 * <code>map<string, string> labels = 7;</code> 267 */ containsLabels(java.lang.String key)268 boolean containsLabels(java.lang.String key); 269 /** Use {@link #getLabelsMap()} instead. */ 270 @java.lang.Deprecated getLabels()271 java.util.Map<java.lang.String, java.lang.String> getLabels(); 272 /** 273 * 274 * 275 * <pre> 276 * Collection of labels associated with the span. Label keys must be less than 277 * 128 bytes. Label values must be less than 16 kilobytes (10MB for 278 * `/stacktrace` values). 279 * Some predefined label keys exist, or you may create your own. When creating 280 * your own, we recommend the following formats: 281 * * `/category/product/key` for agents of well-known products (e.g. 282 * `/db/mongodb/read_size`). 283 * * `short_host/path/key` for domain-specific keys (e.g. 284 * `foo.com/myproduct/bar`) 285 * Predefined labels include: 286 * * `/agent` 287 * * `/component` 288 * * `/error/message` 289 * * `/error/name` 290 * * `/http/client_city` 291 * * `/http/client_country` 292 * * `/http/client_protocol` 293 * * `/http/client_region` 294 * * `/http/host` 295 * * `/http/method` 296 * * `/http/path` 297 * * `/http/redirected_url` 298 * * `/http/request/size` 299 * * `/http/response/size` 300 * * `/http/route` 301 * * `/http/status_code` 302 * * `/http/url` 303 * * `/http/user_agent` 304 * * `/pid` 305 * * `/stacktrace` 306 * * `/tid` 307 * </pre> 308 * 309 * <code>map<string, string> labels = 7;</code> 310 */ getLabelsMap()311 java.util.Map<java.lang.String, java.lang.String> getLabelsMap(); 312 /** 313 * 314 * 315 * <pre> 316 * Collection of labels associated with the span. Label keys must be less than 317 * 128 bytes. Label values must be less than 16 kilobytes (10MB for 318 * `/stacktrace` values). 319 * Some predefined label keys exist, or you may create your own. When creating 320 * your own, we recommend the following formats: 321 * * `/category/product/key` for agents of well-known products (e.g. 322 * `/db/mongodb/read_size`). 323 * * `short_host/path/key` for domain-specific keys (e.g. 324 * `foo.com/myproduct/bar`) 325 * Predefined labels include: 326 * * `/agent` 327 * * `/component` 328 * * `/error/message` 329 * * `/error/name` 330 * * `/http/client_city` 331 * * `/http/client_country` 332 * * `/http/client_protocol` 333 * * `/http/client_region` 334 * * `/http/host` 335 * * `/http/method` 336 * * `/http/path` 337 * * `/http/redirected_url` 338 * * `/http/request/size` 339 * * `/http/response/size` 340 * * `/http/route` 341 * * `/http/status_code` 342 * * `/http/url` 343 * * `/http/user_agent` 344 * * `/pid` 345 * * `/stacktrace` 346 * * `/tid` 347 * </pre> 348 * 349 * <code>map<string, string> labels = 7;</code> 350 */ 351 /* nullable */ getLabelsOrDefault( java.lang.String key, java.lang.String defaultValue)352 java.lang.String getLabelsOrDefault( 353 java.lang.String key, 354 /* nullable */ 355 java.lang.String defaultValue); 356 /** 357 * 358 * 359 * <pre> 360 * Collection of labels associated with the span. Label keys must be less than 361 * 128 bytes. Label values must be less than 16 kilobytes (10MB for 362 * `/stacktrace` values). 363 * Some predefined label keys exist, or you may create your own. When creating 364 * your own, we recommend the following formats: 365 * * `/category/product/key` for agents of well-known products (e.g. 366 * `/db/mongodb/read_size`). 367 * * `short_host/path/key` for domain-specific keys (e.g. 368 * `foo.com/myproduct/bar`) 369 * Predefined labels include: 370 * * `/agent` 371 * * `/component` 372 * * `/error/message` 373 * * `/error/name` 374 * * `/http/client_city` 375 * * `/http/client_country` 376 * * `/http/client_protocol` 377 * * `/http/client_region` 378 * * `/http/host` 379 * * `/http/method` 380 * * `/http/path` 381 * * `/http/redirected_url` 382 * * `/http/request/size` 383 * * `/http/response/size` 384 * * `/http/route` 385 * * `/http/status_code` 386 * * `/http/url` 387 * * `/http/user_agent` 388 * * `/pid` 389 * * `/stacktrace` 390 * * `/tid` 391 * </pre> 392 * 393 * <code>map<string, string> labels = 7;</code> 394 */ getLabelsOrThrow(java.lang.String key)395 java.lang.String getLabelsOrThrow(java.lang.String key); 396 } 397