From 5b8662074305ed8e8792ec9ec6c096d3c6628433 Mon Sep 17 00:00:00 2001 From: Yuri Shkuro Date: Sat, 9 Sep 2023 22:06:27 -0400 Subject: [PATCH] Add Go type mapping for new timestamp fields from #95 (#98) * Add Go type mapping for new timestamp fields from #95 Signed-off-by: Yuri Shkuro * fix Signed-off-by: Yuri Shkuro * import Signed-off-by: Yuri Shkuro --------- Signed-off-by: Yuri Shkuro --- proto/api_v2/query.proto | 16 ++++++++++++---- proto/api_v3/query_service.proto | 9 +++++++-- 2 files changed, 19 insertions(+), 6 deletions(-) diff --git a/proto/api_v2/query.proto b/proto/api_v2/query.proto index d2a6b15..43c4969 100644 --- a/proto/api_v2/query.proto +++ b/proto/api_v2/query.proto @@ -41,9 +41,13 @@ message GetTraceRequest { (gogoproto.customname) = "TraceID" ]; // Optional. The start time to search trace ID. - google.protobuf.Timestamp start_time = 2; + google.protobuf.Timestamp start_time = 2 [ + (gogoproto.stdtime) = true + ]; // Optional. The end time to search trace ID. - google.protobuf.Timestamp end_time = 3; + google.protobuf.Timestamp end_time = 3 [ + (gogoproto.stdtime) = true + ]; } message SpansResponseChunk { @@ -59,9 +63,13 @@ message ArchiveTraceRequest { (gogoproto.customname) = "TraceID" ]; // Optional. The start time to search trace ID. - google.protobuf.Timestamp start_time = 2; + google.protobuf.Timestamp start_time = 2 [ + (gogoproto.stdtime) = true + ]; // Optional. The end time to search trace ID. - google.protobuf.Timestamp end_time = 3; + google.protobuf.Timestamp end_time = 3 [ + (gogoproto.stdtime) = true + ]; } message ArchiveTraceResponse { diff --git a/proto/api_v3/query_service.proto b/proto/api_v3/query_service.proto index 1ddb02f..b809e94 100644 --- a/proto/api_v3/query_service.proto +++ b/proto/api_v3/query_service.proto @@ -17,6 +17,7 @@ syntax="proto3"; package jaeger.api_v3; import "opentelemetry/proto/trace/v1/trace.proto"; +import "gogoproto/gogo.proto"; import "google/protobuf/timestamp.proto"; import "google/protobuf/duration.proto"; @@ -28,9 +29,13 @@ message GetTraceRequest { // Hex encoded 64 or 128 bit trace ID. string trace_id = 1; // Optional. The start time to search trace ID. - google.protobuf.Timestamp start_time = 2; + google.protobuf.Timestamp start_time = 2 [ + (gogoproto.stdtime) = true + ]; // Optional. The end time to search trace ID. - google.protobuf.Timestamp end_time = 3; + google.protobuf.Timestamp end_time = 3 [ + (gogoproto.stdtime) = true + ]; } // Response object with spans.