dynatrace-oss / OneAgent-SDK-Python-AutoInstrumentation

autodynatrace, a python library that implements automatic instrumentation using the OneAgent SDK for Python
Other
62 stars 28 forks source link

WARNING autodynatrace - init: Could not initialize the OneAgent SDK, AgentState: 1 #104

Closed yasin-amadmia-mck closed 1 month ago

yasin-amadmia-mck commented 1 month ago

AutoDynatrace is failing to start and not instrumenting. This is a python python:3.10.14-bookworm application running on ECS Fargate Service/Task

Entrypoint for Dockerfile has been set as

ENTRYPOINT [ "/opt/dynatrace/oneagent/dynatrace-agent64.sh" ]

And also we have added an environment variable

AUTOWRAPT_BOOTSTRAP=autodynatrace

To Install OneAgent, followed this doc with ARG DT_ONEAGENT_OPTIONS="flavor=default&include=sdk"

2024-07-08 12:21:31.483 UTC [7f6d89464b80] DEBUG   [py_sdk] initialize: ref count = 0
2024-07-08 12:21:31.483 UTC [7f6d89464b80] INFO    [py_sdk] Initializing SDK on Python=3.10.14 (main, Jul  3 2024, 00:10:44) [GCC 12.2.0] with options=['loglevelsdk=finest', 'loglevel=finest'], libname=None.
2024-07-08 12:21:31.782 UTC [7f6d89464b80] INFO    [py_sdk] Loading native SDK library "/usr/local/lib/python3.10/site-packages/oneagent/_impl/native/libonesdk_shared.so".
2024-07-08 12:21:31.782 UTC [7f6d89464b80] INFO    [py_sdk] Native SDK library "/usr/local/lib/python3.10/site-packages/oneagent/_impl/native/libonesdk_shared.so" version 1.7.1 loaded.
2024-07-08 12:21:31.783 UTC [894634ed] info    [onesdk] Initializing Dynatrace OneAgent SDK for C/C++ ...
2024-07-08 12:21:31.783 UTC [894634ed] info    [onesdk] SDK stub version 1.7.1.1, build date 2022.12.15 10:27:48.
2024-07-08 12:21:31.783 UTC [894634ed] fine    [onesdk] Preparing arguments...
2024-07-08 12:21:31.783 UTC [894634ed] config  [onesdk]   Options:
2024-07-08 12:21:31.783 UTC [894634ed] config  [onesdk]     Agent active:  true
2024-07-08 12:21:31.783 UTC [894634ed] config  [onesdk]     Agent module:  '/opt/dynatrace/oneagent/agent/lib64/liboneagentloader.so'
2024-07-08 12:21:31.783 UTC [894634ed] config  [onesdk]     SDK log level: finest
2024-07-08 12:21:31.783 UTC [894634ed] config  [onesdk]   Additional options:
2024-07-08 12:21:31.783 UTC [894634ed] config  [onesdk]     loglevel=finest
2024-07-08 12:21:31.783 UTC [894634ed] config  [onesdk]     ONESDK_INTERNAL_CA627667445C40F0_INIT_FLAGS=0
2024-07-08 12:21:31.783 UTC [894634ed] fine    [onesdk] Loading agent module...
2024-07-08 12:21:31.797 UTC [894634ed] fine    [onesdk] Initializing agent module...
2024-07-08 12:21:37.301 UTC [894634ed] info    [onesdk] Loaded agent module version: 1.293.153.20240702-150912
2024-07-08 12:21:37.301 UTC [894634ed] info    [onesdk] Dynatrace OneAgent SDK for C/C++ agent module loaded successfully.
2024-07-08 12:21:37.301 UTC [894634ed] fine    [onesdk] Initializing agent...
2024-07-08 12:21:37.301 UTC [894634ed] info    [onesdk] Loaded extension API metrics.
2024-07-08 12:21:43.086 UTC [894634ed] info    [onesdk] Dynatrace OneAgent SDK for C/C++ initialized successfully.
2024-07-08 12:21:43.086 UTC [894634ed] info    [onesdk] Loaded extension API techtype.
2024-07-08 12:21:43.086 UTC [7f6d89464b80] DEBUG   [py_sdk] initialize successful, adding tech types...
2024-07-08 12:21:43.086 UTC [7f6d89464b80] DEBUG   [py_sdk] tech type reporting complete
InitResult=InitResult(status=InitResult.STATUS_INITIALIZED, error=None)
Agent state: 1
Agent found: True
Agent is compatible: True
Agent version: 1.293.153.20240702-150912/1.7.1