You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@trafficserver.apache.org by "Uri Shachar (Created) (JIRA)" <ji...@apache.org> on 2012/01/16 01:31:39 UTC

[jira] [Created] (TS-1079) Add an API function to turn debugging on for specific transactions/sessions

Add an API function to turn debugging on for specific transactions/sessions
---------------------------------------------------------------------------

                 Key: TS-1079
                 URL: https://issues.apache.org/jira/browse/TS-1079
             Project: Traffic Server
          Issue Type: Improvement
          Components: Core, HTTP
            Reporter: Uri Shachar
            Priority: Minor


      When attempting to troubleshoot issues on a production ATS system, it is often impossible/difficult to turn on any of the 'high-volume' debug tags like http due to the performance impact.
 
This enhancement allows a plugin to set a debug flag for a specific txn/ssn, and replaces some of the internal Debug calls with a new function that checks if the flag is turned on, and outputs the debug line regardless of the tag if it is (The diags enable/disable flag is still taken into account).
The API will also have TSDebugSpecific in order to allow plugins to use the same functionality.

In addition, we might consider adding an internal config file (remap-like) to allow turning this flag on without plugin intervention.
 

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (TS-1079) Add an API function to turn debugging on for specific transactions/sessions

Posted by "Uri Shachar (Commented) (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/TS-1079?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13242822#comment-13242822 ] 

Uri Shachar commented on TS-1079:
---------------------------------

I've retested the perf a couple of times -- can't see any significant change (Tested with debug enabled and disabled).
                
> Add an API function to turn debugging on for specific transactions/sessions
> ---------------------------------------------------------------------------
>
>                 Key: TS-1079
>                 URL: https://issues.apache.org/jira/browse/TS-1079
>             Project: Traffic Server
>          Issue Type: Improvement
>          Components: Core, HTTP
>            Reporter: Uri Shachar
>            Assignee: Leif Hedstrom
>            Priority: Minor
>             Fix For: 3.1.4
>
>         Attachments: debug_specific.patch, debug_specific_2.patch, debug_specific_3.patch, debug_specific_4.patch
>
>   Original Estimate: 72h
>  Remaining Estimate: 72h
>
>       When attempting to troubleshoot issues on a production ATS system, it is often impossible/difficult to turn on any of the 'high-volume' debug tags like http due to the performance impact.
>  
> This enhancement allows a plugin to set a debug flag for a specific txn/ssn, and replaces some of the internal Debug calls with a new function that checks if the flag is turned on, and outputs the debug line regardless of the tag if it is (The diags enable/disable flag is still taken into account).
> The API will also have TSDebugSpecific in order to allow plugins to use the same functionality.
> In addition, we might consider adding an internal config file (remap-like) to allow turning this flag on without plugin intervention.
>  

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (TS-1079) Add an API function to turn debugging on for specific transactions/sessions

Posted by "Uri Shachar (Commented) (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/TS-1079?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13198639#comment-13198639 ] 

Uri Shachar commented on TS-1079:
---------------------------------

Yes, the next step is to change some Debug calls in the core. I plan to go through the HttpSM/HttpTransact/HttpClientSession files and change every possible Debug call to use DebugSpecific...
Any thoughts regarding adding an internal config file (remap-like) to allow turning this flag on without plugin intervention?

                
> Add an API function to turn debugging on for specific transactions/sessions
> ---------------------------------------------------------------------------
>
>                 Key: TS-1079
>                 URL: https://issues.apache.org/jira/browse/TS-1079
>             Project: Traffic Server
>          Issue Type: Improvement
>          Components: Core, HTTP
>            Reporter: Uri Shachar
>            Priority: Minor
>         Attachments: debug_specific.patch
>
>   Original Estimate: 72h
>  Remaining Estimate: 72h
>
>       When attempting to troubleshoot issues on a production ATS system, it is often impossible/difficult to turn on any of the 'high-volume' debug tags like http due to the performance impact.
>  
> This enhancement allows a plugin to set a debug flag for a specific txn/ssn, and replaces some of the internal Debug calls with a new function that checks if the flag is turned on, and outputs the debug line regardless of the tag if it is (The diags enable/disable flag is still taken into account).
> The API will also have TSDebugSpecific in order to allow plugins to use the same functionality.
> In addition, we might consider adding an internal config file (remap-like) to allow turning this flag on without plugin intervention.
>  

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Assigned] (TS-1079) Add an API function to turn debugging on for specific transactions/sessions

Posted by "Leif Hedstrom (Assigned) (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/TS-1079?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Leif Hedstrom reassigned TS-1079:
---------------------------------

    Assignee: Leif Hedstrom
    
> Add an API function to turn debugging on for specific transactions/sessions
> ---------------------------------------------------------------------------
>
>                 Key: TS-1079
>                 URL: https://issues.apache.org/jira/browse/TS-1079
>             Project: Traffic Server
>          Issue Type: Improvement
>          Components: Core, HTTP
>            Reporter: Uri Shachar
>            Assignee: Leif Hedstrom
>            Priority: Minor
>             Fix For: 3.1.4
>
>         Attachments: debug_specific.patch, debug_specific_2.patch, debug_specific_3.patch
>
>   Original Estimate: 72h
>  Remaining Estimate: 72h
>
>       When attempting to troubleshoot issues on a production ATS system, it is often impossible/difficult to turn on any of the 'high-volume' debug tags like http due to the performance impact.
>  
> This enhancement allows a plugin to set a debug flag for a specific txn/ssn, and replaces some of the internal Debug calls with a new function that checks if the flag is turned on, and outputs the debug line regardless of the tag if it is (The diags enable/disable flag is still taken into account).
> The API will also have TSDebugSpecific in order to allow plugins to use the same functionality.
> In addition, we might consider adding an internal config file (remap-like) to allow turning this flag on without plugin intervention.
>  

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (TS-1079) Add an API function to turn debugging on for specific transactions/sessions

Posted by "James Peach (Commented) (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/TS-1079?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13247983#comment-13247983 ] 

James Peach commented on TS-1079:
---------------------------------

My 2c ....

When adding new TSAPI, please review on the dev@ list before committing. If the debug flag is just a flag, then it should be bool; if it's intended to grow other values, it should be unsigned.

Why does TSDebugSpecific() need the debug_flag parameter?

s/messeges/messages/
                
> Add an API function to turn debugging on for specific transactions/sessions
> ---------------------------------------------------------------------------
>
>                 Key: TS-1079
>                 URL: https://issues.apache.org/jira/browse/TS-1079
>             Project: Traffic Server
>          Issue Type: Improvement
>          Components: Core, HTTP
>            Reporter: Uri Shachar
>            Assignee: Leif Hedstrom
>            Priority: Minor
>             Fix For: 3.1.4
>
>         Attachments: debug_specific.patch, debug_specific_2.patch, debug_specific_3.patch, debug_specific_4.patch
>
>   Original Estimate: 72h
>  Remaining Estimate: 72h
>
>       When attempting to troubleshoot issues on a production ATS system, it is often impossible/difficult to turn on any of the 'high-volume' debug tags like http due to the performance impact.
>  
> This enhancement allows a plugin to set a debug flag for a specific txn/ssn, and replaces some of the internal Debug calls with a new function that checks if the flag is turned on, and outputs the debug line regardless of the tag if it is (The diags enable/disable flag is still taken into account).
> The API will also have TSDebugSpecific in order to allow plugins to use the same functionality.
> In addition, we might consider adding an internal config file (remap-like) to allow turning this flag on without plugin intervention.
>  

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Updated] (TS-1079) Add an API function to turn debugging on for specific transactions/sessions

