MacOS Support
azizabah opened this issue ยท 14 comments
It looks like a lot of the platform logic seems to exclude MacOS inside the setup.py. This causes issues when trying to install on a MacOS laptop.
For example, when I run
>>> from distutils.util import get_platform
>>> platform = get_platform()
>>> platform
'macosx-10.12-x86_64'
The lack of a "linux" starter throws off the logic.
Can you update your logic to allow for usage on Macs? Thanks
This is intentional. macOS is not supported by the SDK. In fact, Dynatrace OneAgent itself is not supported there. If you read the error message you should have gotten, it will point you to https://github.com/Dynatrace/OneAgent-SDK-for-Python#requirements. There it says
Only the official CPython [...] is supported and only on Linux [...] and Windows [...].
Even if you remove the check, you won't be able to build the SDK, because we do not support the underlying OneAgent SDK for C/C++ on macOS either, so you won't be able to find a working libonesdk_shared.so
for macOS.
Seems not very practical given the abundance of Macs in the development world.
Would a no-op Python SDK that just does nothing (but allows an instrumented application to run) satisfy your needs?
Also, I think using docker or something similar to develop for the OneAgent SDK on a Mac should work.
Yes I think that would be just fine. I have no expectation of actually being able to get data from a local running instance into Dynatrace but I would like to be able to pip install the library and perform all the wiring locally and then run it inside Docker in a cloud foundry instance that has been instrumented with Dynatrace and have that send the data over correctly.
Does that sound ok?
That sounds totally reasonable and might indeed be doable with just installer/setup.py changes. We will consider implementing this enhancement.
@Oberon00 - Just following up to see if this looks like something that'll be moving forward and if so what kind of a high level timeline we're looking at. We're looking at moving some Python Flask API's into Production in the near future (~1 month) and would like to be able to monitor them via Dynatrace.
Hi! Unfortunately I cannot give you a timeline. We have added that issue to our backlog but have not scheduled it yet.
The following is completely unsupported, but: In the meantime, you could try following the instructions of the error message and provide the path to the Linux shared object in the environment variable. That way, you should be able to install the package and "instrument" your code. Of course that shared object will not really work and you will get an error return code when initializing, but the SDK should fall back to the (already existing but only lightly tested, as it is only intended as a last-resort emergency option) no-op implementation.
Totally fair. I will give that a shot. Thanks for the suggestion.
@Oberon00 - Looks like that worked and it defaulted back to the no-op implementation. Thanks!
Actually we are pretty confident that the next release will contain this change: It will automatically fall back to the no-op implementation if no C SDK is provided during installation (and pip is not able to find a matching wheel).
We just released version 1.3.0 of the Python SDK, which contains the fix for the installation on OSX.
@z1c0 - This looks to be working now. Thanks!
Also it looks like an odd version number got pushed to PyPi https://pypi.org/project/oneagent-sdk/1.3.0.20191113.161138/ instead of 1.3.0.