Thrift
  1. Thrift
  2. THRIFT-1403

Allow method processing time measurement in TBaseProcessor

    Details

    • Type: Improvement Improvement
    • Status: Open
    • Priority: Major Major
    • Resolution: Unresolved
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: Java - Library
    • Labels:

      Description

      I would like to be able to instrument the generated processor to measure the time it takes to process the methods in the service interface.
      On a particular implementation I want to write the following log line for each method call:

      [date] Method <method> called, source <source_socket_ip>, status: <OK|FAILED>, payload <size_in_bytes>

        Activity

        Hide
        Bryan Duxbury added a comment -

        JMX would be pretty great.

        Show
        Bryan Duxbury added a comment - JMX would be pretty great.
        Hide
        Adrian Muraru added a comment -

        Right, similar although I'd like more something similar to "access logs" generated in logs.
        Ideally, this should not be hard-coded in the base classes but rather let the upper layers to decide on the instrumentation needed.
        To my mind having a callback/notification mechanism implemented in the base classes offers a better flexibility.

        Show
        Adrian Muraru added a comment - Right, similar although I'd like more something similar to "access logs" generated in logs. Ideally, this should not be hard-coded in the base classes but rather let the upper layers to decide on the instrumentation needed. To my mind having a callback/notification mechanism implemented in the base classes offers a better flexibility.
        Hide
        Jake Farrell added a comment -

        Bryan thoughts on using jmx (THRIFT-771) to accomplish something like this? i dont think it would take that much for it to get added in

        Show
        Jake Farrell added a comment - Bryan thoughts on using jmx ( THRIFT-771 ) to accomplish something like this? i dont think it would take that much for it to get added in
        Hide
        Adrian Muraru added a comment -

        TBaseProcessor is Java specific but I guess the feature can be exposed to other languages as well.

        Show
        Adrian Muraru added a comment - TBaseProcessor is Java specific but I guess the feature can be exposed to other languages as well.

          People

          • Assignee:
            Unassigned
            Reporter:
            Adrian Muraru
          • Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

            • Created:
              Updated:

              Development