Posted by "Leif Hedstrom (Updated) (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/TS-1079?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Leif Hedstrom updated TS-1079:
------------------------------

    Fix Version/s: 3.1.4
    
> Add an API function to turn debugging on for specific transactions/sessions
> ---------------------------------------------------------------------------
>
>                 Key: TS-1079
>                 URL: https://issues.apache.org/jira/browse/TS-1079
>             Project: Traffic Server
>          Issue Type: Improvement
>          Components: Core, HTTP
>            Reporter: Uri Shachar
>            Priority: Minor
>             Fix For: 3.1.4
>
>         Attachments: debug_specific.patch
>
>   Original Estimate: 72h
>  Remaining Estimate: 72h
>
>       When attempting to troubleshoot issues on a production ATS system, it is often impossible/difficult to turn on any of the 'high-volume' debug tags like http due to the performance impact.
>  
> This enhancement allows a plugin to set a debug flag for a specific txn/ssn, and replaces some of the internal Debug calls with a new function that checks if the flag is turned on, and outputs the debug line regardless of the tag if it is (The diags enable/disable flag is still taken into account).
> The API will also have TSDebugSpecific in order to allow plugins to use the same functionality.
> In addition, we might consider adding an internal config file (remap-like) to allow turning this flag on without plugin intervention.
>  

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (TS-1079) Add an API function to turn debugging on for specific transactions/sessions

Posted by "Leif Hedstrom (Commented) (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/TS-1079?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13248161#comment-13248161 ] 

Leif Hedstrom commented on TS-1079:
-----------------------------------

If I understand the original design correctly, the idea was that DebugSpecific() would work just like the old Debug() when not being "specific". But when enabled e.g. in a transaction or session, it would override the "global" defaults. So when the flag is true, it will always print the debug info, but when false it depends on whatever the global diags flag is.

The public TSDebugSpecific() API follows the same pattern as the core version I assume. Meaning, a plugin can now call TSDebugSpecific() in a way that it uses the global diagnostics settings when false, but forcing the Debug() when true. This seems generally useful to me.
                
> Add an API function to turn debugging on for specific transactions/sessions
> ---------------------------------------------------------------------------
>
>                 Key: TS-1079
>                 URL: https://issues.apache.org/jira/browse/TS-1079
>             Project: Traffic Server
>          Issue Type: Improvement
>          Components: Core, HTTP
>            Reporter: Uri Shachar
>            Assignee: Leif Hedstrom
>            Priority: Minor
>             Fix For: 3.1.4
>
>         Attachments: debug_specific.patch, debug_specific_2.patch, debug_specific_3.patch, debug_specific_4.patch
>
>   Original Estimate: 72h
>  Remaining Estimate: 72h
>
>       When attempting to troubleshoot issues on a production ATS system, it is often impossible/difficult to turn on any of the 'high-volume' debug tags like http due to the performance impact.
>  
> This enhancement allows a plugin to set a debug flag for a specific txn/ssn, and replaces some of the internal Debug calls with a new function that checks if the flag is turned on, and outputs the debug line regardless of the tag if it is (The diags enable/disable flag is still taken into account).
> The API will also have TSDebugSpecific in order to allow plugins to use the same functionality.
> In addition, we might consider adding an internal config file (remap-like) to allow turning this flag on without plugin intervention.
>  

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Updated] (TS-1079) Add an API function to turn debugging on for specific transactions/sessions

Posted by "Uri Shachar (Updated) (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/TS-1079?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Uri Shachar updated TS-1079:
----------------------------

    Attachment: debug_specific.patch

Initial patch -- requires more work. I just want to get some feedback before I go ahead.
                
> Add an API function to turn debugging on for specific transactions/sessions
> ---------------------------------------------------------------------------
>
>                 Key: TS-1079
>                 URL: https://issues.apache.org/jira/browse/TS-1079
>             Project: Traffic Server
>          Issue Type: Improvement
>          Components: Core, HTTP
>            Reporter: Uri Shachar
>            Priority: Minor
>         Attachments: debug_specific.patch
>
>   Original Estimate: 72h
>  Remaining Estimate: 72h
>
>       When attempting to troubleshoot issues on a production ATS system, it is often impossible/difficult to turn on any of the 'high-volume' debug tags like http due to the performance impact.
>  
> This enhancement allows a plugin to set a debug flag for a specific txn/ssn, and replaces some of the internal Debug calls with a new function that checks if the flag is turned on, and outputs the debug line regardless of the tag if it is (The diags enable/disable flag is still taken into account).
> The API will also have TSDebugSpecific in order to allow plugins to use the same functionality.
> In addition, we might consider adding an internal config file (remap-like) to allow turning this flag on without plugin intervention.
>  

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (TS-1079) Add an API function to turn debugging on for specific transactions/sessions

Posted by "Leif Hedstrom (Commented) (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/TS-1079?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13241886#comment-13241886 ] 

Leif Hedstrom commented on TS-1079:
-----------------------------------

Is the last patch missing a ts/ts.h.in change set?

Also, what are the expectations on performance here?
                
> Add an API function to turn debugging on for specific transactions/sessions
> ---------------------------------------------------------------------------
>
>                 Key: TS-1079
>                 URL: https://issues.apache.org/jira/browse/TS-1079
>             Project: Traffic Server
>          Issue Type: Improvement
>          Components: Core, HTTP
>            Reporter: Uri Shachar
>            Assignee: Leif Hedstrom
>            Priority: Minor
>             Fix For: 3.1.4
>
>         Attachments: debug_specific.patch, debug_specific_2.patch, debug_specific_3.patch
>
>   Original Estimate: 72h
>  Remaining Estimate: 72h
>
>       When attempting to troubleshoot issues on a production ATS system, it is often impossible/difficult to turn on any of the 'high-volume' debug tags like http due to the performance impact.
>  
> This enhancement allows a plugin to set a debug flag for a specific txn/ssn, and replaces some of the internal Debug calls with a new function that checks if the flag is turned on, and outputs the debug line regardless of the tag if it is (The diags enable/disable flag is still taken into account).
> The API will also have TSDebugSpecific in order to allow plugins to use the same functionality.
> In addition, we might consider adding an internal config file (remap-like) to allow turning this flag on without plugin intervention.
>  

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Issue Comment Edited] (TS-1079) Add an API function to turn debugging on for specific transactions/sessions

