spring-cloud-gcp-starter-logging: child-log not shown when "This request caused a new process to be started"

313 views Asked by At

I Configured the Cloud Logging implementation in my Java11 Google App Engine application following the guide

From the Cloud Logging UI I can see the log lines of the same request being grouped under a common parent, which is exactly what I wanted. And it's working: enter image description here

I found that when a request actually triggers a new instance, this kind of behaviour is not working: enter image description here You can see that there aren't any children, only the log about the instance being created: This request caused a new process to be started for your application, and thus caused your application code to be loaded for the first time. This request may thus take longer and use more CPU than a typical request for your application.

If I filter by the specific traceId I can actually see the logs of that specific request, the only missing part here is that are not displayed under the common parent: enter image description here

Am I missing a configuration? Is this a known behaviour? This is my current logback-spring.xml

<!-- https://spring-gcp.saturnism.me/app-dev/observability/logging#logback -->

<configuration>
   <include resource="org/springframework/boot/logging/logback/defaults.xml" />
   <include resource="org/springframework/boot/logging/logback/console-appender.xml" />

   <springProfile name="development | stage | production">
      <include resource="org/springframework/cloud/gcp/logging/logback-json-appender.xml" />
      <root level="INFO">
         <appender-ref ref="CONSOLE_JSON" />
      </root>
   </springProfile>
   <springProfile name="default | localhost">
      <root level="INFO">
         <appender-ref ref="CONSOLE" />
      </root>
   </springProfile>
</configuration>
0

There are 0 answers