This issue is related to issues #674 and #677 and to the documentation https://docs.quarkiverse.io/quarkus-google-cloud-services/main/logging.html#quarkus-google-cloud-logging_quarkus-google-cloud-logging-gcp-tracing-project-id.
When using version v2.17.1 of the quarkus-google-cloud-logging component, it seams that no default implementation of the io.quarkiverse.googlecloudservices.logging.runtime.TraceInfoExtractor and that you need to set up one in order to provide the trace and the spanId. I'm resorting to the org.jboss.logmanager.LogManager for logging.
I have implemented the TraceInfoExtractor in the hope to extract from the provided ExtLogRecord object the trace and the spanId of the HTTP request resulting from the web service endpoint invocation, but its class does not expose that information (the only field which may make sense if sequenceNumber). Hence, when logging during the execution of a web service, the output log is not nested in Google Cloud Logging within the HTTP log request.
Did I miss something? Is it possible to extract from the context the HTTP request trace and the spanId so that I can implement the TraceInfoExtractor` properly by reusing them for the logs issued during its execution? Do you have plans to provide such default implementation (it would save hours to newcomers like me)?
This issue is related to issues #674 and #677 and to the documentation https://docs.quarkiverse.io/quarkus-google-cloud-services/main/logging.html#quarkus-google-cloud-logging_quarkus-google-cloud-logging-gcp-tracing-project-id.
When using version v2.17.1 of the
quarkus-google-cloud-loggingcomponent, it seams that no default implementation of theio.quarkiverse.googlecloudservices.logging.runtime.TraceInfoExtractorand that you need to set up one in order to provide thetraceand thespanId. I'm resorting to theorg.jboss.logmanager.LogManagerfor logging.I have implemented the
TraceInfoExtractorin the hope to extract from the providedExtLogRecordobject thetraceand thespanIdof the HTTP request resulting from the web service endpoint invocation, but its class does not expose that information (the only field which may make sense ifsequenceNumber). Hence, when logging during the execution of a web service, the output log is not nested in Google Cloud Logging within the HTTP log request.Did I miss something? Is it possible to extract from the context the HTTP request
traceand thespanId so that I can implement theTraceInfoExtractor` properly by reusing them for the logs issued during its execution? Do you have plans to provide such default implementation (it would save hours to newcomers like me)?