Posted by "Leif Hedstrom (Issue Comment Edited) (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/TS-1079?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13248161#comment-13248161 ] 

Leif Hedstrom edited comment on TS-1079 at 4/6/12 7:47 AM:
-----------------------------------------------------------

If I understand the original design correctly, the idea was that DebugSpecific() would work just like the old Debug() when not being "specific". But when enabled e.g. in a transaction or session, it would override the "global" defaults. So when the flag is true, it will always print the debug info, but when false it depends on whatever the global diags settings are.

The public TSDebugSpecific() API follows the same pattern as the core version I assume. Meaning, a plugin can now call TSDebugSpecific() in a way that it uses the global diagnostics settings when false, but forcing the Debug() when true. This seems generally useful to me.
                
      was (Author: zwoop):
    If I understand the original design correctly, the idea was that DebugSpecific() would work just like the old Debug() when not being "specific". But when enabled e.g. in a transaction or session, it would override the "global" defaults. So when the flag is true, it will always print the debug info, but when false it depends on whatever the global diags flag is.

The public TSDebugSpecific() API follows the same pattern as the core version I assume. Meaning, a plugin can now call TSDebugSpecific() in a way that it uses the global diagnostics settings when false, but forcing the Debug() when true. This seems generally useful to me.
                  
> Add an API function to turn debugging on for specific transactions/sessions
> ---------------------------------------------------------------------------
>
>                 Key: TS-1079
>                 URL: https://issues.apache.org/jira/browse/TS-1079
>             Project: Traffic Server
>          Issue Type: Improvement
>          Components: Core, HTTP
>            Reporter: Uri Shachar
>            Assignee: Leif Hedstrom
>            Priority: Minor
>             Fix For: 3.1.4
>
>         Attachments: debug_specific.patch, debug_specific_2.patch, debug_specific_3.patch, debug_specific_4.patch
>
>   Original Estimate: 72h
>  Remaining Estimate: 72h
>
>       When attempting to troubleshoot issues on a production ATS system, it is often impossible/difficult to turn on any of the 'high-volume' debug tags like http due to the performance impact.
>  
> This enhancement allows a plugin to set a debug flag for a specific txn/ssn, and replaces some of the internal Debug calls with a new function that checks if the flag is turned on, and outputs the debug line regardless of the tag if it is (The diags enable/disable flag is still taken into account).
> The API will also have TSDebugSpecific in order to allow plugins to use the same functionality.
> In addition, we might consider adding an internal config file (remap-like) to allow turning this flag on without plugin intervention.
>  

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Updated] (TS-1079) Add an API function to turn debugging on for specific transactions/sessions

Posted by "Uri Shachar (Updated) (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/TS-1079?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Uri Shachar updated TS-1079:
----------------------------

    Attachment: debug_specific_3.patch

Rabased patch to current HEAD
                
> Add an API function to turn debugging on for specific transactions/sessions
> ---------------------------------------------------------------------------
>
>                 Key: TS-1079
>                 URL: https://issues.apache.org/jira/browse/TS-1079
>             Project: Traffic Server
>          Issue Type: Improvement
>          Components: Core, HTTP
>            Reporter: Uri Shachar
>            Priority: Minor
>             Fix For: 3.1.4
>
>         Attachments: debug_specific.patch, debug_specific_2.patch, debug_specific_3.patch
>
>   Original Estimate: 72h
>  Remaining Estimate: 72h
>
>       When attempting to troubleshoot issues on a production ATS system, it is often impossible/difficult to turn on any of the 'high-volume' debug tags like http due to the performance impact.
>  
> This enhancement allows a plugin to set a debug flag for a specific txn/ssn, and replaces some of the internal Debug calls with a new function that checks if the flag is turned on, and outputs the debug line regardless of the tag if it is (The diags enable/disable flag is still taken into account).
> The API will also have TSDebugSpecific in order to allow plugins to use the same functionality.
> In addition, we might consider adding an internal config file (remap-like) to allow turning this flag on without plugin intervention.
>  

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (TS-1079) Add an API function to turn debugging on for specific transactions/sessions

Posted by "Igor Galić (Commented JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/TS-1079?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13249595#comment-13249595 ] 

Igor Galić commented on TS-1079:
--------------------------------

sounds familiar. Like... something I could've said.. On IRC. ;)
                
> Add an API function to turn debugging on for specific transactions/sessions
> ---------------------------------------------------------------------------
>
>                 Key: TS-1079
>                 URL: https://issues.apache.org/jira/browse/TS-1079
>             Project: Traffic Server
>          Issue Type: Improvement
>          Components: Core, HTTP
>            Reporter: Uri Shachar
>            Assignee: Leif Hedstrom
>            Priority: Minor
>             Fix For: 3.1.4
>
>         Attachments: debug_specific.patch, debug_specific_2.patch, debug_specific_3.patch, debug_specific_4.patch
>
>   Original Estimate: 72h
>  Remaining Estimate: 72h
>
>       When attempting to troubleshoot issues on a production ATS system, it is often impossible/difficult to turn on any of the 'high-volume' debug tags like http due to the performance impact.
>  
> This enhancement allows a plugin to set a debug flag for a specific txn/ssn, and replaces some of the internal Debug calls with a new function that checks if the flag is turned on, and outputs the debug line regardless of the tag if it is (The diags enable/disable flag is still taken into account).
> The API will also have TSDebugSpecific in order to allow plugins to use the same functionality.
> In addition, we might consider adding an internal config file (remap-like) to allow turning this flag on without plugin intervention.
>  

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

       

[jira] [Commented] (TS-1079) Add an API function to turn debugging on for specific transactions/sessions

Posted by "Uri Shachar (Commented) (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/TS-1079?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13186633#comment-13186633 ] 

Uri Shachar commented on TS-1079:
---------------------------------

As far as I can tell, there is no point in the E/DClosure objects anymore. ATS requires GCC > 4 for all compilation environments, and it includes variadic argument macro support with ##__VA_ARGS__ that deletes the final comma if no arguments are provided. Am I missing something?
                
> Add an API function to turn debugging on for specific transactions/sessions
> ---------------------------------------------------------------------------
>
>                 Key: TS-1079
>                 URL: https://issues.apache.org/jira/browse/TS-1079
>             Project: Traffic Server
>          Issue Type: Improvement
>          Components: Core, HTTP
>            Reporter: Uri Shachar
>            Priority: Minor
>         Attachments: debug_specific.patch
>
>   Original Estimate: 72h
>  Remaining Estimate: 72h
>
>       When attempting to troubleshoot issues on a production ATS system, it is often impossible/difficult to turn on any of the 'high-volume' debug tags like http due to the performance impact.
>  
> This enhancement allows a plugin to set a debug flag for a specific txn/ssn, and replaces some of the internal Debug calls with a new function that checks if the flag is turned on, and outputs the debug line regardless of the tag if it is (The diags enable/disable flag is still taken into account).
> The API will also have TSDebugSpecific in order to allow plugins to use the same functionality.
> In addition, we might consider adding an internal config file (remap-like) to allow turning this flag on without plugin intervention.
>  

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (TS-1079) Add an API function to turn debugging on for specific transactions/sessions

