brianloveswords / messina

Pipe your Bunyan logs to Graylog2 with standard unix pipes
MIT License
13 stars 2 forks source link

Combine incoming request and outgoing response into one GELF message #3

Open jbuck opened 10 years ago

jbuck commented 10 years ago

Instead of sending two GELF messages for a single request, I think it would make more sense to send a single GELF message. Right now a lot of data is duplicated between the two, and it's harder to correlate requests and responses when traffic is heavy.

I'd be happy to change this, but wanted to see what everyone thinks

brianloveswords commented 10 years ago

It should be an option for sure. The reason I separated them originally was so that if there was a fatal error on a request, we could tell the last incoming request before it failed, helping us track down the specific route causing the issue.

jbuck commented 10 years ago

Okay, that makes sense. Is the ability to catch the error using the uncaughtException handler enough to make up for the lack of request data? It'd show the stack trace, which should point you at which route has the fatal error.

brianloveswords commented 10 years ago

haha, yeah, it should!

I'd be down for a PR that makes it send a single message by default, but allows for sending both with an option.