Hi, I am using VS Code as my IDE, using Python 3.8.6, I have oneagent-sdk 184.108.40.20610127.165413. I installed this using pip that goes against our Nexus repository, it is the only version I can install. I have followed all of the instructions on the Git readme.md but I get an error if I run the verify test - python -c "import oneagent; print(oneagent.initialize())" - the error is:
InitResult(status=InitResult.STATUS_INIT_ERROR, error=SDKError(2952658951, 'onesdk_initialize_2: Could not load agent.'))
I have tried reinstalling, as stated in the readme, upgrading pip, setup tools, and wheel, deleting the installation and reinstalling, downloading the C version (more about this in a second), and everything else in the documentation.
Following the I set an environment variable - DT_PYSDK_CSDK_PATH to the C installation I got 'Agent version: /1.6.1' so it almost seemed I had to set an environment variable for oneagent.
If anyone can help me i would greatly appreciate it. I have been working on this for a few days and I have run out of ideas. Thanks.
Solved! Go to Solution.
Based on your errors, you have the SDK and it works, but you areare not running the oneagent itself. You need to install OneAgent to your host for the SDK to fully work. So you have actually no issue, you just don't have OneAgent installed and running on your host.
The SDK will stay in your case inactive will not send any data to Dynatrace. OneAgent SDK is just a "bridge" between your app code and OneAgent.