php - Set new relic to show data for a specific database used by a custom drupal module -


i have installed new relic on live instance on aws . new relic identifies correctly drupal modules , mysql database. on environment there drupal module connects external db hosted on machine. see data on new relic connection , able drill down messages exchanged within specific module. new relic identifies module , can see data module whole can't see data related database connection. not sure if possible appreciate king of thoughts, ideas or solutions. newrelic doing wonders me major breakthrough project running module legacy piece several files encrypted , have data possible able analyze performance of db , able have scaling strategy future. note external db raima db .

new relic's php agent has no built-in support raima db getting data abouts calls , responses raima db won't simple mysql works out of box.

however, if have access code raima db being called , willing little work, can collect data might helpful using custom parameters, custom metrics , custom dashboards features of new relic.

custom parameters using custom parameters, can record queries made raima db associated slow transactions. collect custom parameter, use new relic api call "newrelic_add_custom_parameter (key, value)" key "raimaquery1" , value query.

https://newrelic.com/docs/instrumentation/collecting-custom-parameters

custom metrics using custom metrics , little of own timing code, can collect time spent in various kinds of queries raima db. might want collect metrics "custom/raima/select", "custom/raima/update" etc or might decide it's helpful add table name metric. suggest using "microtime" current time before making raima db query , again when call returns. record difference in custom metrics. custom metrics have 2 advantages on custom parameters: can collect time metrics , graph them, , metrics collect cover accesses raima db rather slow transactions. custom metrics won't show actual query being made custom parameters will, using both best way data want.

https://newrelic.com/docs/instrumentation/custom-metric-collection

custom dashboards once you've collected custom metrics, need custom dashboards display them. metrics have chosen collect have big impact on how able display them on custom dashboard. example, charting "custom/raima/" in previous example show relative performance of operations across calls, if add table names, charting "custom/raima/select/" show relative performance of select operations across tables. might decide collect metrics per transaction name. if it's important keep number of metrics limited because collecting many metrics can make charts cluttered , unreadable making whole custom dashboard slow use. should plan chart handful of metrics , collect no more 2000 custom metrics names in total across entire application.

https://newrelic.com/docs/instrumentation/creating-custom-dashboards

if don't have access code, can submit feature request raima db support @ https://support.newrelic.com. , there new features around corner keep eye out new possibilities; best answer change.


Comments

Popular posts from this blog

SPSS keyboard combination alters encoding -

Add new record to the table by click on the button in Microsoft Access -

javascript - jQuery .height() return 0 when visible but non-0 when hidden -