Posted by "Uri Shachar (Commented) (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/TS-1079?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13227035#comment-13227035 ] 

Uri Shachar commented on TS-1079:
---------------------------------

Patch includes a 'not pretty' macro in HttpSM.cc/HttpTransact.cc/HttpClientSession.cc to make debug lines shorter. It would be a lot prettier if we didn't have to support all sorts of compilers -- doing something like:
{code:title=HttpSM.cc|borderStyle=solid}
#define DebugSM(tag, format, ...) DebugSpecific(debug_on, tag, "[%" PRId64 "] "format, sm_id, ##__VA_ARGS__)
{code} 
Would look nicer and ensure debug lines are more consistent -- but isn't possible without a whole bunch of ifdefs when trying to support a lot of different compilers.
Maybe I should raise this in the mailing list...
/rant
                
> Add an API function to turn debugging on for specific transactions/sessions
> ---------------------------------------------------------------------------
>
>                 Key: TS-1079
>                 URL: https://issues.apache.org/jira/browse/TS-1079
>             Project: Traffic Server
>          Issue Type: Improvement
>          Components: Core, HTTP
>            Reporter: Uri Shachar
>            Priority: Minor
>             Fix For: 3.1.6
>
>         Attachments: debug_specific.patch, debug_specific_2.patch
>
>   Original Estimate: 72h
>  Remaining Estimate: 72h
>
>       When attempting to troubleshoot issues on a production ATS system, it is often impossible/difficult to turn on any of the 'high-volume' debug tags like http due to the performance impact.
>  
> This enhancement allows a plugin to set a debug flag for a specific txn/ssn, and replaces some of the internal Debug calls with a new function that checks if the flag is turned on, and outputs the debug line regardless of the tag if it is (The diags enable/disable flag is still taken into account).
> The API will also have TSDebugSpecific in order to allow plugins to use the same functionality.
> In addition, we might consider adding an internal config file (remap-like) to allow turning this flag on without plugin intervention.
>  

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (TS-1079) Add an API function to turn debugging on for specific transactions/sessions

Posted by "James Peach (Commented) (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/TS-1079?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13249589#comment-13249589 ] 

James Peach commented on TS-1079:
---------------------------------

WRT bool: yep you are correct.

WRT: TSDebugSpecific(), I think I'd prefer the caller to test TSHttpTxnDebugGet(), but that's arguably a matter of taste.

Could you post the specific API proposal (i.e. the ts.h diff and rationale) to the dev@ list so that it can get a wider review?

That said, I think this is a useful change and would like to see this in for 3.2.
                
> Add an API function to turn debugging on for specific transactions/sessions
> ---------------------------------------------------------------------------
>
>                 Key: TS-1079
>                 URL: https://issues.apache.org/jira/browse/TS-1079
>             Project: Traffic Server
>          Issue Type: Improvement
>          Components: Core, HTTP
>            Reporter: Uri Shachar
>            Assignee: Leif Hedstrom
>            Priority: Minor
>             Fix For: 3.1.4
>
>         Attachments: debug_specific.patch, debug_specific_2.patch, debug_specific_3.patch, debug_specific_4.patch
>
>   Original Estimate: 72h
>  Remaining Estimate: 72h
>
>       When attempting to troubleshoot issues on a production ATS system, it is often impossible/difficult to turn on any of the 'high-volume' debug tags like http due to the performance impact.
>  
> This enhancement allows a plugin to set a debug flag for a specific txn/ssn, and replaces some of the internal Debug calls with a new function that checks if the flag is turned on, and outputs the debug line regardless of the tag if it is (The diags enable/disable flag is still taken into account).
> The API will also have TSDebugSpecific in order to allow plugins to use the same functionality.
> In addition, we might consider adding an internal config file (remap-like) to allow turning this flag on without plugin intervention.
>  

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Updated] (TS-1079) Add an API function to turn debugging on for specific transactions/sessions

Posted by "Uri Shachar (Updated) (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/TS-1079?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Uri Shachar updated TS-1079:
----------------------------

    Attachment: debug_specific_2.patch

Updated patch, includes updating HttpSM, HttpClientSession and HttpTransact to use the new debug function.
No impact on perf.
                
> Add an API function to turn debugging on for specific transactions/sessions
> ---------------------------------------------------------------------------
>
>                 Key: TS-1079
>                 URL: https://issues.apache.org/jira/browse/TS-1079
>             Project: Traffic Server
>          Issue Type: Improvement
>          Components: Core, HTTP
>            Reporter: Uri Shachar
>            Priority: Minor
>             Fix For: 3.1.6
>
>         Attachments: debug_specific.patch, debug_specific_2.patch
>
>   Original Estimate: 72h
>  Remaining Estimate: 72h
>
>       When attempting to troubleshoot issues on a production ATS system, it is often impossible/difficult to turn on any of the 'high-volume' debug tags like http due to the performance impact.
>  
> This enhancement allows a plugin to set a debug flag for a specific txn/ssn, and replaces some of the internal Debug calls with a new function that checks if the flag is turned on, and outputs the debug line regardless of the tag if it is (The diags enable/disable flag is still taken into account).
> The API will also have TSDebugSpecific in order to allow plugins to use the same functionality.
> In addition, we might consider adding an internal config file (remap-like) to allow turning this flag on without plugin intervention.
>  

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (TS-1079) Add an API function to turn debugging on for specific transactions/sessions

Posted by "Leif Hedstrom (Commented) (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/TS-1079?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13192467#comment-13192467 ] 

Leif Hedstrom commented on TS-1079:
-----------------------------------

The patch looks good to me. And yes, I agree, we require gcc (or compatible) > 4.1 I think (to simplify atomic support). I'm fine with cleanup (getting rid of old crud is good).

I'm assuming the next step is for you to change some (select) Debug() invocations in the core? How do you plan to decide which ones are useful or not?
                
> Add an API function to turn debugging on for specific transactions/sessions
> ---------------------------------------------------------------------------
>
>                 Key: TS-1079
>                 URL: https://issues.apache.org/jira/browse/TS-1079
>             Project: Traffic Server
>          Issue Type: Improvement
>          Components: Core, HTTP
>            Reporter: Uri Shachar
>            Priority: Minor
>         Attachments: debug_specific.patch
>
>   Original Estimate: 72h
>  Remaining Estimate: 72h
>
>       When attempting to troubleshoot issues on a production ATS system, it is often impossible/difficult to turn on any of the 'high-volume' debug tags like http due to the performance impact.
>  
> This enhancement allows a plugin to set a debug flag for a specific txn/ssn, and replaces some of the internal Debug calls with a new function that checks if the flag is turned on, and outputs the debug line regardless of the tag if it is (The diags enable/disable flag is still taken into account).
> The API will also have TSDebugSpecific in order to allow plugins to use the same functionality.
> In addition, we might consider adding an internal config file (remap-like) to allow turning this flag on without plugin intervention.
>  

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Updated] (TS-1079) Add an API function to turn debugging on for specific transactions/sessions

