m/p/api: use protobuf.Timestamp in LogEntry
This updates LogEntry to use google.protobuf.Timestamp.
See: issue #129.
Change-Id: I937800aa91e86690da0d06f743e720c2d474ad0a
Reviewed-on: https://review.monogon.dev/c/monogon/+/832
Tested-by: Jenkins CI
Reviewed-by: Sergiusz Bazanski <serge@monogon.tech>
diff --git a/metropolis/proto/api/BUILD.bazel b/metropolis/proto/api/BUILD.bazel
index 5bc5640..a333b96 100644
--- a/metropolis/proto/api/BUILD.bazel
+++ b/metropolis/proto/api/BUILD.bazel
@@ -15,6 +15,7 @@
"//metropolis/proto/common:common_proto",
"//metropolis/proto/ext:ext_proto",
"@com_google_protobuf//:duration_proto",
+ "@com_google_protobuf//:timestamp_proto",
],
)
diff --git a/metropolis/proto/api/debug.proto b/metropolis/proto/api/debug.proto
index eabc766..c8deb73 100644
--- a/metropolis/proto/api/debug.proto
+++ b/metropolis/proto/api/debug.proto
@@ -18,6 +18,8 @@
package metropolis.proto.api;
option go_package = "source.monogon.dev/metropolis/proto/api";
+import "google/protobuf/timestamp.proto";
+
// NodeDebugService exposes debug and testing endpoints that allow introspection into a running Metropolis node.
// It is not authenticated and will be disabled in production. It is currently consumed by metropolis/cli/dbg and
// by tests.
@@ -145,7 +147,7 @@
message LogEntry {
message Leveled {
repeated string lines = 1;
- int64 timestamp = 2;
+ google.protobuf.Timestamp timestamp = 2;
LeveledLogSeverity severity = 3;
string location = 4;
}
@@ -177,4 +179,4 @@
message TraceEvent {
// Currently we do not parse the event data and just return what the kernel outputs, line-by-line.
string raw_line = 1;
-}
\ No newline at end of file
+}