Fix consistency of method name

See gh-41460
This commit is contained in:
Moritz Halbritter
2024-08-08 15:22:23 +02:00
parent d2163aafd9
commit 0473ac1292
3 changed files with 4 additions and 4 deletions

View File

@@ -59,7 +59,7 @@ final class OtlpLoggingConfigurations {
}
@Override
public String getEndpoint() {
public String getUrl() {
return this.properties.getEndpoint();
}
@@ -77,7 +77,7 @@ final class OtlpLoggingConfigurations {
OtlpHttpLogRecordExporter otlpHttpLogRecordExporter(OtlpLoggingProperties properties,
OtlpLoggingConnectionDetails connectionDetails) {
OtlpHttpLogRecordExporterBuilder builder = OtlpHttpLogRecordExporter.builder()
.setEndpoint(connectionDetails.getEndpoint())
.setEndpoint(connectionDetails.getUrl())
.setCompression(properties.getCompression().name().toLowerCase(Locale.US))
.setTimeout(properties.getTimeout());
properties.getHeaders().forEach(builder::addHeader);

View File

@@ -30,6 +30,6 @@ public interface OtlpLoggingConnectionDetails extends ConnectionDetails {
* Address to where logs will be published.
* @return the address to where logs will be published
*/
String getEndpoint();
String getUrl();
}

View File

@@ -57,7 +57,7 @@ class OtlpLoggingAutoConfigurationTests {
.run((context) -> {
assertThat(context).hasSingleBean(OtlpLoggingConnectionDetails.class);
OtlpLoggingConnectionDetails connectionDetails = context.getBean(OtlpLoggingConnectionDetails.class);
assertThat(connectionDetails.getEndpoint()).isEqualTo("http://localhost:4318/v1/logs");
assertThat(connectionDetails.getUrl()).isEqualTo("http://localhost:4318/v1/logs");
assertThat(context).hasSingleBean(OtlpHttpLogRecordExporter.class)
.hasSingleBean(LogRecordExporter.class);
});