From f4331f7c169309c9017b9628fe3757fc5312270b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lo=C3=AFc=20Hoguin?= Date: Fri, 27 Oct 2017 13:00:00 +0100 Subject: Add cowboy_tracer_h stream handler 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. --- ebin/cowboy.app | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'ebin') diff --git a/ebin/cowboy.app b/ebin/cowboy.app index 356628d..8efc8af 100644 --- a/ebin/cowboy.app +++ b/ebin/cowboy.app @@ -1,7 +1,7 @@ {application, 'cowboy', [ {description, "Small, fast, modern HTTP server."}, {vsn, "2.0.0"}, - {modules, ['cowboy','cowboy_app','cowboy_bstr','cowboy_children','cowboy_clear','cowboy_clock','cowboy_compress_h','cowboy_constraints','cowboy_handler','cowboy_http','cowboy_http2','cowboy_iolists','cowboy_loop','cowboy_metrics_h','cowboy_middleware','cowboy_req','cowboy_rest','cowboy_router','cowboy_static','cowboy_stream','cowboy_stream_h','cowboy_sub_protocol','cowboy_sup','cowboy_tls','cowboy_websocket']}, + {modules, ['cowboy','cowboy_app','cowboy_bstr','cowboy_children','cowboy_clear','cowboy_clock','cowboy_compress_h','cowboy_constraints','cowboy_handler','cowboy_http','cowboy_http2','cowboy_iolists','cowboy_loop','cowboy_metrics_h','cowboy_middleware','cowboy_req','cowboy_rest','cowboy_router','cowboy_static','cowboy_stream','cowboy_stream_h','cowboy_sub_protocol','cowboy_sup','cowboy_tls','cowboy_tracer_h','cowboy_websocket']}, {registered, [cowboy_sup,cowboy_clock]}, {applications, [kernel,stdlib,crypto,cowlib,ranch]}, {mod, {cowboy_app, []}}, -- cgit v1.2.3