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

Jetty-12 Improve CustomRequestLog efficiency #8819

Closed
gregw opened this issue Nov 1, 2022 · 0 comments
Closed

Jetty-12 Improve CustomRequestLog efficiency #8819

gregw opened this issue Nov 1, 2022 · 0 comments
Assignees

Comments

@gregw
Copy link
Contributor

gregw commented Nov 1, 2022

Jetty version(s)
Jetty-12

Enhancement Description

The current handling for servlet attributes to be logged is in ServletChannel:
https://github.com/eclipse/jetty.project/blob/jetty-12.0.0.alpha2/jetty-ee10/jetty-ee10-servlet/src/main/java/org/eclipse/jetty/ee10/servlet/ServletChannel.java#L793-L804

This is creating 3 map keys even if they are not used. Either, they entries should only be created if used; OR create a single key with a Record containing all the attributes that might be logged (or maybe an interface with methods that can fetch the info to be logged, holding a reference to the servlet wrapper).

@gregw gregw moved this to To do in Jetty 12.0.ALPHAS Nov 1, 2022
@gregw gregw added the jetty 12 label Nov 1, 2022
@gregw gregw assigned gregw and unassigned lachlan-roberts Jun 6, 2023
gregw added a commit that referenced this issue Jun 9, 2023
Resolves #8819 CustomRequestLog improvements:
 + only add extra detail if the log is a CustomRequestLog
 + add extra detail as a record
 + get authentication state directly from request attribute
@gregw gregw moved this to 👀 In review in Jetty 12.0.0.beta2 Jun 9, 2023
gregw added a commit that referenced this issue Jun 13, 2023
* Resolve #8819 CustomRequestLog improvement

Resolves #8819 CustomRequestLog improvements:
 + only add extra detail if the log is a CustomRequestLog
 + add extra detail as a record
 + get authentication state directly from request attribute

* protect against null core request

* protect against null core request

* Use nanotime for logged latency
@gregw gregw closed this as completed Jun 15, 2023
@github-project-automation github-project-automation bot moved this from 👀 In review to ✅ Done in Jetty 12.0.0.beta2 Jun 15, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants