aserafin / grape_logging

Request logging for Grape!
MIT License
147 stars 76 forks source link

GrapeLogging is slow in production when running long time. #62

Closed mrnonz closed 5 years ago

mrnonz commented 5 years ago

I'm using GrapeLogging version 1.8.1 (Latest release at this time) on my production environment. But If I running for long time it's consume many time of my process (Around 80~90% only for GrapeLogging).

I tracking time by New Relic. Segment of process is "GrapeLogging::Middleware::RequestLogger#call"

I'm not sure about these problem came from GrapeLogging but I want to know anyone face these problem like me? How to deal with it?

I'm using jruby:9.1-jre-alpine docker's base image.

aserafin commented 5 years ago

@mrnonz since logging middleware is wrapping application calls it might be the case the NewRelic is not able to recognise what's going inside functions calls. Try adding some custom traces to see what's actually going on in your app.