Feature #5528

OO API for tracing

Added by Thomas Sawyer over 2 years ago. Updated about 1 year ago.

[ruby-core:40569]
Status:Closed
Priority:Normal
Assignee:Koichi Sasada
Category:core
Target version:2.0.0

Description

It would be nice to see a better API for "settracefunc" functionality.

I wrote a fairly simple library to do this some time ago called TracePoint. One of the significant advantages of TracePoint is that it allows for multiple traces to be defined without interfering others and they can even be given names to activate and deactivate them independently.

It would be nice to see something like this is Ruby 2.0, it would have the a number of advantages:

  • Object-oriented - a tracepoint is an object, not just an array of arguments.
  • Connescence - the tracepoint methods give tangible names to the properties that are traced.
  • More robust - currently one use of settracefunc will clobber another.

And probably others beside.

History

#1 Updated by Boris Stitnicky over 1 year ago

I think that so few people respond to this because they are not users of Tracepoint :-)

#2 Updated by Koichi Sasada about 1 year ago

  • Category set to core
  • Status changed from Open to Closed
  • Assignee set to Koichi Sasada
  • Target version changed from Next Major to 2.0.0

TracePoint was introduced.

Also available in: Atom PDF