Module Expr Str Import alias Import alias Import alias ImportFrom alias ImportFrom alias ImportFrom alias ImportFrom alias ImportFrom alias alias ImportFrom alias ImportFrom alias ImportFrom alias ImportFrom alias alias ClassDef bases NameLoad body Pass decorator_list ClassDef bases NameLoad body FunctionDef arguments args NameParam NameParam NameParam NameParam defaults body Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr NameLoad decorator_list FunctionDef arguments args NameParam defaults body ImportFrom alias Expr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr AttributeLoad NameLoad attr AttributeLoad NameLoad attr Return Call AttributeLoad NameLoad attr NameLoad decorator_list FunctionDef arguments args NameParam defaults body Expr Call AttributeLoad AttributeLoad NameLoad attr attr If AttributeLoad AttributeLoad NameLoad attr attr body Expr Call AttributeLoad AttributeLoad AttributeLoad AttributeLoad NameLoad attr attr attr attr Return Call AttributeLoad NameLoad attr NameLoad decorator_list decorator_list ClassDef bases NameLoad body FunctionDef arguments args NameParam NameParam defaults NameLoad body Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults body ImportFrom alias Expr Call AttributeLoad NameLoad attr Assign AttributeStore NameLoad attr Call NameLoad If AttributeLoad NameLoad attr body Expr Call AttributeLoad NameLoad attr Num AttributeLoad NameLoad attr Assign AttributeStore NameLoad attr NameLoad Return AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam NameParam defaults body If AttributeLoad NameLoad attr body Expr Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad decorator_list decorator_list ClassDef bases NameLoad body Expr Str Expr Call NameLoad AttributeLoad NameLoad attr FunctionDef arguments args NameParam defaults body Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr Num decorator_list FunctionDef arguments args NameParam defaults body Expr Str Expr Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad NameLoad decorator_list FunctionDef arguments args NameParam defaults body Expr Str Assign AttributeStore NameLoad attr Call NameLoad Call AttributeLoad NameLoad attr Assign AttributeStore NameLoad attr NameLoad decorator_list Assign NameStore NameLoad FunctionDef arguments args NameParam defaults body Expr Str Assign NameStore Call NameLoad Call AttributeLoad NameLoad attr Expr Call NameLoad Str AttributeLoad NameLoad attr BinOpSub NameLoad AttributeLoad NameLoad attr Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr Num Assign AttributeStore NameLoad attr NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults body If AttributeLoad NameLoad attr body AugAssignAdd AttributeStore NameLoad attr Num Return If CompareNotEq SubscriptLoad NameLoad Slice Num Str body If CompareEq SubscriptLoad NameLoad Index Num Str body AugAssignAdd NameStore Str orelse AugAssignAdd NameStore Str Expr Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad decorator_list decorator_list ClassDef bases NameLoad body FunctionDef arguments args NameParam NameParam NameParam NameParam defaults NameLoad body Expr Str Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr AttributeLoad NameLoad attr Assign AttributeStore NameLoad attr Call AttributeLoad NameLoad attr NameLoad Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr Call AttributeLoad NameLoad attr NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults body Assign NameStore ListComp Call AttributeLoad NameLoad attr comprehension NameStore Call AttributeLoad NameLoad attr Str NameLoad Assign NameStore Call NameLoad NameLoad BinOpAdd Str SubscriptLoad NameLoad Index Num NameLoad If CompareIs NameLoad NameLoad body Raise Call NameLoad BinOpMod Str TupleLoad SubscriptLoad NameLoad Index Num Assign NameStore Call NameLoad SubscriptLoad NameLoad Slice Num Return NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults body Assign NameStore ListLoad For NameStore Call AttributeLoad NameLoad attr Str body If UnaryOpNot NameLoad body Continue Assign TupleStore NameStore NameStore Call AttributeLoad NameLoad attr Str Assign NameStore Call AttributeLoad NameLoad attr NameLoad Assign NameStore ListComp Call AttributeLoad NameLoad attr comprehension NameStore Call AttributeLoad NameLoad attr Str NameLoad Assign NameStore Call NameLoad NameLoad BinOpAdd Str SubscriptLoad NameLoad Index Num NameLoad If CompareIs NameLoad NameLoad body Raise Call NameLoad BinOpMod Str TupleLoad SubscriptLoad NameLoad Index Num Expr Call AttributeLoad NameLoad attr TupleLoad NameLoad Call NameLoad SubscriptLoad NameLoad Slice Num Return NameLoad decorator_list FunctionDef arguments args NameParam defaults body Expr Str Return Lambda arguments args defaults vararg NameLoad decorator_list FunctionDef arguments args NameParam defaults vararg body Expr Str Assign NameStore Call AttributeLoad NameLoad attr Call AttributeLoad Str attr NameLoad FunctionDef arguments args NameParam NameParam NameParam defaults body Return UnaryOpNot Call NameLoad NameLoad NameLoad NameLoad decorator_list Return NameLoad decorator_list FunctionDef arguments args NameParam defaults vararg body Expr Str FunctionDef arguments args NameParam NameParam NameParam defaults body Return CompareIn NameLoad NameLoad decorator_list Return NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults body FunctionDef arguments args NameParam NameParam NameParam defaults body Return Call AttributeLoad NameLoad attr NameLoad NameLoad decorator_list Return NameLoad decorator_list FunctionDef arguments args NameParam defaults body Expr Str FunctionDef arguments args defaults vararg body Return decorator_list Return NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam NameParam defaults Str body Assign NameStore Call AttributeLoad NameLoad attr NameLoad FunctionDef arguments args NameParam NameParam NameParam defaults body If BoolOpAnd CompareEq NameLoad Str CompareIsNot Call AttributeLoad NameLoad attr NameLoad NameLoad body Expr Yield TupleLoad NameLoad NameLoad NameLoad Assign NameStore Call AttributeLoad NameLoad attr NameLoad NameLoad Expr Yield TupleLoad NameLoad NameLoad NameLoad decorator_list Return NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam defaults Str body FunctionDef arguments args NameParam NameParam NameParam defaults body If CompareEq NameLoad Str body Expr Yield TupleLoad NameLoad NameLoad NameLoad Expr Yield TupleLoad NameLoad NameLoad NameLoad decorator_list Return NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam defaults body If CompareIs AttributeLoad NameLoad attr NameLoad body Return Lambda arguments args defaults vararg NameLoad Assign NameStore Call NameLoad NameLoad Assign NameStore Call AttributeLoad NameLoad attr Expr Call AttributeLoad AttributeLoad NameLoad attr attr Lambda arguments args NameParam defaults NameLoad Assign NameStore Call AttributeLoad NameLoad attr NameLoad NameLoad keyword Lambda arguments args defaults Call AttributeLoad NameLoad attr NameLoad Assign NameStore Call NameLoad NameLoad Assign NameStore Call NameLoad Num NameLoad Expr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr FunctionDef arguments args NameParam NameParam NameParam defaults body Assign NameStore Call AttributeLoad NameLoad attr NameLoad NameLoad NameLoad Expr Call AttributeLoad NameLoad attr NameLoad Expr Yield TupleLoad NameLoad NameLoad NameLoad decorator_list Return NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam defaults body If CompareIs AttributeLoad NameLoad attr NameLoad body Return Lambda arguments args defaults vararg NameLoad Assign NameStore Call NameLoad NameLoad Assign NameStore Call AttributeLoad NameLoad attr Expr Call AttributeLoad AttributeLoad NameLoad attr attr Lambda arguments args NameParam defaults NameLoad Assign NameStore Call NameLoad Lambda arguments args defaults Call AttributeLoad NameLoad attr NameLoad Assign NameStore Call NameLoad NameLoad NameLoad NameLoad Expr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr FunctionDef arguments args NameParam NameParam NameParam defaults body Assign NameStore Call AttributeLoad NameLoad attr NameLoad NameLoad NameLoad Expr Call AttributeLoad NameLoad attr NameLoad Expr Yield TupleLoad NameLoad NameLoad NameLoad decorator_list Return NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam NameParam NameParam defaults body Assign NameStore ListLoad TupleLoad NameLoad NameLoad NameLoad If AttributeLoad NameLoad attr body For TupleStore NameStore NameStore AttributeLoad NameLoad attr body Assign TupleStore NameStore NameStore TupleLoad NameLoad ListLoad If UnaryOpNot NameLoad body Return For TupleStore NameStore NameStore NameStore NameLoad body If UnaryOpNot Call NameLoad NameLoad NameLoad NameLoad body Expr Call AttributeLoad NameLoad attr TupleLoad NameLoad NameLoad NameLoad Continue Assign NameStore Call NameLoad NameLoad NameLoad NameLoad If CompareIsNot NameLoad NameLoad body Expr Call AttributeLoad NameLoad attr NameLoad For TupleStore NameStore NameStore NameStore NameLoad body Assign NameStore Call AttributeLoad NameLoad attr NameLoad NameLoad NameLoad Expr Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad NameLoad NameLoad NameLoad decorator_list decorator_list
N/A N/A 
Routes messages to different processors.

