@@ -157,16 +157,18 @@ func TestProcess(t *testing.T) {
157
157
},
158
158
& entry.Entry {
159
159
Attributes : map [string ]any {
160
- "time" : "2029-03-30T08:31:20.545192187Z" ,
161
- "log.iostream" : "stdout" ,
160
+ "time" : "2029-03-30T08:31:20.545192187Z" ,
161
+ "log.iostream" : "stdout" ,
162
+ "log.file.path" : "/var/log/pods/some_kube-scheduler-kind-control-plane_49cc7c1fd3702c40b2686ea7486091d3/kube-scheduler44/1.log" ,
163
+ },
164
+ Body : "INFO: log line here" ,
165
+ Resource : map [string ]any {
162
166
"k8s.pod.name" : "kube-scheduler-kind-control-plane" ,
163
167
"k8s.pod.uid" : "49cc7c1fd3702c40b2686ea7486091d3" ,
164
168
"k8s.container.name" : "kube-scheduler44" ,
165
169
"k8s.container.restart_count" : "1" ,
166
170
"k8s.namespace.name" : "some" ,
167
- "log.file.path" : "/var/log/pods/some_kube-scheduler-kind-control-plane_49cc7c1fd3702c40b2686ea7486091d3/kube-scheduler44/1.log" ,
168
171
},
169
- Body : "INFO: log line here" ,
170
172
Timestamp : time .Date (2029 , time .March , 30 , 8 , 31 , 20 , 545192187 , time .UTC ),
171
173
},
172
174
},
@@ -212,17 +214,19 @@ func TestRecombineProcess(t *testing.T) {
212
214
[]* entry.Entry {
213
215
{
214
216
Attributes : map [string ]any {
215
- "time" : "2024-04-13T07:59:37.505201169-10:00" ,
216
- "log.iostream" : "stdout" ,
217
- "logtag" : "F" ,
217
+ "time" : "2024-04-13T07:59:37.505201169-10:00" ,
218
+ "log.iostream" : "stdout" ,
219
+ "logtag" : "F" ,
220
+ "log.file.path" : "/var/log/pods/some_kube-scheduler-kind-control-plane_49cc7c1fd3702c40b2686ea7486091d3/kube-scheduler44/1.log" ,
221
+ },
222
+ Body : "standalone crio line which is awesome!" ,
223
+ Resource : map [string ]any {
218
224
"k8s.pod.name" : "kube-scheduler-kind-control-plane" ,
219
225
"k8s.pod.uid" : "49cc7c1fd3702c40b2686ea7486091d3" ,
220
226
"k8s.container.name" : "kube-scheduler44" ,
221
227
"k8s.container.restart_count" : "1" ,
222
228
"k8s.namespace.name" : "some" ,
223
- "log.file.path" : "/var/log/pods/some_kube-scheduler-kind-control-plane_49cc7c1fd3702c40b2686ea7486091d3/kube-scheduler44/1.log" ,
224
229
},
225
- Body : "standalone crio line which is awesome!" ,
226
230
Timestamp : time .Date (2024 , time .April , 13 , 7 , 59 , 37 , 505201169 , time .FixedZone ("" , - 10 * 60 * 60 )),
227
231
},
228
232
},
@@ -246,15 +250,17 @@ func TestRecombineProcess(t *testing.T) {
246
250
[]* entry.Entry {
247
251
{
248
252
Attributes : map [string ]any {
249
- "time" : "2024-04-13T07:59:37.505201169Z" ,
250
- "log.iostream" : "stdout" ,
251
- "logtag" : "F" ,
253
+ "time" : "2024-04-13T07:59:37.505201169Z" ,
254
+ "log.iostream" : "stdout" ,
255
+ "logtag" : "F" ,
256
+ "log.file.path" : "/var/log/pods/some_kube-scheduler-kind-control-plane_49cc7c1fd3702c40b2686ea7486091d3/kube-scheduler44/1.log" ,
257
+ },
258
+ Resource : map [string ]any {
252
259
"k8s.pod.name" : "kube-scheduler-kind-control-plane" ,
253
260
"k8s.pod.uid" : "49cc7c1fd3702c40b2686ea7486091d3" ,
254
261
"k8s.container.name" : "kube-scheduler44" ,
255
262
"k8s.container.restart_count" : "1" ,
256
263
"k8s.namespace.name" : "some" ,
257
- "log.file.path" : "/var/log/pods/some_kube-scheduler-kind-control-plane_49cc7c1fd3702c40b2686ea7486091d3/kube-scheduler44/1.log" ,
258
264
},
259
265
Body : "standalone containerd line which is awesome!" ,
260
266
Timestamp : time .Date (2024 , time .April , 13 , 7 , 59 , 37 , 505201169 , time .UTC ),
@@ -286,15 +292,17 @@ func TestRecombineProcess(t *testing.T) {
286
292
[]* entry.Entry {
287
293
{
288
294
Attributes : map [string ]any {
289
- "time" : "2024-04-13T07:59:37.505201169-10:00" ,
290
- "log.iostream" : "stdout" ,
291
- "logtag" : "P" ,
295
+ "time" : "2024-04-13T07:59:37.505201169-10:00" ,
296
+ "log.iostream" : "stdout" ,
297
+ "logtag" : "P" ,
298
+ "log.file.path" : "/var/log/pods/some_kube-scheduler-kind-control-plane_49cc7c1fd3702c40b2686ea7486091d3/kube-scheduler44/1.log" ,
299
+ },
300
+ Resource : map [string ]any {
292
301
"k8s.pod.name" : "kube-scheduler-kind-control-plane" ,
293
302
"k8s.pod.uid" : "49cc7c1fd3702c40b2686ea7486091d3" ,
294
303
"k8s.container.name" : "kube-scheduler44" ,
295
304
"k8s.container.restart_count" : "1" ,
296
305
"k8s.namespace.name" : "some" ,
297
- "log.file.path" : "/var/log/pods/some_kube-scheduler-kind-control-plane_49cc7c1fd3702c40b2686ea7486091d3/kube-scheduler44/1.log" ,
298
306
},
299
307
Body : "standalone crio line which is awesome!" ,
300
308
Timestamp : time .Date (2024 , time .April , 13 , 7 , 59 , 37 , 505201169 , time .FixedZone ("" , - 10 * 60 * 60 )),
@@ -326,17 +334,19 @@ func TestRecombineProcess(t *testing.T) {
326
334
[]* entry.Entry {
327
335
{
328
336
Attributes : map [string ]any {
329
- "time" : "2024-04-13T07:59:37.505201169Z" ,
330
- "log.iostream" : "stdout" ,
331
- "logtag" : "P" ,
337
+ "time" : "2024-04-13T07:59:37.505201169Z" ,
338
+ "log.iostream" : "stdout" ,
339
+ "logtag" : "P" ,
340
+ "log.file.path" : "/var/log/pods/some_kube-scheduler-kind-control-plane_49cc7c1fd3702c40b2686ea7486091d3/kube-scheduler44/1.log" ,
341
+ },
342
+ Body : "standalone containerd line which is awesome!" ,
343
+ Resource : map [string ]any {
332
344
"k8s.pod.name" : "kube-scheduler-kind-control-plane" ,
333
345
"k8s.pod.uid" : "49cc7c1fd3702c40b2686ea7486091d3" ,
334
346
"k8s.container.name" : "kube-scheduler44" ,
335
347
"k8s.container.restart_count" : "1" ,
336
348
"k8s.namespace.name" : "some" ,
337
- "log.file.path" : "/var/log/pods/some_kube-scheduler-kind-control-plane_49cc7c1fd3702c40b2686ea7486091d3/kube-scheduler44/1.log" ,
338
349
},
339
- Body : "standalone containerd line which is awesome!" ,
340
350
Timestamp : time .Date (2024 , time .April , 13 , 7 , 59 , 37 , 505201169 , time .UTC ),
341
351
},
342
352
},
0 commit comments