Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Disabling Cloud GCP Core causes application start failure with Cloud Logging starter #3177

Open
jonblack opened this issue Aug 29, 2024 · 0 comments
Labels
core priority: p2 type: bug Something isn't working

Comments

@jonblack
Copy link

Describe the bug

Setting spring.cloud.gcp.core.enabled=false causes the application to fail on startup because LoggingWebMvcConfigurer cannot be instantiated since there is no GcpProjectIdProvider bean.

I would expect disabling GCP core to also disable Cloud Logging; however, this also requires setting spring.cloud.gcp.logging.enabled=false to prevent StackDriverLoggingAutoConfiguration from being processed.

I also noticed that LoggingWebMvcConfigurer doesn't even make use of the provided GcpProjectIdProvider so it's not clear to me why it's even needed.

Sample

  • Create a Spring Boot application
  • Add spring-boot-starter-web and spring-cloud-gcp-starter-logging dependencies to the pom
  • Add spring.cloud.gcp.core.enabled=false to application.properties
@JoeWang1127 JoeWang1127 added type: bug Something isn't working priority: p2 core labels Aug 29, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
core priority: p2 type: bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants