Thanks, I'll take a look. As another datapoint, the logging module does see
the python generated header when I use:
CustomLog logs/stats_log "d=%D&%{X-Stats}o" env=served_wsgi
Laurence
On Tuesday, 24 September 2013 23:58:45 UTC-7, Graham Dumpleton wrote:
>
> I'll have a dig through Apache and see what I can work out, but have you
> ever looked at New Relic? It provides this sort of information in an easily
> digestible UI. It provides a free Lite tier which although it doesn't
> provide all features of the product, still provides a lot of useful stuff.
>
> Check out the New Relic site:
>
> http://newrelic.com
>
> but also:
>
> http://lanyrd.com/2012/pycon/spcdg/
> http://blog.newrelic.com/2011/11/08/new-relic-supports-python/
>
> Disclaimer: I work for New Relic and wrote the Python agent.
>
> Graham
>
> On 25/09/2013, at 1:13 PM, Laurence Rowe <[email protected]<javascript:>>
> wrote:
>
> I'm seeing a problem with mod_headers and mod_wsgi where it seems that
> mod_headers does not see the response headers generated by mod_wsgi. (Looks
> like a duplicate of
> http://stackoverflow.com/questions/7172630/headers-added-in-mod-wsgi-not-properly-recognized-by-apachebut
> thought I'd post here in case anyone knew of a resolution.)
>
> My use case: I have a Pyramid app which records various timings which it
> then sets as the X-Stats response header. I then want to insert the Apache
> request time into that header using ``Header edit``, but it appears that
> Apache does not see the Python originated X-Stats header and leaves the
> X-Stats header unedited. To confirm this when I use ``Header append X-Stats
> "%D"`` I see a second X-Stats response header line with the duration value
> rather than a single header with the new value appended with a separating
> comma.
>
> Versions: self-compiled mod_wsgi 3.4 running under Apache 2.2.15 on CentOS.
>
> Config:
>
> WSGISocketPrefix /var/run/wsgi
> WSGIDaemonProcess encoded user=encoded group=encoded processes=8 threads=1
> WSGIImportScript /.../wsgi process-group=encoded
> application-group=%{GLOBAL}
> WSGIScriptAlias / /.../wsgi
>
> <Directory /...>
> WSGIProcessGroup encoded
> WSGIApplicationGroup %{GLOBAL}
> WSGIPassAuthorization On
> Header edit X-Stats ^ "%D&"
> Order deny,allow
> Allow from all
> </Directory>
>
> Example response headers with append instead of edit:
>
> X-Stats:
> db_count=2&db_time=10138&es_count=1&es_time=14927&queue_begin=1380077896713622&queue_time=2312&wsgi_begin=1380077896715934&wsgi_end=1380077896818668&wsgi_time=102734
> X-Stats: D=105536
>
> Thinking this through again while writing the post, I suppose %D is not
> terribly interesting at header generation time as it can only include the
> transfer time when logged.
>
> Laurence
>
> --
> You received this message because you are subscribed to the Google Groups
> "modwsgi" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected] <javascript:>.
> To post to this group, send email to [email protected] <javascript:>
> .
> Visit this group at http://groups.google.com/group/modwsgi.
> For more options, visit https://groups.google.com/groups/opt_out.
>
>
>
--
You received this message because you are subscribed to the Google Groups
"modwsgi" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/modwsgi.
For more options, visit https://groups.google.com/groups/opt_out.