aboutsummaryrefslogtreecommitdiffstats
path: root/test/tracer_SUITE.erl
AgeCommit message (Collapse)Author
2020-04-06Rely on timetrap timeouts for tracer_SUITELoïc Hoguin
2017-11-29Add nowarn_export_all to all test suitesLoïc Hoguin
2017-11-17Disable the tracer suite when compiled nativelyLoïc Hoguin
2017-11-17Initialize trace patterns only onceLoïc Hoguin
They are global for the node for all future call trace flags, so it's not necessary to set them repeatedly with every request. Doing it once at startup also ensures we can't have race conditions when the user wants to change which trace patterns should be used (because requests are concurrent and patterns end up overwriting themselves repeatedly), and makes this changing of trace patterns much more straightforward: the user can just define the ones they want. The default function traces everything. In addition I have also added the tracer_flags option to make the trace flags configurable, excluding the tracer pid.
2017-11-10Keep the state returned by the tracer callbackLoïc Hoguin
It was mistakenly discarded.
2017-11-03Add a terminate event to the tracer and more testsLoïc Hoguin
2017-10-27Add cowboy_tracer_h stream handlerLoïc Hoguin
Another experimental stream handler. It enables tracing for the connection process and any children processes based on the matching of the request. It can be used to do ad-hoc tracing by sending a specific header, path, method or other. It is meant to be used both for tests and production. Some configuration scenarios are NOT safe for production, beware. It's important to understand that, at this time, tracing is enabled on the scale of the entire connection including any future request processes. Keep this in mind when trying to use it in production. The only way to stop tracing is by having the callback function exit (by calling exit/1 explicitly). This can be done after a certain number of events for example. Tracing can generate a lot of events, so it's a good idea to stop after a small number of events (between 1000 and 10000 should be good) and to avoid tracing the whole world. Documentation will follow at a later time.