Hi Mark,
I've been actively working on this very problem recently in
conjunction with NewRelics' support engineers. I've made additions to
the rpm_contrib gem which allows Goliath to be auto-detected on app
startup, though so far it will only recognize it as a generic ruby app
(not rack-aware). Unfortunately, this is almost the full extent of
what I've been able to accomplish using the current newrelic agent
gem. Their agent is built to run in a non-event-driven context, so
it's not able to parse together the various fiber callbacks into a
cohesive transaction context.
The best I've been able to accomplish at this point is custom
reporting of various metrics from within specific methods. The problem
with this approach is that changes need to be made directly to the
Goliath codebase... which requires a fork and active merging of new
code in order to be sustained without a lot of maintenance. Also, this
approach does not afford metrics to be reported to the App Overview in
New Relic... instead, you have to create custom views for collected
data points.
For instance, you can instrument a custom metric for response time by
sending the result of "Time.now.to_f - @env[:start_time]) * 1000" used
to generate response time in Gollath::Request#post_process. But, this
is far from optimal in terms of what New Relic reporting and
instrumentation is all about.
If and when more breakthroughs are made, I'll let you know. I'm
contributing back to the rpm_contrib project, so you'll be able to
grab any progress we've made there.
Cheers,
Adam