10 Oct 2024 12:06 PM
I'm adding OneAgent to a new iOS app. I'm trying to add custom actions but DTXAction.enter is nearly always returning nil.
I found this post with a similar issue https://community.dynatrace.com/t5/Real-User-Monitoring/OneAgent-SDK-for-iOS-DTXAction-enter-returns... that seemed to be caused by the app not having access to the beacon URL. I don't believe that is the cause.
As far as I can see the privacy options are set up to be permissive, and I can see the sessions in the session browser, albeit mostly without my custom action.
The bit that most confuses me is a few times I've seen the action isn't nil, and I do see a few sessions with the events.
I tried getting the result of Dynatrace.lastErrorMsg() but it is always nil. Is there any other way of finding out what, if any, error is happening to cause this?
Thanks,
Oliver
Solved! Go to Solution.
10 Oct 2024 01:11 PM
Can you turn on logging and share the app logs? See https://docs.dynatrace.com/docs/shortlink/ios-logging
10 Oct 2024 02:27 PM
Thanks for your reply.
After going through a process of enabled the logs, changing the log level, adding my own logging, and getting inconsistent results in the process, I arrived at it seemingly working correctly. I'm 90% I didn't actually change anything meaningful.
One thing I will share is I did get a log export for a time when it failed, and there did not seem to be anything from Dynatrace in it.
In the log below, there was a bunch of output from DTXAutoInstrument. Then one log from me right before attempting to create DTXAction followed immediately my log when the result was null. Then a bunch of output from DTXSwapper.
14 Oct 2024 06:44 AM
It's hard to diagnose the issue with just a fraction of the log. If you still have an issue please raise a support ticket and provide the full log when the issue happens.