Hi Renaud,

This is a very interesting idea and I think it would certainly be worth
adding.

Let me just add some comments:

* Could you file a new issue for this extension instead of using
SLING-3, thanks.
* You should set the response header early in the request, because the
response might already be committed at the end of the request and the
header may not get through
* I would prefix the header name with "X-" to mark it as a non-standard
header
* I would make the root location for the persistence configurable (using
@scr.property tags). A default location would be below /var, eg.
/var/log/requestprogress
* The same holds for whether to persist or not. OTOH assumming
persistence in case of enabled debug log seems reasonable.
* Maybe you might want to consider creating a a log structure, because
you would be prepared to log a whole lot of logs.

Looking forward to see a patch.

Thanks and Regards
Felix

Renaud Richardet (JIRA) schrieb:
>      [ 
> https://issues.apache.org/jira/browse/SLING-3?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
>  ]
> 
> Renaud Richardet updated SLING-3:
> ---------------------------------
> 
>     Attachment: RequestProgressTrackerLogFilter.diff
> 
>> having trace information in HTML comments in the page itselft would make it 
>> much easier to understand how the page was generated
> 
> What about doing it in 2-steps:
> 
> 1) in RequestProgressTrackerLogFilter, save debug information (in a JCR 
> node), add debugId parameter in response
> 2) add small js script on html page that gets debug information via AJAX 
> (using debugId param)
> 
> Please see attached patch for a proof of concept. Let me know if you think 
> it's a valid approach, and I will produce a real patch.
> 
>> Use RequestProgressTracker to log request processing steps
>> ----------------------------------------------------------
>>
>>                 Key: SLING-3
>>                 URL: https://issues.apache.org/jira/browse/SLING-3
>>             Project: Sling
>>          Issue Type: Improvement
>>          Components: Engine, JCR Resource, Scripting, Scripting JSP, 
>> Servlets Resolver
>>            Reporter: Felix Meschberger
>>         Attachments: RequestProgressTrackerLogFilter.diff
>>
>>
>> The RequestProgressTacker interface defines an API which may be used to 
>> track the process of request processing. Parties taking part in request 
>> processing, most notably resource resolution, script and servlet resolution 
>> and also request filters should track their progress in the tracker.
> 

Reply via email to