use of com.uber.jaeger.Configuration.ReporterConfiguration in project jaeger-client-java by jaegertracing.
the class ConfigurationTest method testReporterConfigurationInvalidLogSpans.
@Test
public void testReporterConfigurationInvalidLogSpans() {
System.setProperty(Configuration.JAEGER_REPORTER_LOG_SPANS, "X");
ReporterConfiguration reporterConfig = ReporterConfiguration.fromEnv();
assertFalse(reporterConfig.getLogSpans());
}
use of com.uber.jaeger.Configuration.ReporterConfiguration in project jaeger-client-java by jaegertracing.
the class ConfigurationTest method testNoNullPointerOnNullSender.
@Test
public void testNoNullPointerOnNullSender() {
Configuration.ReporterConfiguration reporterConfiguration = new Configuration.ReporterConfiguration(null, null, null, null);
assertNull(reporterConfiguration.getAgentHost());
assertNull(reporterConfiguration.getAgentPort());
reporterConfiguration = new Configuration.ReporterConfiguration(null);
assertNull(reporterConfiguration.getAgentHost());
assertNull(reporterConfiguration.getAgentPort());
reporterConfiguration = new Configuration.ReporterConfiguration();
assertNull(reporterConfiguration.getAgentHost());
assertNull(reporterConfiguration.getAgentPort());
}
use of com.uber.jaeger.Configuration.ReporterConfiguration in project jaeger-client-java by jaegertracing.
the class ConfigurationTest method testReporterConfiguration.
@Test
public void testReporterConfiguration() {
System.setProperty(Configuration.JAEGER_REPORTER_LOG_SPANS, "true");
System.setProperty(Configuration.JAEGER_AGENT_HOST, "MyHost");
System.setProperty(Configuration.JAEGER_AGENT_PORT, "1234");
System.setProperty(Configuration.JAEGER_REPORTER_FLUSH_INTERVAL, "500");
System.setProperty(Configuration.JAEGER_REPORTER_MAX_QUEUE_SIZE, "1000");
ReporterConfiguration reporterConfig = ReporterConfiguration.fromEnv();
assertTrue(reporterConfig.getLogSpans());
assertEquals("MyHost", reporterConfig.getAgentHost());
assertEquals(1234, reporterConfig.getAgentPort().intValue());
assertEquals(500, reporterConfig.getFlushIntervalMs().intValue());
assertEquals(1000, reporterConfig.getMaxQueueSize().intValue());
}
use of com.uber.jaeger.Configuration.ReporterConfiguration in project jaeger-client-java by jaegertracing.
the class ConfigurationTest method testReporterConfigurationInvalidFlushInterval.
@Test
public void testReporterConfigurationInvalidFlushInterval() {
System.setProperty(Configuration.JAEGER_REPORTER_FLUSH_INTERVAL, "X");
ReporterConfiguration reporterConfig = ReporterConfiguration.fromEnv();
assertNull(reporterConfig.getFlushIntervalMs());
}
Aggregations