-
Notifications
You must be signed in to change notification settings - Fork 13
/
Copy pathlog.proto
47 lines (40 loc) · 1.78 KB
/
log.proto
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
// Copyright(c) 2017-2018 Zededa, Inc.
// All rights reserved.
syntax = "proto3";
import "google/protobuf/timestamp.proto";
package org.lfedge.eve.logs;
option go_package = "github.com/lf-edge/eve-api/go/logs";
option java_package = "org.lfedge.eve.logs";
message LogEntry {
string severity = 1; // e.g., INFO, DEBUG, ERROR etc.
string source = 2; // Source of the msg, zedmanager etc.
string iid = 3; // instance ID of the source (e.g., PID)
string content = 4; // actual log message
uint64 msgid = 5; // monotonically increasing number (detect drops)
map <string, string> tags = 6; // additional meta info <key,value>
google.protobuf.Timestamp timestamp = 7; // timestamp of the msg
string filename = 8;
string function = 9;
}
// This is the request payload for POST /api/v1/edgeDevice/logs
// ZInfoMsg carries device logs to the controller.
// The messages need to be retransmitted until they make it to the controller.
// The message is assumed to be protected by a TLS session bound to the
// device certificate.
message LogBundle {
string devID = 1; // Device UUID
string image = 2; // SW image the log got emitted from
repeated LogEntry log = 3; // Log entries
google.protobuf.Timestamp timestamp = 4; // upload timestamp
string eveVersion = 5; // EVE software version
}
// This is the request payload for POST /api/v1/edgeDevice/apps/instances/id/<app-instance-uuid>/logs
message AppInstanceLogBundle {
repeated LogEntry log = 1; // Log entries
google.protobuf.Timestamp timestamp = 2; // upload timestamp
}
// This is the reply payload for device log processing from controller
message ServerMetrics {
float cpu_percentage = 1; // controller CPU usage in percentage
uint32 log_process_delay_msec = 2; // log messages processing delay in msec
}