Packages

package filter

Ordering
  1. Alphabetic
Visibility
  1. Public
  2. Protected

Type Members

  1. class AddResponseHeadersFilter extends SimpleFilter[Request, Response]
  2. class CommonLogFormatter extends LogFormatter

    Apache-style common log formatter

  3. abstract class DtabFilter[Req <: Message, Rep <: Message] extends SimpleFilter[Req, Rep]

    Delegate to the dtab contained inside of the request.

  4. class ExceptionFilter[REQUEST <: Request] extends SimpleFilter[REQUEST, Response]

    General purpose exception filter.

    General purpose exception filter.

    Uncaught exceptions are converted to 500 Internal Server Error. Cancellations are converted to 499 Client Closed Request. 499 is an Nginx extension for exactly this situation, see: https://trac.nginx.org/nginx/browser/nginx/trunk/src/http/ngx_http_request.h

  5. class HeadFilter[Req <: Request] extends SimpleFilter[Req, Response]

    HEAD filter.

    HEAD filter. Implements HEAD by converting to a GET.

  6. class JsonpFilter[Req <: Request] extends SimpleFilter[Req, Response]

    JSONP (callback) filter

    JSONP (callback) filter

    Wrap JSON content in <callback>(<content>);

    See: https://en.wikipedia.org/wiki/JSONP

  7. trait LogFormatter extends filter.LogFormatter[Request, Response]
  8. class LoggingFilter[REQUEST <: Request] extends SimpleFilter[REQUEST, Response] with filter.LoggingFilter[REQUEST, Response]

    Logging filter.

    Logging filter.

    Logs all requests according to formatter.

  9. class MethodRequiredFilter[REQUEST <: Request] extends SimpleFilter[REQUEST, Response]

    Method required filter.

    Method required filter.

    Respond with 405 Method Not Allowed error if method not in supported method list.

  10. class StatsFilter[REQUEST <: Request] extends SimpleFilter[REQUEST, Response]

    Statistic filter.

    Statistic filter.

    Add counters: status.[code] status.[class] And metrics: time.[code] time.[class]

  11. class StreamingStatsFilter extends SimpleFilter[Request, Response]

    A filter to export statistics for HTTP streaming requests and responses.

    A filter to export statistics for HTTP streaming requests and responses. A streaming request/response is an HTTP request/response with isChunked set to true.

    This filter is included in HTTP stack by default, all metrics defined in this filter are only populated for HTTP streaming requests/responses.

    Stats: ---------------Request Stream------------

    • stream/request/duration_ms: A histogram of the duration of the lifetime of request streams, from the time a stream is initialized until it's closed, in milliseconds. ---------------Response Stream-----------
    • stream/response/duration_ms: A histogram of the duration of the lifetime of response streams, from the time a stream is initialized until it's closed, in milliseconds. Counters: ---------------Request Stream------------
    • stream/request/closed: A counter of the number of closed request streams.
    • stream/request/failures A counter of the number of times any failure has been observed in the middle of a request stream.
    • stream/request/failures/<exception_name>: A counter of the number of times a specific exception has been thrown in the middle of a request stream.
    • stream/request/opened: A counter of the number of opened request streams. ---------------Response Stream-----------
    • stream/response/closed: A counter of the number of closed response streams.
    • stream/response/failures A counter of the number of times any failure has been observed in the middle of a response stream.
    • stream/response/failures/<exception_name>: A counter of the number of times a specific exception has been thrown in the middle of a response stream.
    • stream/response/opened: A counter of the number of opened response streams. Gauges: ---------------Request Stream------------
    • stream/request/pending: A gauge of the number of pending request streams. ---------------Response Stream------------
    • stream/response/pending: A gauge of the number of pending response streams.

    You could derive the streaming success rate of:

    • the total number of streams number of successful streams divided by number of total streams
    • closed streams number of successful streams divided by number of closed streams Here we assume a success stream as a stream terminated without an exception or a stream that has not terminated yet.

    Take request stream as an example, assuming your counters are not "latched", which means that their values are monotonically increasing:

    • Success rate of total number of streams: 1 - (rated_counter(stream/request/failures) / (gauge(stream/request/pending) + rated_counter(stream/request/closed)))
    • Success rate of number of closed streams: 1 - (rated_counter(stream/request/failures) / rated_counter(stream/request/closed))

Value Members

  1. object ClientDtabContextFilter
  2. object ClientNackFilter
  3. object Cors

    Implements https://www.w3.org/TR/cors/

  4. object CorsFilter

    Adds headers to support Cross-origin resource sharing.

    Adds headers to support Cross-origin resource sharing.

    This is here for backwards compatibility. You should probably use Cors.HttpFilter directly.

  5. object DtabFilter
  6. object ExceptionFilter extends ExceptionFilter[Request]
  7. object HeadFilter extends HeadFilter[Request]
  8. object HttpNackFilter

    When a server fails with retryable failures, it sends back a NackResponse, i.e.

    When a server fails with retryable failures, it sends back a NackResponse, i.e. a 503 response code with "finagle-http-nack" header. A non-retryable failure will be converted to a 503 with "finagle-http-nonretryable-nack".

    Clients who recognize the header can handle the response appropriately. Clients who don't recognize the header treat the response the same way as other 503 response.

  9. object JsonpFilter extends JsonpFilter[Request]
  10. object LogFormatter
  11. object LoggingFilter extends LoggingFilter[Request]
  12. object MethodRequiredFilter extends MethodRequiredFilter[Request]
  13. object ServerDtabContextFilter
  14. object StatsFilter
  15. object StreamingStatsFilter

Ungrouped