Skip to content

Instantly share code, notes, and snippets.

View cgriego's full-sized avatar

Chris Griego cgriego

  • Priceline Partner Solutions
  • Portland, Oregon Metro Area
  • 19:42 (UTC -08:00)
  • X @cgriego
View GitHub Profile
@cgriego
cgriego / request_start_variable.patch
Created August 25, 2012 19:05 — forked from michaeldauria/request_start_variable.patch
Add a 'start_time' variable to nginx 1.2.1 to support an X-REQUEST-START header. This header is used by New Relic RPM to record queue time.
--- src/http/ngx_http_variables.c.orig 2012-06-07 12:47:34.000000000 -0400
+++ src/http/ngx_http_variables.c 2012-06-07 12:55:51.000000000 -0400
@@ -99,6 +99,8 @@
ngx_http_variable_value_t *v, uintptr_t data);
static ngx_int_t ngx_http_variable_pid(ngx_http_request_t *r,
ngx_http_variable_value_t *v, uintptr_t data);
+static ngx_int_t ngx_http_variable_start_time(ngx_http_request_t *r,
+ ngx_http_variable_value_t *v, uintptr_t data);
/*