public static void init()

in aws-xray-agent/src/main/java/com/amazonaws/xray/agent/runtime/AgentRuntimeLoader.java [45:62]


    public static void init(@Nullable String serviceName) {
        if (serviceName != null) {
            log.warn("Setting the X-Ray service name via JVM arguments is deprecated. Use the agent's " +
                    "configuration file instead.");
            XRayTransactionState.setServiceName(serviceName);
        }

        // Configuration needs to be done before we initialize the listener because its handlers
        // rely on X-Ray configurations upon init.
        boolean enabled = configureXRay();

        if (!enabled) {
            return;
        }

        Listener listener = listenerFactory.generateListener();
        EventBus.addListener(listener);
    }