fluent / fluent/fluent-bit

Allow multiple time_format keys

Open
#385 9 comments 22 reactions 0 assignees View on GitHub
enhancement
Dominant language
C
Stars
8.1k
Forks
2k
Avg merge
4d 16h
Merged PRs (30d)
58

Description

It would be worth support multiple. The reasoning is that on a complex system it might be quite complex to force all components on all systems to use one standardized format. Sure - it's the goal. But even if you assume configuration management - you will have to deal with multiple time format's - on metadata side in minimum.

```
Time_Format %b %d %H:%M:%S
Time_Format %Y-%m-%dT%H:%M:%S
```

Additionally, in practice it would be handy to be able to strip some part of the time value, as on example below, I basically can't encode the '+00:00' in strftime format options (IMHO). This can be managed by regexp, but usually on regexp you want only to find the field where time is, not to strip it partially.
```
Time_Format %Y-%m-%dT%H:%M:%S+00:00
```

common pattern of golang apps: (first two lines come from 3rd party libraries the app is using, last line is uber/ZAP log format application is using natively.

```
2019-02-15 16:30:15.549659 I | etcd watcher: sent err {Type:ERROR ResourceVersion:0 Object:etcdserver: mvcc: required revision has been compacted}
2019-02-15 16:30:15.550082 I | watchserver: failed to receive watch request from gRPC stream ("rpc error: code = Canceled desc = context canceled")
2019-02-15T16:30:15.550Z INFO server/audit_handler.go
```

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.