Posted by "Uri Shachar (Updated) (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/TS-1079?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Uri Shachar updated TS-1079:
----------------------------

    Attachment: benchmarks.tgz

Uploaded benchmark results tarball
                
> Add an API function to turn debugging on for specific transactions/sessions
> ---------------------------------------------------------------------------
>
>                 Key: TS-1079
>                 URL: https://issues.apache.org/jira/browse/TS-1079
>             Project: Traffic Server
>          Issue Type: Improvement
>          Components: Core, HTTP
>            Reporter: Uri Shachar
>            Assignee: Leif Hedstrom
>            Priority: Minor
>             Fix For: 3.1.4
>
>         Attachments: benchmarks.tgz, debug_specific.patch, debug_specific_2.patch, debug_specific_3.patch, debug_specific_4.patch
>
>   Original Estimate: 72h
>  Remaining Estimate: 72h
>
>       When attempting to troubleshoot issues on a production ATS system, it is often impossible/difficult to turn on any of the 'high-volume' debug tags like http due to the performance impact.
>  
> This enhancement allows a plugin to set a debug flag for a specific txn/ssn, and replaces some of the internal Debug calls with a new function that checks if the flag is turned on, and outputs the debug line regardless of the tag if it is (The diags enable/disable flag is still taken into account).
> The API will also have TSDebugSpecific in order to allow plugins to use the same functionality.
> In addition, we might consider adding an internal config file (remap-like) to allow turning this flag on without plugin intervention.
>  

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (TS-1079) Add an API function to turn debugging on for specific transactions/sessions

Posted by "Leif Hedstrom (Commented) (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/TS-1079?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13241974#comment-13241974 ] 

Leif Hedstrom commented on TS-1079:
-----------------------------------

Fwiw, I measure about 4% slowdown or so.
                
> Add an API function to turn debugging on for specific transactions/sessions
> ---------------------------------------------------------------------------
>
>                 Key: TS-1079
>                 URL: https://issues.apache.org/jira/browse/TS-1079
>             Project: Traffic Server
>          Issue Type: Improvement
>          Components: Core, HTTP
>            Reporter: Uri Shachar
>            Assignee: Leif Hedstrom
>            Priority: Minor
>             Fix For: 3.1.4
>
>         Attachments: debug_specific.patch, debug_specific_2.patch, debug_specific_3.patch
>
>   Original Estimate: 72h
>  Remaining Estimate: 72h
>
>       When attempting to troubleshoot issues on a production ATS system, it is often impossible/difficult to turn on any of the 'high-volume' debug tags like http due to the performance impact.
>  
> This enhancement allows a plugin to set a debug flag for a specific txn/ssn, and replaces some of the internal Debug calls with a new function that checks if the flag is turned on, and outputs the debug line regardless of the tag if it is (The diags enable/disable flag is still taken into account).
> The API will also have TSDebugSpecific in order to allow plugins to use the same functionality.
> In addition, we might consider adding an internal config file (remap-like) to allow turning this flag on without plugin intervention.
>  

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (TS-1079) Add an API function to turn debugging on for specific transactions/sessions

Posted by "Igor Galić (Commented JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/TS-1079?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13249593#comment-13249593 ] 

Igor Galić commented on TS-1079:
--------------------------------

Uri, we already use C99 style {{inttypes.h}} and {{stdint.h}}
{{proxy/api/ts/ts.h}} already has an {{#include <stdint.h>}}, so I don't think it's a big issue to introduce {{stdbool.h}} as well..

Comments?
                
> Add an API function to turn debugging on for specific transactions/sessions
> ---------------------------------------------------------------------------
>
>                 Key: TS-1079
>                 URL: https://issues.apache.org/jira/browse/TS-1079
>             Project: Traffic Server
>          Issue Type: Improvement
>          Components: Core, HTTP
>            Reporter: Uri Shachar
>            Assignee: Leif Hedstrom
>            Priority: Minor
>             Fix For: 3.1.4
>
>         Attachments: debug_specific.patch, debug_specific_2.patch, debug_specific_3.patch, debug_specific_4.patch
>
>   Original Estimate: 72h
>  Remaining Estimate: 72h
>
>       When attempting to troubleshoot issues on a production ATS system, it is often impossible/difficult to turn on any of the 'high-volume' debug tags like http due to the performance impact.
>  
> This enhancement allows a plugin to set a debug flag for a specific txn/ssn, and replaces some of the internal Debug calls with a new function that checks if the flag is turned on, and outputs the debug line regardless of the tag if it is (The diags enable/disable flag is still taken into account).
> The API will also have TSDebugSpecific in order to allow plugins to use the same functionality.
> In addition, we might consider adding an internal config file (remap-like) to allow turning this flag on without plugin intervention.
>  

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

       

[jira] [Commented] (TS-1079) Add an API function to turn debugging on for specific transactions/sessions

Posted by "Uri Shachar (Commented) (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/TS-1079?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13250287#comment-13250287 ] 

Uri Shachar commented on TS-1079:
---------------------------------

I've tried a number of times to reproduce this degradation -- Very long benchmarks show a reproducible 0.4% drop, but that is almost an order of magnitude smaller then what you see... (I'm testing with proxy.config.diags.debug.enabled INT 0). I'll attach my results to the bug.

The only thing I could think of is the macro I added to HttpTransact.cc -- It adds a couple of pointer dereferences every debug line. I've tried removing it, but haven't seen any perf change.
Could you try benchmarking the patch without the changes to HttpTransact.cc/h? 

                
> Add an API function to turn debugging on for specific transactions/sessions
> ---------------------------------------------------------------------------
>
>                 Key: TS-1079
>                 URL: https://issues.apache.org/jira/browse/TS-1079
>             Project: Traffic Server
>          Issue Type: Improvement
>          Components: Core, HTTP
>            Reporter: Uri Shachar
>            Assignee: Leif Hedstrom
>            Priority: Minor
>             Fix For: 3.1.4
>
>         Attachments: debug_specific.patch, debug_specific_2.patch, debug_specific_3.patch, debug_specific_4.patch
>
>   Original Estimate: 72h
>  Remaining Estimate: 72h
>
>       When attempting to troubleshoot issues on a production ATS system, it is often impossible/difficult to turn on any of the 'high-volume' debug tags like http due to the performance impact.
>  
> This enhancement allows a plugin to set a debug flag for a specific txn/ssn, and replaces some of the internal Debug calls with a new function that checks if the flag is turned on, and outputs the debug line regardless of the tag if it is (The diags enable/disable flag is still taken into account).
> The API will also have TSDebugSpecific in order to allow plugins to use the same functionality.
> In addition, we might consider adding an internal config file (remap-like) to allow turning this flag on without plugin intervention.
>  

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Issue Comment Edited] (TS-1079) Add an API function to turn debugging on for specific transactions/sessions

Posted by "Uri Shachar (Issue Comment Edited) (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/TS-1079?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13250287#comment-13250287 ] 

