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

Log requests sent to the health check #1585

Merged
merged 1 commit into from Jan 15, 2019

Conversation

2 participants
@chrisgilmerproj
Copy link
Contributor

chrisgilmerproj commented Jan 10, 2019

Description

We weren't using the request logging middleware on this endpoint. And because we aren't using middleware we need to log directly.

Reviewer Notes

This is a trimmed down version of the request info because we may not have a session to reference or metrics.

Setup

Navigate to http://milmovelocal:8080/health and you should see this log:

2019-01-10T22:11:15.609Z        INFO    webserver/main.go:768   Request {"git-branch": "master", "git-commit": "f817390f727985f53738609740347076a2530a77", "accepted-language": "", "content-length": 0, "host": "milmovelocal:8080", "method": "GET", "protocol": "http", "protocol-version": "HTTP/1.1", "referer": "", "source": "127.0.0.1:49587", "url": "/health", "user-agent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/71.0.3578.98 Safari/537.36", "x-amzn-trace-id": "", "x-forwarded-for": "", "x-forwarded-host": "", "x-forwarded-proto": ""}

Code Review Verification Steps

  • Code follows the guidelines for Logging
  • Request review from a member of a different team.
  • Have the Pivotal acceptance criteria been met for this change?

References

@chrisgilmerproj chrisgilmerproj merged commit b80ad3c into master Jan 15, 2019

12 checks passed

ci/circleci: acceptance_tests Your tests passed on CircleCI!
Details
ci/circleci: build_app Your tests passed on CircleCI!
Details
ci/circleci: build_migrations Your tests passed on CircleCI!
Details
ci/circleci: build_tools Your tests passed on CircleCI!
Details
ci/circleci: client_test Your tests passed on CircleCI!
Details
ci/circleci: integration_tests_mymove Your tests passed on CircleCI!
Details
ci/circleci: integration_tests_office Your tests passed on CircleCI!
Details
ci/circleci: integration_tests_tsp Your tests passed on CircleCI!
Details
ci/circleci: pre_deps_golang Your tests passed on CircleCI!
Details
ci/circleci: pre_deps_yarn Your tests passed on CircleCI!
Details
ci/circleci: pre_test Your tests passed on CircleCI!
Details
ci/circleci: server_test Your tests passed on CircleCI!
Details

@chrisgilmerproj chrisgilmerproj deleted the cg_162877640_log_health_request_info branch Jan 15, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment