scriptTags.setSetting("eumManagementServer", beaconPath.toString()); scriptTags.setSetting("relevancyThreshold", String.valueOf(endUserMonitoringConfig.getRelevancyThreshold())); scriptTags.setSetting("allowListenerInstrumentation", String.valueOf(endUserMonitoringConfig.isListenerInstrumentationAllowed()));
@Test public void eumConfig() throws Exception { EndUserMonitoringConfig config = mock(EndUserMonitoringConfig.class); when(config.isEumEnabled()).thenReturn(true); String url = "/base/url"; when(config.getScriptBaseUrl()).thenReturn(url); String modules = "12a"; when(config.getActiveModules()).thenReturn(modules); when(config.isListenerInstrumentationAllowed()).thenReturn(false); when(config.isAgentMinificationEnabled()).thenReturn(false); when(environment.getEumConfig()).thenReturn(config); AgentConfig agentConfiguration = creator.environmentToConfiguration(environment, 0); AgentEndUserMonitoringConfig eumConfig = agentConfiguration.getEumConfig(); assertThat(eumConfig.isEnabled(), is(true)); assertThat(eumConfig.getActiveModules(), is(modules)); assertThat(eumConfig.getScriptBaseUrl(), is(url)); assertThat(eumConfig.isListenerInstrumentationAllowed(), is(false)); assertThat(eumConfig.isAgentMinificationEnabled(), is(false)); }