tony2001/ngx_http_pinba_module — pull request #3 by vincentbernat (2013-04-12 22:52:33+00:00)
Title: Use as an HTTP/UDP gateway to Pinba

Pushing data from browsers to Pinba is not possible due to the use of UDP. There exists a project that enables the use of HTTP as a gateway: https://github.com/rs/pinba_http. This pull request adds the same kind of functionality to the nginx module.

A typical use is:

```
location ~^/track/(.*)$ {
pinba_enable on;
pinba_request_timer t;
pinba_max_timer 10;
set $pinba_request_uri $1;
set $pinba_tag_as 3215;
set $pinba_tag_country FR;
set $pinba_tag_browser $http_user_agent;
set $pinba_tag_urgency $arg_urgency;
return 204;
}
```

Sending the request `/track/my.event?t=4571&urgency=low` will be translated to a Pinba request with `script_name` equal to `my.event`, `request_time` equal to 4.571 seconds and a timer of the same value with 4 tags: `as`, `country`, `browser` and `urgency`. The latest one is provided by the user. As a safety value, timers greater than 10s are discarded.

The pull request has 3 commits. The two late ones can be used on their own with server-side timing.