Uri Shachar edited comment on TS-1079 at 4/10/12 1:05 PM:
----------------------------------------------------------

I've tried a number of times to reproduce this degradation -- Very long benchmarks show a reproducible 0.4% drop, but that is almost an order of magnitude smaller then what you see... (I'm testing with proxy.config.diags.debug.enabled INT 0). I'll attach my results to the bug.

The only thing I could think of is the macro I added to HttpTransact.cc -- It does a little extra work every debug line. I've tried removing it, but haven't seen any perf change.
Could you try benchmarking the patch without the changes to HttpTransact.cc/h? 

                
      was (Author: ushachar):
    I've tried a number of times to reproduce this degradation -- Very long benchmarks show a reproducible 0.4% drop, but that is almost an order of magnitude smaller then what you see... (I'm testing with proxy.config.diags.debug.enabled INT 0). I'll attach my results to the bug.

The only thing I could think of is the macro I added to HttpTransact.cc -- It adds a couple of pointer dereferences every debug line. I've tried removing it, but haven't seen any perf change.
Could you try benchmarking the patch without the changes to HttpTransact.cc/h? 

                  
> Add an API function to turn debugging on for specific transactions/sessions
> ---------------------------------------------------------------------------
>
>                 Key: TS-1079
>                 URL: https://issues.apache.org/jira/browse/TS-1079
>             Project: Traffic Server
>          Issue Type: Improvement
>          Components: Core, HTTP
>            Reporter: Uri Shachar
>            Assignee: Leif Hedstrom
>            Priority: Minor
>             Fix For: 3.1.4
>
>         Attachments: benchmarks.tgz, debug_specific.patch, debug_specific_2.patch, debug_specific_3.patch, debug_specific_4.patch
>
>   Original Estimate: 72h
>  Remaining Estimate: 72h
>
>       When attempting to troubleshoot issues on a production ATS system, it is often impossible/difficult to turn on any of the 'high-volume' debug tags like http due to the performance impact.
>  
> This enhancement allows a plugin to set a debug flag for a specific txn/ssn, and replaces some of the internal Debug calls with a new function that checks if the flag is turned on, and outputs the debug line regardless of the tag if it is (The diags enable/disable flag is still taken into account).
> The API will also have TSDebugSpecific in order to allow plugins to use the same functionality.
> In addition, we might consider adding an internal config file (remap-like) to allow turning this flag on without plugin intervention.
>  

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (TS-1079) Add an API function to turn debugging on for specific transactions/sessions

Posted by "Leif Hedstrom (Commented) (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/TS-1079?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13198837#comment-13198837 ] 

Leif Hedstrom commented on TS-1079:
-----------------------------------

Cool, I'll take a look at TS-1102 today (unless someone else beats me to it :). 

As for the API / remap: One possibility is to look at the APIs we added to support overriding records.config settings per transaction. It's a bit hacky, but works fairly well. The only caveat here is that it only works in places in the code where you have access to the HttpSM's "State". So that might be a problem for this?

If necessary, we could add another @ option to remap.config, but we tried to avoid that as much as possible with the new per-transaction records.config features (in fact, we removed 3 @ options after adding this feature).
                
> Add an API function to turn debugging on for specific transactions/sessions
> ---------------------------------------------------------------------------
>
>                 Key: TS-1079
>                 URL: https://issues.apache.org/jira/browse/TS-1079
>             Project: Traffic Server
>          Issue Type: Improvement
>          Components: Core, HTTP
>            Reporter: Uri Shachar
>            Priority: Minor
>         Attachments: debug_specific.patch
>
>   Original Estimate: 72h
>  Remaining Estimate: 72h
>
>       When attempting to troubleshoot issues on a production ATS system, it is often impossible/difficult to turn on any of the 'high-volume' debug tags like http due to the performance impact.
>  
> This enhancement allows a plugin to set a debug flag for a specific txn/ssn, and replaces some of the internal Debug calls with a new function that checks if the flag is turned on, and outputs the debug line regardless of the tag if it is (The diags enable/disable flag is still taken into account).
> The API will also have TSDebugSpecific in order to allow plugins to use the same functionality.
> In addition, we might consider adding an internal config file (remap-like) to allow turning this flag on without plugin intervention.
>  

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (TS-1079) Add an API function to turn debugging on for specific transactions/sessions

Posted by "Leif Hedstrom (Commented) (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/TS-1079?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13247958#comment-13247958 ] 

Leif Hedstrom commented on TS-1079:
-----------------------------------

I retested too, it's not hugely different, but somewhat noticeable:
{code}
tinkerballa (19:42) 256/0 $ ~/benchit.sh 120 300 100000
http_load  -parallel 120 -seconds 300 -keep_alive 100000 /tmp/URL
54287150 fetches on 726 conns, 360 max parallel, 5.428710E+07 bytes, in
300 seconds
1 mean bytes/fetch
180957.1 fetches/sec, 1.809571E+05 bytes/sec
msecs/connect: 0.640 mean, 3.281 max, 0.071 min
msecs/first-response: 1.448 mean, 274.149 max, 0.076 min

tinkerballa (19:55) 260/0 $ ~/benchit.sh 120 300 100000
http_load  -parallel 120 -seconds 300 -keep_alive 100000 /tmp/URL
52299871 fetches on 694 conns, 360 max parallel, 5.229990E+07 bytes, in 300 seconds
1 mean bytes/fetch
174332.8 fetches/sec, 1.743328E+05 bytes/sec
msecs/connect: 52.170 mean, 335.854 max, 0.065 min
msecs/first-response: 1.550 mean, 339.591 max, 0.077 min
{code}


The first is current trunk, the second is trunk + 1079. About 3.5% or so, enough to make me at least curious as to why?

I'm probably ok checking this in if you can't think of anything, but maybe we need to have a functional configure  option for those who really care to squeeze every ounce out of their system?
                
> Add an API function to turn debugging on for specific transactions/sessions
> ---------------------------------------------------------------------------
>
>                 Key: TS-1079
>                 URL: https://issues.apache.org/jira/browse/TS-1079
>             Project: Traffic Server
>          Issue Type: Improvement
>          Components: Core, HTTP
>            Reporter: Uri Shachar
>            Assignee: Leif Hedstrom
>            Priority: Minor
>             Fix For: 3.1.4
>
>         Attachments: debug_specific.patch, debug_specific_2.patch, debug_specific_3.patch, debug_specific_4.patch
>
>   Original Estimate: 72h
>  Remaining Estimate: 72h
>
>       When attempting to troubleshoot issues on a production ATS system, it is often impossible/difficult to turn on any of the 'high-volume' debug tags like http due to the performance impact.
>  
> This enhancement allows a plugin to set a debug flag for a specific txn/ssn, and replaces some of the internal Debug calls with a new function that checks if the flag is turned on, and outputs the debug line regardless of the tag if it is (The diags enable/disable flag is still taken into account).
> The API will also have TSDebugSpecific in order to allow plugins to use the same functionality.
> In addition, we might consider adding an internal config file (remap-like) to allow turning this flag on without plugin intervention.
>  

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Re: [jira] [Commented] (TS-1079) Add an API function to turn debugging on for specific transactions/sessions

