Enable OpenTelemetry in the Node.js Agent

To enable OpenTelemetry in the Node.js Agent, you need Node.js Agent version >= 22.3.0.
Add the following OpenTelemetry configurations in your Node.js application code:
  1. Enable OpenTelemetry in the require statement:
    Note: For Node.js applications, OpenTelemetry AppName and TierName is derived from the AppName and TierName in the Node.js require statement. If your Splunk AppDynamics application/tier is named MY_APP/MY_TIER, your OpenTelemetry application/tier will be MY_APP_OTEL/MY_TIER_OTEL.
    require("appdynamics").profile(
    {
    ...
    openTelemetry: {
    enabled: <True:False> // openTelemetry is enabled or disabled
    }
    ...
    }
    )
  2. Allow additional logging of span data:
    require("appdynamics").profile(
    {
    ...
    openTelemetry: {
    debug: <True:False> // Additional logging, console dump of span data
    ...
    }
    ...
    }
    )
  3. Add the OpenTelemetry Collector URL:
    require("appdynamics").profile(
    {
    ...
    openTelemetry: {
    collector: {
    url: <url> <http://host:port/v1/traces> // The default value is http://localhost:55680/v1/traces
    }
    ...
    }
    )