Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Add profiling support for Thrift services #329

Closed
Xylus opened this issue Apr 15, 2015 · 1 comment · Fixed by #891
Closed

Add profiling support for Thrift services #329

Xylus opened this issue Apr 15, 2015 · 1 comment · Fixed by #891
Assignees
Milestone

Comments

@Xylus
Copy link
Contributor

Xylus commented Apr 15, 2015

Thrift services may be traced by intercepting Thrift clients, and Thrift processors.
These interception points are:

  • Client
    • org.apache.thrift.TServiceClient
    • org.apache.thrift.async.TAsyncClient
  • Processor (Server)
    • org.apache.thrift.TBaseProcessor
    • org.apache.thrift.TBaseAsyncProcessor
  • TTransport - for retrieving connection info
    • org.apache.thrift.transport.TSocket
    • org.apache.thrift.transport.TNonblockingSocket
    • Decorator Transports that wrap the above 2 TTransports
      • org.apache.thrift.transport.TFramedTransport
      • org.apache.thrift.transport.TFastFramedTransport
      • org.apache.thrift.transport.TSaslClientTransport
    • Memory based Transport for FrameBuffers in non-blocking servers
      • org.apache.thrift.transport.TMemoryInputTransport
  • TProtocol - for reading/writing trace headers
    • org.apache.thrift.protocol.TBinaryProtocol
    • org.apache.thrift.protocol.TCompactProtocol
    • org.apache.thrift.protocol.TJSONProtocol
    • Support for org.apache.thrift.protocol.TTupleProtocol may also be possible

There are 4 main interception groups for tracing various Thrift operations.

  • Client synchronous send/receive
  • Client asynchronous send/receive
  • Server synchronous processing
  • Server asynchronous processing

Each of these operations work similarly by utilizing the interception points above:

  1. Client/Processor interceptors - Mark trace points and record connection information retrieved by (2).
  2. TTransport interceptors - Retrieve connection information from the root TTransport object (TSocket/TNonblockingSocket)
  3. TProtocol interceptors - Read/Write parent trace information track remote traces.

Will test against Thrift v0.8.0+ except for asynchronous processors which have been added in 0.9.1.

@Xylus Xylus self-assigned this Apr 15, 2015
@Xylus Xylus added this to the 1.1.0 milestone Apr 15, 2015
@nstopkimsk nstopkimsk modified the milestones: 1.0.5, 1.1.0 Apr 16, 2015
Xylus added a commit to Xylus/pinpoint that referenced this issue May 29, 2015
Xylus added a commit to Xylus/pinpoint that referenced this issue May 29, 2015
Xylus added a commit to Xylus/pinpoint that referenced this issue May 29, 2015
Xylus added a commit to Xylus/pinpoint that referenced this issue May 29, 2015
Xylus added a commit to Xylus/pinpoint that referenced this issue May 29, 2015
Xylus added a commit to Xylus/pinpoint that referenced this issue May 29, 2015
Xylus added a commit to Xylus/pinpoint that referenced this issue May 29, 2015
Xylus added a commit to Xylus/pinpoint that referenced this issue May 29, 2015
Xylus added a commit that referenced this issue Jun 1, 2015
#329 modify ITs to retrieve hostnames from InetSocketAddress
Xylus added a commit to Xylus/pinpoint that referenced this issue Jun 1, 2015
Xylus added a commit that referenced this issue Jun 1, 2015
#329 added hostname modification to Annotation checks
Xylus added a commit to Xylus/pinpoint that referenced this issue Jun 5, 2015
This was done to ease up future refactoring that would pull up trace
headers used for tracing various RPC calls into a single common class.
Xylus added a commit that referenced this issue Jun 5, 2015
Xylus added a commit to Xylus/pinpoint that referenced this issue Jun 19, 2015
…l timing issues

* Span/SpanEvent order for client/server traces cannot be guaranteed
with the current implementation of OrderedSpanRecorder. Client/server
trace verification tests are therefore seperated.
* Async call tests are disabled as well as the current implementation of
OrderedSpanRecorder does not adequately support async client SpanEvents.
A modification should be in place soon, and these tests will be added to
the suite when that happens.
@Xylus
Copy link
Contributor Author

Xylus commented Aug 27, 2015

Thrift integration tests may fail occasionally when a new test starts and creates a socket on a port which wasn't properly released (or is still in the process) by the previous test.

# for free to join this conversation on GitHub. Already have an account? # to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants