How Nutrisense stopped dropping logs and got its GraphQL traffic back in view
Nutrisense combines continuous glucose monitoring with expert support, turning personal health data into daily insight for thousands of members. Its Rails backend serves a mobile app through a single GraphQL endpoint that standard logging could not see inside, and Datadog costs had pushed the team into dropping logs. They fixed both.
- Industry
- Health and wellness
- Products used
- Logs, metrics, dashboards, alerts
- Switched from
- Datadog
Flying blind at the busiest endpoint
Nutrisense runs Ruby on Rails on Heroku with Sidekiq, and leans heavily on GraphQL. Because every GraphQL request hits the same /graphql path, standard Rails logging showed the team one endpoint taking all the traffic and almost nothing about what was happening inside it.
At the same time, Datadog was getting expensive. To hold costs down the team cut log retention and dropped logs altogether, which made investigations harder and alerting less trustworthy. They were paying more and seeing less.
Building a logger worth keeping
The fix started in their own code. The team built a custom logger that tags every log with the GraphQL operation name, the authenticated user and the request ID, using ActiveSupport::CurrentAttributes to carry that context through each request. They added lograge to strip the noise and emit structured JSON, then swapped the default Rails and Sidekiq loggers for the new one.
Getting that into Better Stack on Heroku meant adding a log drain. Logs started arriving with all their context intact, and the team could finally filter by operation name, request ID or user.
Dashboards built for GraphQL
The team turned on dyno runtime metrics for app performance, then built charts for what they actually care about: operation durations grouped by name. When the chart builder was not specific enough, they switched to SQL mode and wrote exactly what they wanted, including the five slowest operations.
Alerts came last. A latency spike or anything behaving out of the ordinary now reaches the right person by call, text, email or push.
What changed
The stack has since moved partly to App Engine and GoodJob, and the logging setup travelled with it. Every GraphQL request carries its context, dashboards show real-time performance, alerts fire on things that matter, and nothing gets dropped to keep the bill down.
“It took a little effort to get things dialed in, but now that we're fully onboarded, Better Stack gives us exactly what we need, without the painful price tag.”
Logs, metrics, dashboards and alerts in one platform, with nothing dropped to save money.