How to create APM agent for node.js application without making changes in application code

All components of Elastic are 7.6.2
Installed from Docker images and deployed on Kubernetes.

I'm able to send data from APM agent associated with a nodejs application by making the following code changes and APM dashboard is showing the transactions properly.

var apm = require('elastic-apm-node').start({
  serviceName: 'chd',	
  serverUrl: 'http://common-elk-apm-server.default.svc.cluster.local:8200',	
});

I would like to know, is there a way I can setup an agent for nodejs application without making changes in application code. Is there a way I can configuration this in kubernetes yml file or something ?

This topic was automatically closed 20 days after the last reply. New replies are no longer allowed.