Skip to content

Commit

Permalink
Rename OpenTelemetryConfig to OpenTelemetryExporterConfig
Browse files Browse the repository at this point in the history
  • Loading branch information
vinay-kosaraju authored and electrum committed May 21, 2024
1 parent 7081d92 commit 1f4e25b
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
import jakarta.validation.constraints.NotNull;
import jakarta.validation.constraints.Pattern;

public class OpenTelemetryConfig
public class OpenTelemetryExporterConfig
{
private String endpoint = "http://localhost:4317";

Expand All @@ -16,7 +16,7 @@ public String getEndpoint()
}

@Config("tracing.exporter.endpoint")
public OpenTelemetryConfig setEndpoint(String endpoint)
public OpenTelemetryExporterConfig setEndpoint(String endpoint)
{
this.endpoint = endpoint;
return this;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,11 @@ public class OpenTelemetryExporterModule
@Override
public void configure(Binder binder)
{
configBinder(binder).bindConfig(OpenTelemetryConfig.class);
configBinder(binder).bindConfig(OpenTelemetryExporterConfig.class);
}

@ProvidesIntoSet
public static SpanProcessor createExporter(OpenTelemetryConfig config)
public static SpanProcessor createExporter(OpenTelemetryExporterConfig config)
{
SpanExporter exporter = OtlpGrpcSpanExporter.builder()
.setEndpoint(config.getEndpoint())
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,12 @@
import static io.airlift.configuration.testing.ConfigAssertions.assertRecordedDefaults;
import static io.airlift.configuration.testing.ConfigAssertions.recordDefaults;

public class TestOpenTelemetryConfig
public class TestOpenTelemetryExporterConfig
{
@Test
public void testDefaults()
{
assertRecordedDefaults(recordDefaults(OpenTelemetryConfig.class)
assertRecordedDefaults(recordDefaults(OpenTelemetryExporterConfig.class)
.setEndpoint("http://localhost:4317"));
}

Expand All @@ -25,7 +25,7 @@ public void testExplicitPropertyMappings()
.put("tracing.exporter.endpoint", "http://example.com:1234")
.buildOrThrow();

OpenTelemetryConfig expected = new OpenTelemetryConfig()
OpenTelemetryExporterConfig expected = new OpenTelemetryExporterConfig()
.setEndpoint("http://example.com:1234");

assertFullMapping(properties, expected);
Expand Down

0 comments on commit 1f4e25b

Please sign in to comment.