Rules are of the form:
    condition => target
Where each on of condition and target are of the form:
    name [arguments]*
And the arguments are dependant on the name.

Each rule is applied to the message on the order they are specified.

Conditions supported:
    any: will match all messages
    metric_type [type]+: will match a metric of any of the types specified
    path_like fnmatch_exp: will match the path against the expression with
        fnmatch.
    not [rule..]: will return the negation of the result of rule


Targets supported:
    drop: will drop the message, stopping any further processing.
    redirect_udp host port: will send to (host, port) by udp
    redirect_tcp host port: will send to (host, port) by tcp
    rewrite pattern repl: will rewrite the path like re.sub
    set_metric_type metric_type: will make the metric of type metric_type

 N/A re N/A time N/A fnmatch zope.interface implements twisted.application.internet UDPServer twisted.application.service Service twisted.internet interfaces twisted.internet.protocol ReconnectingClientFactory Protocol twisted.internet defer twisted.python log txstatsd.server.processor BaseMessageProcessor txstatsd.client StatsDClientProtocol TwistedStatsDClient StopProcessingException N/A Exception N/A N/A N/A TCPRedirectService N/A Service N/A __init__ N/A N/A self host port factory N/A N/A N/A N/A self host host N/A N/A self port port N/A N/A self factory factory N/A startService N/A N/A self N/A N/A twisted.internet reactor N/A N/A N/A reactor connectTCP N/A self host N/A self port N/A self factory N/A N/A N/A Service startService self N/A stopService N/A N/A self N/A N/A N/A N/A N/A N/A self factory stopTrying N/A N/A N/A self factory protocol N/A N/A N/A N/A N/A N/A N/A self factory protocol transport loseConnection N/A N/A N/A Service stopService self N/A N/A TCPRedirectClientFactory N/A ReconnectingClientFactory N/A __init__ N/A N/A self callback N/A None N/A N/A N/A self callback callback N/A N/A self protocol None N/A buildProtocol N/A N/A self addr N/A N/A twisted.internet reactor N/A N/A N/A self resetDelay N/A N/A self protocol N/A TCPRedirectProtocol N/A N/A self callback N/A N/A N/A N/A reactor callLater 0 N/A self callback N/A N/A self callback None N/A N/A self protocol N/A write N/A N/A self data N/A N/A N/A N/A self protocol N/A N/A N/A N/A N/A self protocol write data N/A N/A TCPRedirectProtocol N/A Protocol N/A N/A A client protocol for redicting messages over tcp.
     N/A N/A implements N/A interfaces IPushProducer __init__ N/A N/A self N/A N/A N/A N/A self paused False N/A N/A self last_paused None N/A N/A self dropped 0 N/A connectionMade N/A N/A self N/A N/A N/A 
        A connection has been made, register ourselves as a producer for the
        bound transport.
         N/A N/A N/A N/A self transport registerProducer self True N/A pauseProducing N/A N/A self N/A N/A N/A Pause producing messages, since the buffer is full. N/A N/A self last_paused N/A int N/A N/A time time N/A N/A self paused True N/A N/A stopProducing pauseProducing resumeProducing N/A N/A self N/A N/A N/A We can write to the transport again. Yay!. N/A time_now N/A int N/A N/A time time N/A N/A log Resumed TCP redirect. Dropped %s messages during %s seconds  N/A self dropped N/A time_now N/A self last_paused N/A N/A self paused False N/A N/A self dropped 0 N/A N/A self last_paused None N/A write N/A N/A self line N/A N/A N/A N/A self paused N/A N/A N/A self dropped 1 N/A N/A N/A N/A line N/A -2 N/A N/A N/A N/A line N/A -1 N/A N/A line N/A N/A line N/A N/A N/A N/A self transport write line N/A N/A Router N/A BaseMessageProcessor N/A __init__ N/A N/A self message_processor rules_config service N/A None N/A N/A Configure a router with rules_config.

        rules_config is a new_line separeted list of rules.
         N/A N/A self rules_config rules_config N/A N/A self message_processor message_processor N/A N/A self flush N/A message_processor flush N/A N/A self ready N/A N/A defer succeed None N/A N/A self service service N/A N/A self rules N/A N/A self build_rules rules_config N/A build_condition N/A N/A self condition N/A N/A N/A condition_parts N/A N/A N/A p strip N/A p N/A N/A condition split p N/A condition_factory N/A getattr self N/A build_condition_ N/A condition_parts N/A 0 None N/A N/A condition_factory None N/A N/A N/A ValueError N/A unknown condition %s N/A N/A condition_parts N/A 0 N/A condition_function N/A condition_factory N/A condition_parts N/A 1 N/A condition_function N/A build_rules N/A N/A self rules_config N/A N/A N/A rules N/A N/A line N/A N/A rules_config split N/A N/A N/A line N/A N/A N/A N/A condition target N/A N/A line split => N/A condition_function N/A N/A self build_condition condition N/A target_parts N/A N/A N/A p strip N/A p N/A N/A target split p N/A target_factory N/A getattr self N/A build_target_ N/A target_parts N/A 0 None N/A N/A target_factory None N/A N/A N/A ValueError N/A unknown target %s N/A N/A target_parts N/A 0 N/A N/A N/A rules append N/A condition_function N/A target_factory N/A target_parts N/A 1 N/A rules N/A build_condition_any N/A N/A self N/A N/A N/A Returns a condition that always matches. N/A N/A N/A N/A N/A args True N/A build_condition_not N/A N/A self N/A args N/A N/A 
        Returns a condition that negates the condition from its arguments.
         N/A other_condition N/A N/A self build_condition N/A N/A join args not_condition N/A N/A metric_type key fields N/A N/A N/A N/A N/A other_condition metric_type key fields N/A N/A not_condition N/A build_condition_metric_type N/A N/A self N/A metric_types N/A N/A Returns a condition that matched on metric kind. metric_type_condition N/A N/A metric_type key fields N/A N/A N/A N/A metric_type metric_types N/A N/A metric_type_condition N/A build_condition_path_like N/A N/A self pattern N/A N/A path_like_condition N/A N/A metric_type key fields N/A N/A N/A N/A N/A fnmatch fnmatch key pattern N/A N/A path_like_condition N/A build_target_drop N/A N/A self N/A N/A N/A Returns a target that stops the processing of a message. drop N/A N/A N/A args N/A N/A N/A N/A drop N/A build_target_rewrite N/A N/A self pattern repl dup N/A no-dup N/A N/A rexp N/A N/A re compile pattern rewrite_target N/A N/A metric_type key fields N/A N/A N/A N/A N/A dup dup N/A N/A N/A rexp match key None N/A N/A N/A N/A metric_type key fields N/A key N/A N/A rexp sub repl key N/A N/A N/A metric_type key fields N/A N/A rewrite_target N/A build_target_set_metric_type N/A N/A self metric_type dup N/A no-dup N/A set_metric_type N/A N/A _ key fields N/A N/A N/A N/A dup dup N/A N/A N/A N/A _ key fields N/A N/A N/A metric_type key fields N/A N/A set_metric_type N/A build_target_redirect_udp N/A N/A self host port N/A N/A N/A N/A N/A self service None N/A N/A N/A N/A N/A N/A args True N/A port N/A int port N/A d N/A N/A defer Deferred N/A N/A N/A N/A self ready addCallback N/A N/A N/A _ N/A d N/A client N/A N/A TwistedStatsDClient create host port connect_callback N/A N/A N/A N/A N/A N/A d callback None N/A protocol N/A StatsDClientProtocol client N/A udp_service N/A UDPServer 0 protocol N/A N/A N/A udp_service setServiceParent N/A self service redirect_udp_target N/A N/A metric_type key fields N/A N/A N/A message N/A N/A self rebuild_message metric_type key fields N/A N/A N/A client write message N/A N/A N/A metric_type key fields N/A N/A redirect_udp_target N/A build_target_redirect_tcp N/A N/A self host port N/A N/A N/A N/A N/A self service None N/A N/A N/A N/A N/A N/A args True N/A port N/A int port N/A d N/A N/A defer Deferred N/A N/A N/A N/A self ready addCallback N/A N/A N/A _ N/A d N/A factory N/A TCPRedirectClientFactory N/A N/A N/A N/A N/A N/A d callback None N/A redirect_service N/A TCPRedirectService host port factory N/A N/A N/A redirect_service setServiceParent N/A self service redirect_tcp_target N/A N/A metric_type key fields N/A N/A N/A message N/A N/A self rebuild_message metric_type key fields N/A N/A N/A factory write message N/A N/A N/A metric_type key fields N/A N/A redirect_tcp_target N/A process_message N/A N/A self message metric_type key fields N/A N/A N/A metrics N/A N/A metric_type key fields N/A N/A self rules N/A N/A N/A condition target N/A self rules N/A N/A N/A pending metrics N/A metrics N/A N/A N/A pending N/A N/A N/A N/A metric_type key fields pending N/A N/A N/A N/A condition metric_type key fields N/A N/A N/A N/A metrics append N/A metric_type key fields N/A N/A result N/A target metric_type key fields N/A N/A result None N/A N/A N/A N/A metrics extend result N/A N/A metric_type key fields metrics N/A N/A message N/A N/A self rebuild_message metric_type key fields N/A N/A N/A N/A self message_processor process_message message metric_type key fields N/A N/A