Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

Add tracing capabilities to Express #2437

Closed
wants to merge 12 commits into from

Commits on Aug 26, 2016

  1. tests: add trace tests

    * app.instrument
    * app._callTracers
    * res.trace
    frankrousseau authored and Frank Rousseau committed Aug 26, 2016
    Configuration menu
    Copy the full SHA
    7762e31 View commit details
    Browse the repository at this point in the history
  2. add trace capabilities to express

    * allow to add tracer to the app level
    * activate tracer from the response object
    frankrousseau authored and Frank Rousseau committed Aug 26, 2016
    Configuration menu
    Copy the full SHA
    94c12a8 View commit details
    Browse the repository at this point in the history
  3. examples: add trace example

    frankrousseau authored and Frank Rousseau committed Aug 26, 2016
    Configuration menu
    Copy the full SHA
    1526713 View commit details
    Browse the repository at this point in the history
  4. improve _callTracers function performances

    _callTrackers runs a for loop on the application tracer list. Because tracing
    should impact performances as least as possible, this commit optimizes this for
    loop.
    
    Opitimization performed:
    
    * Usage of traditional for loop instead of forEach
    * Caching of tracer array length that is used to test the end of the loop.
    
    Here are the benchmarks that inspired these optimizations:
    
    * http://jsperf.com/array-foreach-vs-for-loop
    * http://jsperf.com/for-vs-foreacay
    frankrousseau authored and Frank Rousseau committed Aug 26, 2016
    Configuration menu
    Copy the full SHA
    46a6469 View commit details
    Browse the repository at this point in the history
  5. change call arguments of instrument tracer.

    Tracers instrumented at application level now handles a single
    option object as argument.
    frankrousseau authored and Frank Rousseau committed Aug 26, 2016
    Configuration menu
    Copy the full SHA
    38ee25b View commit details
    Browse the repository at this point in the history
  6. code style improvement for tracer module

    frankrousseau authored and Frank Rousseau committed Aug 26, 2016
    Configuration menu
    Copy the full SHA
    fc978b7 View commit details
    Browse the repository at this point in the history
  7. test for parent tracer firing

    frankrousseau authored and Frank Rousseau committed Aug 26, 2016
    Configuration menu
    Copy the full SHA
    2abd43c View commit details
    Browse the repository at this point in the history
  8. link subapp tracer to parent tracer

    The operation is performed when the subapp is mounted on the parent app.
    A tracer that calls the parent tracers is added to the sub app.
    frankrousseau authored and Frank Rousseau committed Aug 26, 2016
    Configuration menu
    Copy the full SHA
    786785b View commit details
    Browse the repository at this point in the history

Commits on Nov 11, 2016

  1. Proper usage of supertest expect in tracing tests

    Supertest lib provides a method called expect to test the result of a request.
    This method requires a callback that takes an error object as first parametr.
    If this error object is not inspected, the validation performed by expect are
    not checked. Tracing tests didn't do that checking.
    
    This commit add checking to trace tests to ensure that no error is returned
    when expect method is called.
    frankrousseau committed Nov 11, 2016
    Configuration menu
    Copy the full SHA
    f48f54b View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    aed9cb2 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    6b7ee9c View commit details
    Browse the repository at this point in the history
  4. Remove _callTracers tests

    Private methods do not need to be tested
    frankrousseau committed Nov 11, 2016
    Configuration menu
    Copy the full SHA
    72b57ae View commit details
    Browse the repository at this point in the history