Fix consistency of method name
See gh-41460
This commit is contained in:
@@ -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);
|
||||
|
||||
@@ -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();
|
||||
|
||||
}
|
||||
|
||||
@@ -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);
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user