Skip to content

Commit d97bf0f

Browse files
committed
Adjust properites + metadata
1 parent 2d38b45 commit d97bf0f

File tree

20 files changed

+414
-47
lines changed

20 files changed

+414
-47
lines changed
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,23 @@
11
package no.entur.logging.cloud.azure.logbook.spring;
22

33
import no.entur.logging.cloud.spring.logbook.LogbookLoggingAutoConfiguration;
4+
import no.entur.logging.cloud.spring.logbook.LogbookLoggingCloudProperties;
45
import org.springframework.boot.autoconfigure.AutoConfigureBefore;
6+
import org.springframework.context.annotation.Bean;
57
import org.springframework.context.annotation.Configuration;
68
import org.springframework.context.annotation.PropertySource;
79

810
@Configuration
911
@AutoConfigureBefore(LogbookLoggingAutoConfiguration.class)
10-
@PropertySource(value = "classpath:logbook.azure.properties", ignoreResourceNotFound = false)
1112
public class LogbookAzureAutoConfiguration {
1213

14+
@Bean
15+
public LogbookLoggingCloudProperties logbookCloudConfiguration() {
16+
LogbookLoggingCloudProperties c = new LogbookLoggingCloudProperties();
17+
// subtract a few kb for headers and other wrapping
18+
c.setMaxBodySize(16384 - 2 * 1024);
19+
c.setMaxSize(16384);
20+
return c;
21+
}
22+
1323
}

azure/logbook-spring-boot-autoconfigure-azure/src/main/resources/logbook.azure.properties

Lines changed: 0 additions & 2 deletions
This file was deleted.

azure/request-response-spring-boot-starter-azure-grpc-ecosystem/src/main/java/no/entur/logging/cloud/azure/spring/grpc/ecosystem/RequestResponseAzureGrpcEcosystemAutoConfiguration.java

Lines changed: 16 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,24 @@
22

33
import no.entur.logging.cloud.spring.grpc.ecosystem.RequestResponseGrpcEcosystemAutoConfiguration;
44
import no.entur.logging.cloud.spring.rr.grpc.AbstractRequestResponseGrpcSinkAutoConfiguration;
5+
import no.entur.logging.cloud.spring.rr.grpc.GrpcLoggingCloudProperties;
6+
import no.entur.logging.cloud.spring.rr.grpc.RequestResponseGrpcAutoConfiguration;
57
import org.springframework.boot.autoconfigure.AutoConfigureBefore;
8+
import org.springframework.context.annotation.Bean;
69
import org.springframework.context.annotation.Configuration;
710
import org.springframework.context.annotation.PropertySource;
811

912
@Configuration
10-
@PropertySource(value = "classpath:request-response.azure.properties", ignoreResourceNotFound = false)
11-
@AutoConfigureBefore(RequestResponseGrpcEcosystemAutoConfiguration.class)
12-
public class RequestResponseAzureGrpcEcosystemAutoConfiguration extends AbstractRequestResponseGrpcSinkAutoConfiguration {
13-
}
13+
@AutoConfigureBefore(RequestResponseGrpcAutoConfiguration.class)
14+
public class RequestResponseAzureGrpcEcosystemAutoConfiguration {
15+
16+
@Bean
17+
public GrpcLoggingCloudProperties grpcLoggingCloudProperties() {
18+
GrpcLoggingCloudProperties c = new GrpcLoggingCloudProperties();
19+
// subtract a few kb for headers and other wrapping
20+
c.setMaxBodySize(16384 - 2 * 1024);
21+
c.setMaxSize(16384);
22+
return c;
23+
}
24+
25+
}

azure/request-response-spring-boot-starter-azure-grpc-ecosystem/src/main/resources/request-response.azure.properties

Lines changed: 0 additions & 2 deletions
This file was deleted.

azure/request-response-spring-boot-starter-azure-grpc-lognet/src/main/java/no/entur/logging/cloud/azure/spring/grpc/lognet/RequestResponseAzureGrpcLognetAutoConfiguration.java

Lines changed: 14 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,24 @@
22

33
import no.entur.logging.cloud.spring.grpc.lognet.RequestResponseGrpcLognetAutoConfiguration;
44
import no.entur.logging.cloud.spring.rr.grpc.AbstractRequestResponseGrpcSinkAutoConfiguration;
5+
import no.entur.logging.cloud.spring.rr.grpc.GrpcLoggingCloudProperties;
6+
import no.entur.logging.cloud.spring.rr.grpc.RequestResponseGrpcAutoConfiguration;
57
import org.springframework.boot.autoconfigure.AutoConfigureBefore;
8+
import org.springframework.context.annotation.Bean;
69
import org.springframework.context.annotation.Configuration;
710
import org.springframework.context.annotation.PropertySource;
811

