What

In the past few stories you have learned about what handlers are and what their code looks like. In this story you are going to be formally introduced to the next five handlers in Gorouter.

How

  1. Read the summary for each handler.
  2. Where there is a ✨ make sure you take a look at the code.

The next five handlers

6. ✨Access Log This handler creates and emits the access logs. There is one access log per request/response. You can find these logs at /var/vcap/sys/log/gorouter/access.log.

7. Reporter This handler emits a metric containing the status code of the response and sets information about the response latency on the RequestInfo struct.

8. HTTP Rewrite This handler alters the headers on the request. It adds these headers and removes these headers based on bosh properties.

9. Proxy Healthcheck This handler responds to healthcheck requests.

10. Zipkin Zipkin is a distributed tracing system. If you enable the router.tracing.enable_zipkin bosh property, then this handler will attach zipkin headers on the request.

Questions

❓If an invalid response results in a panic in golang’s transport code, do you think that there will be a log line in the access logs? Why or why not? Consult the onion diagram if you need.