Splunk AppDynamics

AppDynamics Native Agent Not Loading with Nexe-bundled NodeJS Application

extalt
Observer

AppDynamics Native Agent Not Loading with Nexe-bundled NodeJS Application

Environment
- Node.js version: 20.9.0
- AppDynamics Node.js Agent version: Latest
- Nexe version: Latest
- OS: Windows Server
- Build tool: Nexe with custom build script

Project Structure
We have a Node.js API service that uses:
- Express.js for REST API
- Native modules (specifically AppDynamics agent)
- Various npm packages for business logic
- Built and distributed as a single executable using Nexe

 

Issue
When running our Nexe-bundled application, the AppDynamics agent fails to initialize with the following error:

 

Appdynamics agent cannot be initialized due to Error: Missing required module. \\?\C:\Path\nodejs_api\node_modules\appdynamics-libagent-napi\appd_libagent.node TypeError: Cannot read properties of undefined (reading 'init') at LibagentConnector.init


What We've Tried
1. Including the native module as a resource in Nexe build:
--resource "./node_modules/appdynamics-libagent-napi/appd_libagent.node"

2. Copying the native module to the correct directory structure in distribution:

dist/

- api_node.exe

- node_modules/

-- appdynamics-libagent-napi/

--- appd_libagent.node

 

According to Nexe's documentation, when dealing with native modules (.node files), the module should be placed in the `node_modules` directory relative to the compiled executable's location. This means that while the application is bundled into a single executable, native modules are expected to be loaded from the filesystem at runtime.


Question
How can we properly bundle and load the AppDynamics native agent with a Nexe-compiled Node.js application? Is there a specific configuration or approach needed for native modules, particularly AppDynamics, to work with Nexe?

Any guidance or working examples would be greatly appreciated.

Labels (1)
Tags (3)
0 Karma

iamryan
Community Manager
Community Manager

Hello @extalt,

Thank you for asking your question on the Community. I'm not a product expert. Let's see if the community can jump in and help. 

If you don't get a reply soon, you can each out to AppDynamics Support. https://community.splunk.com/t5/AppDynamics-Knowledge-Base/How-do-I-open-a-case-with-AppDynamics-Sup...

 

0 Karma

extalt
Observer

@iamryan can you look that sir please.

0 Karma
Got questions? Get answers!

Join the Splunk Community Slack to learn, troubleshoot, and make connections with fellow Splunk practitioners in real time!

Meet up IRL or virtually!

Join Splunk User Groups to connect and learn in-person by region or remotely by topic or industry.

Get Updates on the Splunk Community!

Announcing Modern Navigation: A New Era of Splunk User Experience

We are excited to introduce the Modern Navigation feature in the Splunk Platform, available to both cloud and ...

SOC4Kafka - New Kafka Connector Powered by OpenTelemetry

The new SOC4Kafka connector, built on OpenTelemetry, enables the collection of Kafka messages and forwards ...

Rounding off the Splunk Dashboard Contest

What does a contest-winning Splunk dashboard look like? In this case, it isn't in a browser tab at all. It ...