-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathpayload.proto
More file actions
85 lines (77 loc) · 2.4 KB
/
payload.proto
File metadata and controls
85 lines (77 loc) · 2.4 KB
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
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
// api - bitdrift's client/server API definitions
// Copyright Bitdrift, Inc. All rights reserved.
//
// Use of this source code and APIs are governed by a source available license that can be found in
// the LICENSE file or at:
// https://polyformproject.org/wp-content/uploads/2020/06/PolyForm-Shield-1.0.0.txt
syntax = "proto3";
package bitdrift_public.protobuf.logging.v1;
message BinaryData {
// Optional type identifier for binary data.
optional string type = 1;
bytes payload = 2;
}
// One-of for a canonical string data field
message Data {
oneof data_type {
string string_data = 1;
BinaryData binary_data = 2;
uint64 int_data = 3;
double double_data = 4;
int64 sint_data = 5;
bool bool_data = 6;
}
}
enum LogType {
// Normal logs, from application code.
NORMAL = 0;
// Session replay logs.
REPLAY = 1;
// Application lifecycle logs.
LIFECYCLE = 2;
// Resource monitoring logs, such as memory, CPU, and battery consumption.
RESOURCE = 3;
// Internal SDK logs.
INTERNAL_SDK = 4;
// View lifecycle.
VIEW = 5;
// Device state.
DEVICE = 6;
// UX interaction.
UX = 7;
// Span start/end pairs.
SPAN = 8;
}
message Log {
message Field {
string key = 1;
Data value = 2;
}
message CompressedContents {
Data message = 1;
repeated Field fields = 2;
}
// The timestamp in unix microseconds indicating when this log was recorded.
// NOTE: This was intentionally chosen to be the first field for trivial extraction without
// parsing the full message.
uint64 timestamp_unix_micro = 1;
// The log level.
uint32 log_level = 2;
// The message associated with the log.
Data message = 3;
// An optional list of high cardinality fields.
repeated Field fields = 4;
// The ID of the session associated with this log.
string session_id = 5;
// The list of action IDs that were triggered by this log line.
repeated string action_ids = 6;
// The type of log.
LogType log_type = 7;
// The list of stream IDs that were associated with this streaming log.
// This should only be set when the log has been streamed.
repeated string stream_ids = 8;
// If set, this is a zlib compressed `CompressedContents` message containing the log's
// message and fields. In this case the message and fields above will be empty and should be
// synthetically reconstructed by decompressing this field.
bytes compressed_contents = 9;
}