blob: 2bed8f124438d56e4ce51fd39d9ad9601543e950 (
plain) (
blame)
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
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
|
syntax = "proto3";
package yandex.cloud.logging.v1;
import "google/protobuf/struct.proto";
import "google/protobuf/timestamp.proto";
import "yandex/cloud/logging/v1/log_resource.proto";
import "yandex/cloud/validation.proto";
option go_package = "github.com/yandex-cloud/go-genproto/yandex/cloud/logging/v1;logging";
option java_package = "yandex.cloud.api.logging.v1";
message LogEntry {
// Unique entry ID.
//
// Useful for logs deduplication.
string uid = 1;
// Entry resource specification.
//
// May contain information about source service and resource ID.
// Also may be provided by the user.
LogEntryResource resource = 2;
// Timestamp of the entry.
google.protobuf.Timestamp timestamp = 3;
// Entry ingestion time observed by [LogIngestionService].
google.protobuf.Timestamp ingested_at = 4;
// Entry save time.
//
// Entry is ready to be read since this moment.
google.protobuf.Timestamp saved_at = 5;
// Entry severity.
//
// See [LogLevel.Level] for details.
LogLevel.Level level = 6;
// Entry text message.
string message = 7;
// Entry annotation.
google.protobuf.Struct json_payload = 8;
// Entry stream name.
string stream_name = 9 [(length) = "<=63"];
}
message IncomingLogEntry {
// Timestamp of the entry.
google.protobuf.Timestamp timestamp = 1 [(required) = true];
// Entry severity.
//
// See [LogLevel.Level] for details.
LogLevel.Level level = 2;
// Entry text message.
string message = 3 [(bytes) = "<=65536"];
// Entry annotation.
google.protobuf.Struct json_payload = 4 [(bytes) = "<=65536"];
// Entry stream name.
string stream_name = 5 [(length) = "<=63"];
}
message LogEntryDefaults {
reserved 3;
// Default entry severity.
// Will be applied if entry level is unspecified.
//
// See [LogLevel.Level] for details.
LogLevel.Level level = 2;
// Default entry annotation.
// Will be merged with entry annotation.
// Any conflict will be resolved in favor of entry own annotation.
google.protobuf.Struct json_payload = 4 [(bytes) = "<=65536"];
// Entry stream name.
string stream_name = 5 [(length) = "<=63"];
}
message Destination {
// Entry destination.
oneof destination {
option (exactly_one) = true;
// Entry should be written to log group resolved by ID.
string log_group_id = 1 [(pattern) = "([a-zA-Z][-a-zA-Z0-9_.]{0,63})?"];
// Entry should be written to default log group for the folder.
string folder_id = 2 [(pattern) = "([a-zA-Z][-a-zA-Z0-9_.]{0,63})?"];
}
}
message LogLevel {
// Possible log levels for entries.
enum Level {
// Default log level.
//
// Equivalent to not specifying log level at all.
LEVEL_UNSPECIFIED = 0;
// Trace log level.
//
// Possible use case: verbose logging of some business logic.
TRACE = 1;
// Debug log level.
//
// Possible use case: debugging special cases in application logic.
DEBUG = 2;
// Info log level.
//
// Mostly used for information messages.
INFO = 3;
// Warn log level.
//
// May be used to alert about significant events.
WARN = 4;
// Error log level.
//
// May be used to alert about errors in infrastructure, logic, etc.
ERROR = 5;
// Fatal log level.
//
// May be used to alert about unrecoverable failures and events.
FATAL = 6;
}
// Entry level.
//
// See [Level] for possible values.
Level level = 1;
}
|