Skip to content

Add: Zerolog with FluentBit Integration#60

Merged
guacamole merged 1 commit intomasterfrom
logger
Nov 17, 2021
Merged

Add: Zerolog with FluentBit Integration#60
guacamole merged 1 commit intomasterfrom
logger

Conversation

@jay-dee7
Copy link
Member

This PR adds support for using a remote log aggregator using FluentBit.
FluentBit configuration is out of scope for this repo, but we do have a
sample configuration for it. We're currently using JSON formatted logs
with the following template:

{"time":"${time_rfc3339}","request_id":"${request_id}","remote_ip":"${remote_ip}","host":"${host}","method":"${method}","uri":"${uri}","user_agent":"${user_agent}","status":"${status}","error":"${error}","latency":"${latency}","latency_human":"${latency_human}","bytes_in":"${bytes_in}","bytes_out":"${bytes_out}"}

Fields Included for logs (For all HTTP requests):

  • Timestamp
  • RequestID
  • RemoteIP
  • Host
  • Method
  • URI
  • User Agent
  • Status
  • Error
  • Latency
  • Human Latency
  • Bytes In
  • Bytes Out

If we need, we can add more fields in the future and also connect with a
different log provider mechanism.

Signed-off-by: jay-dee7 [email protected]

@jay-dee7 jay-dee7 requested a review from guacamole November 17, 2021 15:40
@jay-dee7 jay-dee7 self-assigned this Nov 17, 2021
This PR adds support for using a remote log aggregator using FluentBit.
FluentBit configuration is out of scope for this repo, but we do have a
sample configuration for it. We're currently using JSON formatted logs
with the following template:

```json
{"time":"${time_rfc3339}","request_id":"${request_id}","remote_ip":"${remote_ip}", "host":"${host}","method":"${method}","uri":"${uri}","user_agent":"${user_agent}",
"status":"${status}","error":"${error}","latency":"${latency}","latency_human":"${latency_human}","bytes_in":"${bytes_in}","bytes_out":"${bytes_out}"}
```

Fields Included for logs (For all HTTP requests):
- Timestamp
- RequestID
- RemoteIP
- Host
- Method
- URI
- User Agent
- Status
- Error
- Latency
- Human Latency
- Bytes In
- Bytes Out

If we need, we can add more fields in the future and also connect with a
different log provider mechanism.

Signed-off-by: jay-dee7 <[email protected]>
Copy link
Member

@guacamole guacamole left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM 🥇

@guacamole guacamole merged commit a4b540f into master Nov 17, 2021
@guacamole guacamole deleted the logger branch November 17, 2021 16:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

2 participants