912
@Configuration
10-
@PropertySource(value = "classpath:request-response.azure.properties", ignoreResourceNotFound = false)
11-
@AutoConfigureBefore(RequestResponseGrpcLognetAutoConfiguration.class)
12-
public class RequestResponseAzureGrpcLognetAutoConfiguration extends AbstractRequestResponseGrpcSinkAutoConfiguration {
13+
@AutoConfigureBefore(RequestResponseGrpcAutoConfiguration.class)
14+
public class RequestResponseAzureGrpcLognetAutoConfiguration {
15+
16+
@Bean
17+
public GrpcLoggingCloudProperties grpcLoggingCloudProperties() {
18+
GrpcLoggingCloudProperties c = new GrpcLoggingCloudProperties();
19+
// subtract a few kb for headers and other wrapping
20+
c.setMaxBodySize(16384 - 2 * 1024);
21+
c.setMaxSize(16384);
22+
return c;
23+
}
1324

1425
}

azure/request-response-spring-boot-starter-azure-grpc-lognet/src/main/resources/request-response.azure.properties

Lines changed: 0 additions & 2 deletions
This file was deleted.
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,21 @@
11
package no.entur.logging.cloud.spring.logbook.gcp;
22

33
import no.entur.logging.cloud.spring.logbook.LogbookLoggingAutoConfiguration;
4+
import no.entur.logging.cloud.spring.logbook.LogbookLoggingCloudProperties;
45
import org.springframework.boot.autoconfigure.AutoConfigureBefore;
6+
import org.springframework.context.annotation.Bean;
57
import org.springframework.context.annotation.Configuration;
6-
import org.springframework.context.annotation.PropertySource;
78

89
@Configuration
910
@AutoConfigureBefore(LogbookLoggingAutoConfiguration.class)
10-
@PropertySource(value = "classpath:logbook.gcp.properties", ignoreResourceNotFound = false)
1111
public class LogbookGcpAutoConfiguration {
1212

13+
@Bean
14+
public LogbookLoggingCloudProperties logbookCloudConfiguration() {
15+
LogbookLoggingCloudProperties c = new LogbookLoggingCloudProperties();
16+
// subtract a few kb for headers and other wrapping
17+
c.setMaxBodySize(131072 - 2 * 1024);
18+
c.setMaxSize(131072);
19+
return c;
20+
}
1321
}

gcp/logbook-spring-boot-autoconfigure-gcp/src/main/resources/logbook.gcp.properties

Lines changed: 0 additions & 2 deletions
This file was deleted.

gcp/request-response-spring-boot-starter-gcp-grpc-ecosystem/src/main/java/no/entur/logging/cloud/gcp/spring/gcp/grpc/ecosystem/RequestResponseGcpGrpcEcosystemAutoConfiguration.java

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,23 @@
22

33
import no.entur.logging.cloud.spring.grpc.ecosystem.RequestResponseGrpcEcosystemAutoConfiguration;
44
import no.entur.logging.cloud.spring.rr.grpc.AbstractRequestResponseGrpcSinkAutoConfiguration;
5+
import no.entur.logging.cloud.spring.rr.grpc.GrpcLoggingCloudProperties;
56
import no.entur.logging.cloud.spring.rr.grpc.RequestResponseGrpcAutoConfiguration;
67
import org.springframework.boot.autoconfigure.AutoConfigureBefore;
8+
import org.springframework.context.annotation.Bean;
79
import org.springframework.context.annotation.Configuration;
810
import org.springframework.context.annotation.PropertySource;
911

1012
@Configuration
11-
@PropertySource(value = "classpath:request-response.gcp.properties", ignoreResourceNotFound = false)
1213
@AutoConfigureBefore(RequestResponseGrpcAutoConfiguration.class)
13-
public class RequestResponseGcpGrpcEcosystemAutoConfiguration extends AbstractRequestResponseGrpcSinkAutoConfiguration {
14+
public class RequestResponseGcpGrpcEcosystemAutoConfiguration {
15+
16+
@Bean
17+
public GrpcLoggingCloudProperties grpcLoggingCloudProperties() {
18+
GrpcLoggingCloudProperties c = new GrpcLoggingCloudProperties();
19+
// subtract a few kb for headers and other wrapping
20+
c.setMaxBodySize(131072 - 2 * 1024);
21+
c.setMaxSize(131072);
22+
return c;
23+
}
1424
}

gcp/request-response-spring-boot-starter-gcp-grpc-ecosystem/src/main/resources/request-response.gcp.properties

Lines changed: 0 additions & 2 deletions
This file was deleted.

0 commit comments

Comments
 (0)