Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add: Zerolog with FluentBit Integration #60

Merged
merged 1 commit into from
Nov 17, 2021
Merged

Add: Zerolog with FluentBit Integration #60

merged 1 commit into from
Nov 17, 2021

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 jasdeepsingh.uppal@gmail.com

@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 <jasdeepsingh.uppal@gmail.com>
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