Package

com.twitter.finatra.thrift

filters

Permalink

package filters

Visibility
  1. Public
  2. All

Type Members

  1. class AccessLoggingFilter extends TypeAgnostic with Logging

    Permalink

    AccessLoggingFilter attempts to follow the Common Log Format as closely as possible.

    AccessLoggingFilter attempts to follow the Common Log Format as closely as possible.

    Annotations
    @Singleton()
    See also

    https://en.wikipedia.org/wiki/Common_Log_Format

  2. class ExceptionMappingFilter extends TypeAgnostic

    Permalink

    A ThriftFilter which handles exceptions by rescuing the exception and passing it to the ExceptionManager to handle it.

    A ThriftFilter which handles exceptions by rescuing the exception and passing it to the ExceptionManager to handle it.

    Annotations
    @Singleton()
    Note

    This Filter SHOULD be as close to the start of the Filter chain as possible

  3. class LoggingMDCFilter extends TypeAgnostic

    Permalink
    Annotations
    @Singleton()
  4. class StatsFilter extends TypeAgnostic with Logging

    Permalink

    Tracks "per method" statistics scoped under per_method_stats/<method> including:

    Tracks "per method" statistics scoped under per_method_stats/<method> including:

    • success/failure (with exceptions) counters
    • latency_ms histogram

    Example stats for a successful request to a method named foo:

    per_method_stats/foo/failures 0
    per_method_stats/foo/ignored 0
    per_method_stats/foo/requests 1
    per_method_stats/foo/success 1
    per_method_stats/foo/latency_ms 43.000000 [43.0]

    Example stats, for a failed request to a method named foo:

    exceptions 1
    exceptions/java.lang.Exception 1
    per_method_stats/foo/failures 1
    per_method_stats/foo/failures/java.lang.Exception 1
    per_method_stats/foo/ignored 0
    per_method_stats/foo/requests 1
    per_method_stats/foo/success 0
    per_method_stats/foo/latency_ms 43.000000 [43.0]

    Example stats, for a failed request to a method named foo with a ResponseClassifier which classifies java.lang.Exception as Ignorable:

    exceptions 1
    exceptions/java.lang.Exception 1
    per_method_stats/foo/failures 0
    per_method_stats/foo/ignored 1
    per_method_stats/foo/ignored/java.lang.Exception 1
    per_method_stats/foo/requests 1
    per_method_stats/foo/success 0
    per_method_stats/foo/latency_ms 43.000000 [43.0]

    requests == success + failures + ignored The logical success rate for a method can be calculated as success / (success + failures)

    Annotations
    @Singleton()
    Note

    It is expected that this Filter is inserted ABOVE the ExceptionMappingFilter in a given filter chain, e.g., StatsFilter.andThen(ExceptionMappingFilter). For the response flow, StatsFilter would happen AFTER ExceptionMappingFilter and calculate mapped result.

  5. class ThriftMDCFilter extends TypeAgnostic

    Permalink

    Note: Any MDC filter must be used in conjunction with the LoggingMDCFilter to ensure that diagnostic context is properly managed.

    Note: Any MDC filter must be used in conjunction with the LoggingMDCFilter to ensure that diagnostic context is properly managed.

    Annotations
    @Singleton()
  6. class TraceIdMDCFilter extends TypeAgnostic

    Permalink

    Note: Any MDC filter must be used in conjunction with the LoggingMDCFilter to ensure that diagnostic context is properly managed.

    Note: Any MDC filter must be used in conjunction with the LoggingMDCFilter to ensure that diagnostic context is properly managed.

    Annotations
    @Singleton()

Value Members

  1. object AccessLoggingFilter

    Permalink

Ungrouped