Search in sources :

Example 1 with ReporterConfiguration

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());
}
Also used : ReporterConfiguration(com.uber.jaeger.Configuration.ReporterConfiguration) Test(org.junit.Test)

Example 2 with ReporterConfiguration

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());
}
Also used : SamplerConfiguration(com.uber.jaeger.Configuration.SamplerConfiguration) ReporterConfiguration(com.uber.jaeger.Configuration.ReporterConfiguration) ReporterConfiguration(com.uber.jaeger.Configuration.ReporterConfiguration) ReporterConfiguration(com.uber.jaeger.Configuration.ReporterConfiguration) Test(org.junit.Test)

Example 3 with ReporterConfiguration

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());
}
Also used : ReporterConfiguration(com.uber.jaeger.Configuration.ReporterConfiguration) Test(org.junit.Test)

Example 4 with ReporterConfiguration

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());
}
Also used : ReporterConfiguration(com.uber.jaeger.Configuration.ReporterConfiguration) Test(org.junit.Test)

Aggregations

ReporterConfiguration (com.uber.jaeger.Configuration.ReporterConfiguration)4 Test (org.junit.Test)4 SamplerConfiguration (com.uber.jaeger.Configuration.SamplerConfiguration)1