Skip to content

Logs not nested within HTTP request main log #859

@edouardmercier

Description

@edouardmercier

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)?

Metadata

Metadata

Labels

enhancementNew feature or requestquestionFurther information is requested

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions