public void sendCustomEvent() { CustomTrace customTrace = APMS.getInstance().createCustomTrace("CustomEvent1"); if (customTrace != null) { UnityEngine.Debug.Log("customTrace is not null"); } customTrace.start(); // code you want trace CustomTracePropertyTest(customTrace); CustomTraceMeasureTest(customTrace); customTrace.stop(); }