From 6d79e46232e026136ae013489ef611ca721cb839 Mon Sep 17 00:00:00 2001 From: Sergey Kanzhelev Date: Fri, 18 Jan 2019 14:26:29 -0800 Subject: [PATCH] time is required (#170) * time is required * handle case when only end_time was set --- src/opencensus/proto/trace/v1/trace.proto | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/src/opencensus/proto/trace/v1/trace.proto b/src/opencensus/proto/trace/v1/trace.proto index d42512b..89e1747 100644 --- a/src/opencensus/proto/trace/v1/trace.proto +++ b/src/opencensus/proto/trace/v1/trace.proto @@ -122,11 +122,24 @@ message Span { // 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. + // + // This field is semantically required. When not set on receive - + // receiver should set it to the value of end_time field if it was + // set. Or to the current time if neither was set. It is important to + // keep end_time > start_time for consistency. + // + // This field is required. google.protobuf.Timestamp start_time = 5; // 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. + // + // This field is semantically required. When not set on receive - + // receiver should set it to start_time value. It is important to + // keep end_time > start_time for consistency. + // + // This field is required. google.protobuf.Timestamp end_time = 6; // A set of attributes, each with a key and a value.