Added special field for *http.Request to Sentry hook

This commit is contained in:
evalphobia
2015-05-22 21:14:51 +09:00
parent 81e2611f37
commit 5939a6cbf9
3 changed files with 30 additions and 6 deletions
+4 -3
View File
@@ -34,12 +34,13 @@ func main() {
## Special fields
Some logrus fields have a special meaning in this hook,
these are server_name and logger.
these are `server_name`, `logger` and `http_request`.
When logs are sent to sentry these fields are treated differently.
- server_name (also known as hostname) is the name of the server which
- `server_name` (also known as hostname) is the name of the server which
is logging the event (hostname.example.com)
- logger is the part of the application which is logging the event.
- `logger` is the part of the application which is logging the event.
In go this usually means setting it to the name of the package.
- `http_request` is the in-coming request(*http.Request). The detailed request data are sent to Sentry.
## Timeout