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

structured logging: add Http request context discovery #687

Closed
minherz opened this issue Sep 27, 2021 · 4 comments
Closed

structured logging: add Http request context discovery #687

minherz opened this issue Sep 27, 2021 · 4 comments
Assignees
Labels
api: logging Issues related to the googleapis/java-logging API. lang: java Issues specific to Java. type: feature request ‘Nice-to-have’ improvement, new feature or different behavior or design.

Comments

@minherz
Copy link
Contributor

minherz commented Sep 27, 2021

Is your feature request related to a problem? Please describe.
If not defined, the httpRequest field in LogEntry should be auto-populated when writing log entries to backend

Describe the solution you'd like
Provide a method to define an Http context that can be used by a Web server application to publish info about the request context and also to remove the published context.
The method should support multi-threading. It should be available from any thread of the application process.

@minherz minherz added type: feature request ‘Nice-to-have’ improvement, new feature or different behavior or design. lang: java Issues specific to Java. labels Sep 27, 2021
@minherz minherz self-assigned this Sep 27, 2021
@product-auto-label product-auto-label bot added the api: logging Issues related to the googleapis/java-logging API. label Sep 27, 2021
@minherz
Copy link
Contributor Author

minherz commented Sep 27, 2021

Related issues #685, #686, #687, #688, #689, #690, #691

@minherz
Copy link
Contributor Author

minherz commented Oct 20, 2021

The Spring context can be discovered using the method recommended in the stackoverflow post.

@minherz minherz changed the title structured logging: add Http request discovery from Spring context structured logging: add Http request context discovery Nov 17, 2021
@minherz
Copy link
Contributor Author

minherz commented Nov 17, 2021

This feature covers two implementations:

  1. The request context holder that will maintain the context per-thread providing support to existing Web server implementations.
  2. The ServletContainerInititializer implementation that is designed as a sub-module in this repository, so its dependencies to javax-servlet-api will not cause backward incompatability to the google-cloud-logging submodule.

@minherz
Copy link
Contributor Author

minherz commented Dec 5, 2021

Closing parent issue due to completing both child issues.

@minherz minherz closed this as completed Dec 5, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
api: logging Issues related to the googleapis/java-logging API. lang: java Issues specific to Java. type: feature request ‘Nice-to-have’ improvement, new feature or different behavior or design.
Projects
None yet
1 participant