Posted by Igor Galić <i....@brainsware.org>.

----- Original Message -----
> 
>     [
>     https://issues.apache.org/jira/browse/TS-1079?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13249594#comment-13249594
>     ]
> 
> Leif Hedstrom commented on TS-1079:
> -----------------------------------
> 
> Igor: I would stay away from stdbool for now honestly. Plus, making
> one API use bool and everything else use int is poor interface
> design. I'm totally fine revisiting this for v4.0, and do another
> round of (large) API improvements and changes.

sounds familiar. Like... something I could've said.. On IRC. ;)

> > Add an API function to turn debugging on for specific
> > transactions/sessions
> > ---------------------------------------------------------------------------
> >
> >                 Key: TS-1079
> >                 URL: https://issues.apache.org/jira/browse/TS-1079
> >             Project: Traffic Server
> >          Issue Type: Improvement
> >          Components: Core, HTTP
> >            Reporter: Uri Shachar
> >            Assignee: Leif Hedstrom
> >            Priority: Minor
> >             Fix For: 3.1.4
> >
> >         Attachments: debug_specific.patch, debug_specific_2.patch,
> >         debug_specific_3.patch, debug_specific_4.patch
> >
> >   Original Estimate: 72h
> >  Remaining Estimate: 72h
> >
> >       When attempting to troubleshoot issues on a production ATS
> >       system, it is often impossible/difficult to turn on any of
> >       the 'high-volume' debug tags like http due to the
> >       performance impact.
> >  
> > This enhancement allows a plugin to set a debug flag for a specific
> > txn/ssn, and replaces some of the internal Debug calls with a new
> > function that checks if the flag is turned on, and outputs the
> > debug line regardless of the tag if it is (The diags
> > enable/disable flag is still taken into account).
> > The API will also have TSDebugSpecific in order to allow plugins to
> > use the same functionality.
> > In addition, we might consider adding an internal config file
> > (remap-like) to allow turning this flag on without plugin
> > intervention.
> >  
> 
> --
> This message is automatically generated by JIRA.
> If you think it was sent incorrectly, please contact your JIRA
> administrators:
> https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
> For more information on JIRA, see:
> http://www.atlassian.com/software/jira
> 
>         
> 

-- 
Igor Galić

Tel: +43 (0) 664 886 22 883
Mail: i.galic@brainsware.org
URL: http://brainsware.org/
GPG: 6880 4155 74BD FD7C B515  2EA5 4B1D 9E08 A097 C9AE


[jira] [Commented] (TS-1079) Add an API function to turn debugging on for specific transactions/sessions

Posted by "Leif Hedstrom (Commented) (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/TS-1079?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13249594#comment-13249594 ] 

Leif Hedstrom commented on TS-1079:
-----------------------------------

Igor: I would stay away from stdbool for now honestly. Plus, making one API use bool and everything else use int is poor interface design. I'm totally fine revisiting this for v4.0, and do another round of (large) API improvements and changes.
                
> Add an API function to turn debugging on for specific transactions/sessions
> ---------------------------------------------------------------------------
>
>                 Key: TS-1079
>                 URL: https://issues.apache.org/jira/browse/TS-1079
>             Project: Traffic Server
>          Issue Type: Improvement
>          Components: Core, HTTP
>            Reporter: Uri Shachar
>            Assignee: Leif Hedstrom
>            Priority: Minor
>             Fix For: 3.1.4
>
>         Attachments: debug_specific.patch, debug_specific_2.patch, debug_specific_3.patch, debug_specific_4.patch
>
>   Original Estimate: 72h
>  Remaining Estimate: 72h
>
>       When attempting to troubleshoot issues on a production ATS system, it is often impossible/difficult to turn on any of the 'high-volume' debug tags like http due to the performance impact.
>  
> This enhancement allows a plugin to set a debug flag for a specific txn/ssn, and replaces some of the internal Debug calls with a new function that checks if the flag is turned on, and outputs the debug line regardless of the tag if it is (The diags enable/disable flag is still taken into account).
> The API will also have TSDebugSpecific in order to allow plugins to use the same functionality.
> In addition, we might consider adding an internal config file (remap-like) to allow turning this flag on without plugin intervention.
>  

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (TS-1079) Add an API function to turn debugging on for specific transactions/sessions

Posted by "Uri Shachar (Commented) (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/TS-1079?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13198640#comment-13198640 ] 

Uri Shachar commented on TS-1079:
---------------------------------

I've created TS-1102 for the cleanup task. Once the patch there is merged into the trunk I'll upload an updated patch for this issue.
                
> Add an API function to turn debugging on for specific transactions/sessions
> ---------------------------------------------------------------------------
>
>                 Key: TS-1079
>                 URL: https://issues.apache.org/jira/browse/TS-1079
>             Project: Traffic Server
>          Issue Type: Improvement
>          Components: Core, HTTP
>            Reporter: Uri Shachar
>            Priority: Minor
>         Attachments: debug_specific.patch
>
>   Original Estimate: 72h
>  Remaining Estimate: 72h
>
>       When attempting to troubleshoot issues on a production ATS system, it is often impossible/difficult to turn on any of the 'high-volume' debug tags like http due to the performance impact.
>  
> This enhancement allows a plugin to set a debug flag for a specific txn/ssn, and replaces some of the internal Debug calls with a new function that checks if the flag is turned on, and outputs the debug line regardless of the tag if it is (The diags enable/disable flag is still taken into account).
> The API will also have TSDebugSpecific in order to allow plugins to use the same functionality.
> In addition, we might consider adding an internal config file (remap-like) to allow turning this flag on without plugin intervention.
>  

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (TS-1079) Add an API function to turn debugging on for specific transactions/sessions

Posted by "James Peach (Commented) (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/TS-1079?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13249591#comment-13249591 ] 

James Peach commented on TS-1079:
---------------------------------

Hmm, Leif convinced me that the caller can't do the test.
                
> Add an API function to turn debugging on for specific transactions/sessions
> ---------------------------------------------------------------------------
>
>                 Key: TS-1079
>                 URL: https://issues.apache.org/jira/browse/TS-1079
>             Project: Traffic Server
>          Issue Type: Improvement
>          Components: Core, HTTP
>            Reporter: Uri Shachar
>            Assignee: Leif Hedstrom
>            Priority: Minor
>             Fix For: 3.1.4
>
>         Attachments: debug_specific.patch, debug_specific_2.patch, debug_specific_3.patch, debug_specific_4.patch
>
>   Original Estimate: 72h
>  Remaining Estimate: 72h
>
>       When attempting to troubleshoot issues on a production ATS system, it is often impossible/difficult to turn on any of the 'high-volume' debug tags like http due to the performance impact.
>  
> This enhancement allows a plugin to set a debug flag for a specific txn/ssn, and replaces some of the internal Debug calls with a new function that checks if the flag is turned on, and outputs the debug line regardless of the tag if it is (The diags enable/disable flag is still taken into account).
> The API will also have TSDebugSpecific in order to allow plugins to use the same functionality.
> In addition, we might consider adding an internal config file (remap-like) to allow turning this flag on without plugin intervention.
>  

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Updated] (TS-1079) Add an API function to turn debugging on for specific transactions/sessions

Posted by "Uri Shachar (Updated) (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/TS-1079?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Uri Shachar updated TS-1079:
----------------------------

    Attachment: debug_specific_4.patch

This time including the ts.h.in changes...
                
> Add an API function to turn debugging on for specific transactions/sessions
> ---------------------------------------------------------------------------
>
>                 Key: TS-1079
>                 URL: https://issues.apache.org/jira/browse/TS-1079
>             Project: Traffic Server
>          Issue Type: Improvement
>          Components: Core, HTTP
>            Reporter: Uri Shachar
>            Assignee: Leif Hedstrom
>            Priority: Minor
>             Fix For: 3.1.4
>
>         Attachments: debug_specific.patch, debug_specific_2.patch, debug_specific_3.patch, debug_specific_4.patch
>
>   Original Estimate: 72h
>  Remaining Estimate: 72h
>
>       When attempting to troubleshoot issues on a production ATS system, it is often impossible/difficult to turn on any of the 'high-volume' debug tags like http due to the performance impact.
>  
> This enhancement allows a plugin to set a debug flag for a specific txn/ssn, and replaces some of the internal Debug calls with a new function that checks if the flag is turned on, and outputs the debug line regardless of the tag if it is (The diags enable/disable flag is still taken into account).
> The API will also have TSDebugSpecific in order to allow plugins to use the same functionality.
> In addition, we might consider adding an internal config file (remap-like) to allow turning this flag on without plugin intervention.
>  

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (TS-1079) Add an API function to turn debugging on for specific transactions/sessions

Posted by "Leif Hedstrom (Commented) (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/TS-1079?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13192465#comment-13192465 ] 

Leif Hedstrom commented on TS-1079:
-----------------------------------

The patch looks good to me. And yes, I agree, we require gcc (or compatible) > 4.1 I think (to simplify atomic support). I'm fine with cleanup (getting rid of old crud is good).

I'm assuming the next step is for you to change some (select) Debug() invocations in the core? How do you plan to decide which ones are useful or not?
                
> Add an API function to turn debugging on for specific transactions/sessions
> ---------------------------------------------------------------------------
>
>                 Key: TS-1079
>                 URL: https://issues.apache.org/jira/browse/TS-1079
>             Project: Traffic Server
>          Issue Type: Improvement
>          Components: Core, HTTP
>            Reporter: Uri Shachar
>            Priority: Minor
>         Attachments: debug_specific.patch
>
>   Original Estimate: 72h
>  Remaining Estimate: 72h
>
>       When attempting to troubleshoot issues on a production ATS system, it is often impossible/difficult to turn on any of the 'high-volume' debug tags like http due to the performance impact.
>  
> This enhancement allows a plugin to set a debug flag for a specific txn/ssn, and replaces some of the internal Debug calls with a new function that checks if the flag is turned on, and outputs the debug line regardless of the tag if it is (The diags enable/disable flag is still taken into account).
> The API will also have TSDebugSpecific in order to allow plugins to use the same functionality.
> In addition, we might consider adding an internal config file (remap-like) to allow turning this flag on without plugin intervention.
>  

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (TS-1079) Add an API function to turn debugging on for specific transactions/sessions

Posted by "Uri Shachar (Commented) (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/TS-1079?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13249542#comment-13249542 ] 

Uri Shachar commented on TS-1079:
---------------------------------

@James:
Regarding bool/int: No other function in ts.h.in uses bool (TSHttpTxnPrivateSessionSet,  TSHttpTxnClientKeepaliveSet, TSHttpTxnReqCacheableSet... all use ints) -- while C99 added bool types, I didn't want to create a new dependency.

Leif's explanation is correct about the design -- the idea is to allow plugins to do something like: 
TSDebugSpecifc(TSHttpTxnDebugGet(txn), "plugin_tag" , "Hello World from transaction %p", txn);
                
> Add an API function to turn debugging on for specific transactions/sessions
> ---------------------------------------------------------------------------
>
>                 Key: TS-1079
>                 URL: https://issues.apache.org/jira/browse/TS-1079
>             Project: Traffic Server
>          Issue Type: Improvement
>          Components: Core, HTTP
>            Reporter: Uri Shachar
>            Assignee: Leif Hedstrom
>            Priority: Minor
>             Fix For: 3.1.4
>
>         Attachments: debug_specific.patch, debug_specific_2.patch, debug_specific_3.patch, debug_specific_4.patch
>
>   Original Estimate: 72h
>  Remaining Estimate: 72h
>
>       When attempting to troubleshoot issues on a production ATS system, it is often impossible/difficult to turn on any of the 'high-volume' debug tags like http due to the performance impact.
>  
> This enhancement allows a plugin to set a debug flag for a specific txn/ssn, and replaces some of the internal Debug calls with a new function that checks if the flag is turned on, and outputs the debug line regardless of the tag if it is (The diags enable/disable flag is still taken into account).
> The API will also have TSDebugSpecific in order to allow plugins to use the same functionality.
> In addition, we might consider adding an internal config file (remap-like) to allow turning this flag on without plugin intervention.
>  

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (TS-1079) Add an API function to turn debugging on for specific transactions/sessions

Posted by "Leif Hedstrom (Commented) (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/TS-1079?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13236961#comment-13236961 ] 

Leif Hedstrom commented on TS-1079:
-----------------------------------

Uri, I get a few rejects on current trunk with the patch (not sure why, I didn't check). Any chance you can rebase with current trunk?
                
> Add an API function to turn debugging on for specific transactions/sessions
> ---------------------------------------------------------------------------
>
>                 Key: TS-1079
>                 URL: https://issues.apache.org/jira/browse/TS-1079
>             Project: Traffic Server
>          Issue Type: Improvement
>          Components: Core, HTTP
>            Reporter: Uri Shachar
>            Priority: Minor
>             Fix For: 3.1.6
>
>         Attachments: debug_specific.patch, debug_specific_2.patch
>
>   Original Estimate: 72h
>  Remaining Estimate: 72h
>
>       When attempting to troubleshoot issues on a production ATS system, it is often impossible/difficult to turn on any of the 'high-volume' debug tags like http due to the performance impact.
>  
> This enhancement allows a plugin to set a debug flag for a specific txn/ssn, and replaces some of the internal Debug calls with a new function that checks if the flag is turned on, and outputs the debug line regardless of the tag if it is (The diags enable/disable flag is still taken into account).
> The API will also have TSDebugSpecific in order to allow plugins to use the same functionality.
> In addition, we might consider adding an internal config file (remap-like) to allow turning this flag on without plugin intervention.
>  

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira