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

[JENKINS-24671] Add username and referrer to slow-requests #33

Merged
merged 2 commits into from May 18, 2015

Conversation

Projects
None yet
5 participants
@christ66
Copy link
Member

christ66 commented May 18, 2015

This pull request adds the username of the person experiencing slow http requests. It also adds the referrer header in the event a plugin invokes the api and is unaware of it.

@reviewbybees

@alecharp

This comment has been minimized.

Copy link
Member

alecharp commented May 18, 2015

👍


InflightRequest(HttpServletRequest req) {
String query = req.getQueryString();
url = req.getRequestURL() + (query == null ? "" : "?" + query);
startTime = System.currentTimeMillis();
userName = Jenkins.getAuthentication().getName();
referer = ((StaplerRequest)req).getReferer();

This comment has been minimized.

@oleg-nenashev

oleg-nenashev May 18, 2015

Member

Unsafe cast. I would recommend to check the class and to default the field to something if it is not StaplerRequest

@stephenc

This comment has been minimized.

Copy link
Member

stephenc commented May 18, 2015

👍

1 similar comment
@oleg-nenashev

This comment has been minimized.

Copy link
Member

oleg-nenashev commented May 18, 2015

👍

@jenkinsadmin

This comment has been minimized.

Copy link
Member

jenkinsadmin commented May 18, 2015

Thank you for a pull request! Please check this document for how the Jenkins project handles pull requests

christ66 added a commit that referenced this pull request May 18, 2015

Merge pull request #33 from christ66/JENKINS-24671
[JENKINS-24671] Add username and referrer to slow-requests

@christ66 christ66 merged commit 6af7216 into jenkinsci:master May 18, 2015

1 check passed

Jenkins This pull request looks good
Details

@christ66 christ66 deleted the christ66:JENKINS-24671 branch May 18, 2015

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.