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

Send request logs from activator. #3927

Merged
merged 4 commits into from
Apr 30, 2019
Merged

Send request logs from activator. #3927

merged 4 commits into from
Apr 30, 2019

Conversation

mdemirhan
Copy link
Contributor

@mdemirhan mdemirhan commented Apr 27, 2019

Fixes #3781

I moved request_log.go from pkg/queue to pkg/http - I don't know why it doesn't show as renamed. The file has two additions to it: getTemplate and SetTemplate funcs.

@googlebot googlebot added the cla: yes Indicates the PR's author has signed the CLA. label Apr 27, 2019
@knative-prow-robot knative-prow-robot added the size/XL Denotes a PR that changes 500-999 lines, ignoring generated files. label Apr 27, 2019
@knative-prow-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: mdemirhan

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@knative-prow-robot knative-prow-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Apr 27, 2019
@mdemirhan
Copy link
Contributor Author

I moved request_log.go from pkg/queue to pkg/http - I don't know why it doesn't show as renamed. The file has two additions to it: getTemplate and SetTemplate funcs.

@mdemirhan mdemirhan requested review from yanweiguo and mattmoor and removed request for tcnghia April 27, 2019 21:46
Copy link
Contributor

@vagababov vagababov left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

/lint

Copy link
Contributor

@knative-prow-robot knative-prow-robot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@vagababov: 2 warnings.

In response to this:

/lint

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

pkg/http/request_log.go Show resolved Hide resolved
pkg/http/request_log.go Show resolved Hide resolved
Copy link
Contributor

@vagababov vagababov left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we move the file rather than delete and add? This will preserve history as well.

pkg/http/request_log.go Show resolved Hide resolved
cmd/activator/request_log.go Show resolved Hide resolved
cmd/activator/main.go Show resolved Hide resolved
@mdemirhan
Copy link
Contributor Author

@vagababov I tried doing that but for some reason, it keeps adding and removing, rather than moving.

@mdemirhan
Copy link
Contributor Author

/lint

Copy link
Contributor

@knative-prow-robot knative-prow-robot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@mdemirhan: 0 warnings.

In response to this:

/lint

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

Copy link
Member

@mattmoor mattmoor left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

couple drive-by comments, need to take a real look :)

cmd/activator/request_log.go Show resolved Hide resolved
cmd/activator/request_log_test.go Show resolved Hide resolved
// and effectively disable request logs.
if templateStr != "" {
// Make sure that the template ends with a newline. Otherwise,
// logging backends will not be able to parse entries separately.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should we check this after applying the template? I bet it would be more reliable?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No sure if I understand - if we check this after we apply, compiled template won't have the newline and will not work.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I see, because it executes it directly to a writer...

cmd/activator/request_log.go Show resolved Hide resolved
@mattmoor
Copy link
Member

Moves in git are heuristic based. If you make enough edits, it stops showing up that way. You'll also get strange "moves" when you add / remove similar enough files.

Mustafa Demirhan added 2 commits April 28, 2019 12:23
# Conflicts:
#	cmd/activator/main.go
# Conflicts:
#	cmd/activator/main.go
#	cmd/queue/main.go
@knative-metrics-robot
Copy link

The following is the coverage report on pkg/.
Say /test pull-knative-serving-go-coverage to re-run this coverage report

File Old Coverage New Coverage Delta
pkg/http/request_log.go Do not exist 100.0%

@mattmoor
Copy link
Member

/lgtm

@knative-prow-robot knative-prow-robot added the lgtm Indicates that a PR is ready to be merged. label Apr 30, 2019
@knative-prow-robot knative-prow-robot merged commit 3bfdea5 into knative:master Apr 30, 2019
@mdemirhan mdemirhan deleted the activatorreqlog2 branch April 30, 2019 02:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. area/networking cla: yes Indicates the PR's author has signed the CLA. lgtm Indicates that a PR is ready to be merged. size/XL Denotes a PR that changes 500-999 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Report request logs from activator
7 participants