newrelic / newrelic-ruby-agent

New Relic RPM Ruby Agent
https://docs.newrelic.com/docs/apm/agents/ruby-agent/getting-started/introduction-new-relic-ruby/
Apache License 2.0
1.2k stars 596 forks source link

Active Support notifications for Active Support itself - handle messages related events properly #2615

Open fallwith opened 4 months ago

fallwith commented 4 months ago

Currently our agent is assuming that all Active Support notifications for the Active Support library's own API usage are caching related. For our segment naming and event payload processing, this assumption of caching will not work well for events that are messages related instead of caching related.

From the Rails documentation on notifications, note that Active Support events are grouped into either Caching or Messages. We should either split our Active Support instrumentation into 2 separate groups or make the existing single solution dynamic enough to handle both event groups.

workato-integration[bot] commented 4 months ago

https://new-relic.atlassian.net/browse/NR-264345

fallwith commented 1 week ago

Note that we subscribe to all ActiveSupport notifications, but then only process the caching ones due to this regex: https://github.com/newrelic/newrelic-ruby-agent/blob/4e3175ec784d6f760b33e073b8adb7721b11333b/lib/new_relic/agent/instrumentation/active_support_subscriber.rb#L57