You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When the agent instruments a customer's app, it records a log message about what is being instrumented, for example: Installing Fiber instrumentation. We often hard-code this log in instrumentation files. However, the method log_and_instrument, which is called whenever preprend or chain is used, also logs instrumentation and records a supportability metric. This results in cases where instrumentation notices are logged twice, or potentially not at all, and supportability metrics are not recorded.
deflog_and_instrument(method,instrumenting_module,supportability_name)supportability_name ||= extract_supportability_name(instrumenting_module)NewRelic::Agent.logger.info("Installing New Relic supported #{supportability_name} instrumentation using #{method}")NewRelic::Agent.record_metric("Supportability/Instrumentation/#{supportability_name}/#{method}",0.0)yieldend
We should review each instrumentation file to:
Remove log messages if preprend or chain is being used
Add a log statement if preprend or chain is not being used
Record a supportability metric if preprend or chain is not being used
Update Thor instrumentation to remove the log statement and add a comment about log_and_instrument so we can remember this
default_source.rb can be used to quickly determine if prepend or chain is avaliable or not.
When the agent instruments a customer's app, it records a log message about what is being instrumented, for example:
Installing Fiber instrumentation
. We often hard-code this log in instrumentation files. However, the methodlog_and_instrument
, which is called whenever preprend or chain is used, also logs instrumentation and records a supportability metric. This results in cases where instrumentation notices are logged twice, or potentially not at all, and supportability metrics are not recorded.We should review each instrumentation file to:
default_source.rb
can be used to quickly determine if prepend or chain is avaliable or not.dupe: #2516
The text was updated successfully, but these errors were encountered: