SlideShare ist ein Scribd-Unternehmen logo
1 von 21
Zend Server 5.0 – Code Tracing
Cohen Tzahi – Product Manager                   Nov. 2009

To watch the webinar please go to:
http://www.zend.com/en/webinar/Server/webinar-code-
tracing-with-zserver5-a-flight-recorder-for-your-php-
applications-20091111.flv



                                                  © All rights reserved. Zend Technologies, Inc.
Zend Server 5.0

    • Faster problem resolution with code tracing
    • Better application performance with Job Queue
    • Support for the new PHP 5.3
    • Various fixes and minor enhancements




2                         © All rights reserved. Zend Technologies, Inc.
Why Developers Spend 30%-40%(!) of
    their Time on Problem Resolution

• Most problem resolution time is spent on identifying root cause
• Problem reproduction is often difficult and time-consuming
• Many moving parts – server load, input data, database state, etc.
• Some problems cannot be reproduced…



                  Root Cause Analysis
                 Root Cause Analysis
                 reproduce problem – debug                                  Fix
              reproduce problem – debug




3                          © All rights reserved. Zend Technologies, Inc.
Zend Server Code Tracing:
     Cuts Root Cause Analysis Time by up to 50%
     • Eliminates the need to reproduce problems
     • Records live application execution when problems occur
     • Activated through Zend Server monitoring rules or manually
     • Works in a live production environment or in a test lab


    Problem resolution time                   Root Cause Analysis
                                                                                             Fix
    without Code Tracing                  reproduce problem – debug




                          Problem resolution time                  Root Cause Analysis
                                                                                             Fix
                          with Code Tracing                             analyze code trace


4                                        © All rights reserved. Zend Technologies, Inc.
Code Tracing – Data Capture

    • Reproducing an issue is not always possible.
      Dependency on specific SESSION state.

      Dependency on specific database state.

      “Replaying” the request is risky or impossible.

    • Code Tracing can capture the entire execution flow.




5                           © All rights reserved. Zend Technologies, Inc.
Code Tracing – Data Capture

    Code Tracing captures the following information:
      Execution tree including function calls and included files.

      Function arguments and return parameters.

      Output and HTTP headers generation.

      Location of errors, exceptions and Zend Monitor events.

      For each node, execution time and memory usage is measured.




6                           © All rights reserved. Zend Technologies, Inc.
DVD-Like Playback of Application Problems

    • Opening a Trace File enables you to “playback” the
      request execution flow using two perspectives:
    • A Tree perspective: Pinpoint root
      cause by viewing the sequence of
      function calls.
      Highlights the critical path of
       functions execution flow (duration).
      Pinpoints events led up to an error.




7                             © All rights reserved. Zend Technologies, Inc.
DVD-Like Playback of Application Problems

    • A Statistics perspective: displays traced data from a
      function perspective.
      Execution time: aggregated and a break down of each function
        invocation.
      Memory consumption:
        aggregated and a break down
        of each function invocation.
      Total number of calls.




8                               © All rights reserved. Zend Technologies, Inc.
How to Generate Trace Data?
    Manually

    • Code Trace data can be generated as a result of a manual
      request or by a monitoring event.
    • Zend Server’s console (Monitor | Code Trace) page contains
      a “Trace URL” field and a “Trace” button.
      Typing a valid URL and clicking the “Trace” button, will execute
        the request while adding a unique parameter (“dump_data=1” )
        to the request.
      When Zend Server identifies the “dump_data=1” parameter, it
        generates a trace file for that request.




9                            © All rights reserved. Zend Technologies, Inc.
How to Generate Trace Data?
     Manually
      Trace Files are created and stored on the server where the URLs
       are executed on.




10                         © All rights reserved. Zend Technologies, Inc.
How to Generate Trace Data?
     Using Monitoring Rules

     • Code Tracing is tightly integrated with Zend Monitoring
       mechanism.
     • Monitoring rules supports two new actions:
       “Save code tracing” – when a monitoring event is generated,
         Zend Server will create a Trace file that captures the request’s
         execution flow.
       “Awake tracing” – when a monitoring event is generated, it will
         activate code tracing if it is running in standby mode.




11                            © All rights reserved. Zend Technologies, Inc.
Code Tracing – Operating modes
     • Code Tracing is a standard Zend Server extension, it can be
       turned on/off.
       Off – Trace files will not be generated.

       On –
           • Manual Trace files will be saved.
           • Trace files generated by Monitoring events will be saved according to
             the code tracing for monitoring settings.
             (Directive: zend_monitor.event_tracing_mode).




12                              © All rights reserved. Zend Technologies, Inc.
Code Tracing – Operating modes

     • Code Tracing for Monitoring Events : a Zend Monitoring
       parameter that controls whether Trace files will be created
       by Monitoring events.
       Active – When a monitoring rule with a “save trace” action is
         generated, trace data will be saved.
       Inactive – Trace data will not be saved regardless the events’
         actions.
       Standby - Trace data will not be saved, unless a monitoring event
         with an “Activation” action is generated. At that point, code
         tracing for monitoring is activated for a certain amount of time.




13                            © All rights reserved. Zend Technologies, Inc.
Code Tracing – Standby Mode


     Code Tracing for Monitoring Status:                     ACTIVE
                                                             STANDBY




        ACTIVE
                                                                                                                              Trace Files
                                                                                                                                Trace C
                                                                                                                                Trace D
                                                                                                                                Trace E

          Event A:       Event B:           Event C:              Event D:              Event E:           Event F:
          Save Trace     Activate           Save Trace            Save Trace            Save Trace         Save Trace
          Action         Trace Action       Action                Action                Action             Action
                         6 min



      Time
      (min)      00:00   00:01      00:02     00:03          00:04       00:05        00:06        00:07   00:08      00:09




14                                                       © All rights reserved. Zend Technologies, Inc.
Code Tracing Supported Workflows

     • Monitoring workflow:
       When a monitoring event is created, the associated trace data of
         the specific request is captured.
       Trace data is attached and associated to the monitoring event.

     • Manual tests/functional workflow:
       Manually through the GUI or from a browser by adding a
         parameter to the request.
     • Production workflow
       Can be activated automatically in case of a Zend Monitoring
         event, for example a PHP error, a slow execution or high memory
         usage.

15                            © All rights reserved. Zend Technologies, Inc.
Monitoring Workflow

     • Monitoring workflow is used when running automated/load
       tests in pre-production/staging or even for monitoring
       applications in production environments.
     • Zend Monitoring proactively alerts when critical problem
       occurs.
       Code Tracing can be associated to the Monitoring mechanism as
         an action of a Monitoring Rules.
       Enables to capture a complete execution flow only when
         problems occur.
       Trace data is associated to the Monitoring Rule and can be
         “replayed” in context.


16                            © All rights reserved. Zend Technologies, Inc.
Manual Tests/Functional Workflow

     • Manual/functional workflow is used when performing unit
       tests during development or when running functional tests
       in QA.
     • Code tracing GUI enables to manually execute a one time
      request.
       The request’s execution
         flow is captured and
         stored in a Trace file.




17                             © All rights reserved. Zend Technologies, Inc.
Production Workflow

     • Production workflow is used when running in production or
       when running load tests.
     • Code Tracing Stand-by mode:
       Code Tracing can be set to work in Stand-by mode.

       Monitoring Rules can activate Code Tracing for a certain
         timeframe.
       By the end of that timeframe, Code Tracing is switched back to
         Standby.




18                           © All rights reserved. Zend Technologies, Inc.
Code Tracing - Live Demo




           © All rights reserved. Zend Technologies, Inc.
Q&A

     • Zend Server 5.0 beta: download information:
       http://www.zend.com/en/products/server/zend-server-5-
       new
     • Zend Server 5.0 beta forum:
       http://forums.zend.com/viewforum.php?f=74


     • Feel free to contact me:
     • tzahi.c@zend.com


     Thank you.

20                         © All rights reserved. Zend Technologies, Inc.
Webinar

     To watch the webinar please go to:
     http://www.zend.com/en/webinar/Server/webinar-code-
     tracing-with-zserver5-a-flight-recorder-for-your-php-
     applications-20091111.flv
     or
     http://bit.ly/oFYmwn


     (short registration required)




21                               © All rights reserved. Zend Technologies, Inc.

Weitere ähnliche Inhalte

Ähnlich wie Code Tracing with Zend Server 5: A Flight Recorder for your PHP Applications!

Jaime Blasco - Fighting Advanced Persistent Threat (APT) with Open Source Too...
Jaime Blasco - Fighting Advanced Persistent Threat (APT) with Open Source Too...Jaime Blasco - Fighting Advanced Persistent Threat (APT) with Open Source Too...
Jaime Blasco - Fighting Advanced Persistent Threat (APT) with Open Source Too...
RootedCON
 
Monitoreo y análisis de aplicaciones "Multi-Tier"
Monitoreo y análisis de aplicaciones "Multi-Tier"Monitoreo y análisis de aplicaciones "Multi-Tier"
Monitoreo y análisis de aplicaciones "Multi-Tier"
GeneXus
 

Ähnlich wie Code Tracing with Zend Server 5: A Flight Recorder for your PHP Applications! (20)

Better Bug Stomping with Zend Studio and Zend Server
Better Bug Stomping with Zend Studio and Zend ServerBetter Bug Stomping with Zend Studio and Zend Server
Better Bug Stomping with Zend Studio and Zend Server
 
Application Diagnosis with Zend Server Tracing
Application Diagnosis with Zend Server TracingApplication Diagnosis with Zend Server Tracing
Application Diagnosis with Zend Server Tracing
 
High performance PHP: Scaling and getting the most out of your infrastructure
High performance PHP: Scaling and getting the most out of your infrastructureHigh performance PHP: Scaling and getting the most out of your infrastructure
High performance PHP: Scaling and getting the most out of your infrastructure
 
Developing for Industrial IoT with Linux OS on DragonBoard™ 410c: Session 4
Developing for Industrial IoT with Linux OS on DragonBoard™ 410c: Session 4Developing for Industrial IoT with Linux OS on DragonBoard™ 410c: Session 4
Developing for Industrial IoT with Linux OS on DragonBoard™ 410c: Session 4
 
Turbocharging php applications with zend server
Turbocharging php applications with zend serverTurbocharging php applications with zend server
Turbocharging php applications with zend server
 
Real-world Entity Framework
Real-world Entity FrameworkReal-world Entity Framework
Real-world Entity Framework
 
Applying formal methods to existing software by B.Monate
Applying formal methods to existing software by B.MonateApplying formal methods to existing software by B.Monate
Applying formal methods to existing software by B.Monate
 
Webinar: Zing Vision: Answering your toughest production Java performance que...
Webinar: Zing Vision: Answering your toughest production Java performance que...Webinar: Zing Vision: Answering your toughest production Java performance que...
Webinar: Zing Vision: Answering your toughest production Java performance que...
 
Turbocharging php applications with zend server (workshop)
Turbocharging php applications with zend server (workshop)Turbocharging php applications with zend server (workshop)
Turbocharging php applications with zend server (workshop)
 
EnCase Enterprise Basic File Collection
EnCase Enterprise Basic File Collection EnCase Enterprise Basic File Collection
EnCase Enterprise Basic File Collection
 
Dot Net Application Monitoring
Dot Net Application MonitoringDot Net Application Monitoring
Dot Net Application Monitoring
 
Taking AppSec to 11: AppSec Pipeline, DevOps and Making Things Better
Taking AppSec to 11: AppSec Pipeline, DevOps and Making Things BetterTaking AppSec to 11: AppSec Pipeline, DevOps and Making Things Better
Taking AppSec to 11: AppSec Pipeline, DevOps and Making Things Better
 
Taking AppSec to 11 - BSides Austin 2016
Taking AppSec to 11 - BSides Austin 2016Taking AppSec to 11 - BSides Austin 2016
Taking AppSec to 11 - BSides Austin 2016
 
Jaime Blasco - Fighting Advanced Persistent Threat (APT) with Open Source Too...
Jaime Blasco - Fighting Advanced Persistent Threat (APT) with Open Source Too...Jaime Blasco - Fighting Advanced Persistent Threat (APT) with Open Source Too...
Jaime Blasco - Fighting Advanced Persistent Threat (APT) with Open Source Too...
 
Monitoreo y análisis de aplicaciones "Multi-Tier"
Monitoreo y análisis de aplicaciones "Multi-Tier"Monitoreo y análisis de aplicaciones "Multi-Tier"
Monitoreo y análisis de aplicaciones "Multi-Tier"
 
DevSec Delight with Compliance as Code - Matt Ray - AgileNZ 2017
DevSec Delight with Compliance as Code - Matt Ray - AgileNZ 2017DevSec Delight with Compliance as Code - Matt Ray - AgileNZ 2017
DevSec Delight with Compliance as Code - Matt Ray - AgileNZ 2017
 
How to Ensure High-Performing Microsoft .NET Applications
How to Ensure High-Performing Microsoft .NET ApplicationsHow to Ensure High-Performing Microsoft .NET Applications
How to Ensure High-Performing Microsoft .NET Applications
 
Introduction to Android Development and Security
Introduction to Android Development and SecurityIntroduction to Android Development and Security
Introduction to Android Development and Security
 
Continuous Delivery, Continuous Integration
Continuous Delivery, Continuous Integration Continuous Delivery, Continuous Integration
Continuous Delivery, Continuous Integration
 
DevOpsDays Singapore - Continuous Auditing with Compliance as Code
DevOpsDays Singapore - Continuous Auditing with Compliance as CodeDevOpsDays Singapore - Continuous Auditing with Compliance as Code
DevOpsDays Singapore - Continuous Auditing with Compliance as Code
 

Mehr von Zend by Rogue Wave Software

Mehr von Zend by Rogue Wave Software (20)

Develop microservices in php
Develop microservices in phpDevelop microservices in php
Develop microservices in php
 
Speed and security for your PHP application
Speed and security for your PHP applicationSpeed and security for your PHP application
Speed and security for your PHP application
 
Building and managing applications fast for IBM i
Building and managing applications fast for IBM iBuilding and managing applications fast for IBM i
Building and managing applications fast for IBM i
 
Building web APIs in PHP with Zend Expressive
Building web APIs in PHP with Zend ExpressiveBuilding web APIs in PHP with Zend Expressive
Building web APIs in PHP with Zend Expressive
 
To PHP 7 and beyond
To PHP 7 and beyondTo PHP 7 and beyond
To PHP 7 and beyond
 
Speed up web APIs with Expressive and Swoole (PHP Day 2018)
Speed up web APIs with Expressive and Swoole (PHP Day 2018) Speed up web APIs with Expressive and Swoole (PHP Day 2018)
Speed up web APIs with Expressive and Swoole (PHP Day 2018)
 
The Sodium crypto library of PHP 7.2 (PHP Day 2018)
The Sodium crypto library of PHP 7.2 (PHP Day 2018)The Sodium crypto library of PHP 7.2 (PHP Day 2018)
The Sodium crypto library of PHP 7.2 (PHP Day 2018)
 
Develop web APIs in PHP using middleware with Expressive (Code Europe)
Develop web APIs in PHP using middleware with Expressive (Code Europe)Develop web APIs in PHP using middleware with Expressive (Code Europe)
Develop web APIs in PHP using middleware with Expressive (Code Europe)
 
Middleware web APIs in PHP 7.x
Middleware web APIs in PHP 7.xMiddleware web APIs in PHP 7.x
Middleware web APIs in PHP 7.x
 
Ongoing management of your PHP 7 application
Ongoing management of your PHP 7 applicationOngoing management of your PHP 7 application
Ongoing management of your PHP 7 application
 
Developing web APIs using middleware in PHP 7
Developing web APIs using middleware in PHP 7Developing web APIs using middleware in PHP 7
Developing web APIs using middleware in PHP 7
 
The Docker development template for PHP
The Docker development template for PHPThe Docker development template for PHP
The Docker development template for PHP
 
The most exciting features of PHP 7.1
The most exciting features of PHP 7.1The most exciting features of PHP 7.1
The most exciting features of PHP 7.1
 
Unit testing for project managers
Unit testing for project managersUnit testing for project managers
Unit testing for project managers
 
The new features of PHP 7
The new features of PHP 7The new features of PHP 7
The new features of PHP 7
 
Deploying PHP apps on the cloud
Deploying PHP apps on the cloudDeploying PHP apps on the cloud
Deploying PHP apps on the cloud
 
Data is dead. Long live data!
Data is dead. Long live data! Data is dead. Long live data!
Data is dead. Long live data!
 
Optimizing performance
Optimizing performanceOptimizing performance
Optimizing performance
 
Resolving problems & high availability
Resolving problems & high availabilityResolving problems & high availability
Resolving problems & high availability
 
Developing apps faster
Developing apps fasterDeveloping apps faster
Developing apps faster
 

Kürzlich hochgeladen

Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slide
vu2urc
 
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
Earley Information Science
 

Kürzlich hochgeladen (20)

08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day Presentation
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organization
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slide
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
 
Tech Trends Report 2024 Future Today Institute.pdf
Tech Trends Report 2024 Future Today Institute.pdfTech Trends Report 2024 Future Today Institute.pdf
Tech Trends Report 2024 Future Today Institute.pdf
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed texts
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
 
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfThe Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Script
 
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
 

Code Tracing with Zend Server 5: A Flight Recorder for your PHP Applications!

  • 1. Zend Server 5.0 – Code Tracing Cohen Tzahi – Product Manager Nov. 2009 To watch the webinar please go to: http://www.zend.com/en/webinar/Server/webinar-code- tracing-with-zserver5-a-flight-recorder-for-your-php- applications-20091111.flv © All rights reserved. Zend Technologies, Inc.
  • 2. Zend Server 5.0 • Faster problem resolution with code tracing • Better application performance with Job Queue • Support for the new PHP 5.3 • Various fixes and minor enhancements 2 © All rights reserved. Zend Technologies, Inc.
  • 3. Why Developers Spend 30%-40%(!) of their Time on Problem Resolution • Most problem resolution time is spent on identifying root cause • Problem reproduction is often difficult and time-consuming • Many moving parts – server load, input data, database state, etc. • Some problems cannot be reproduced… Root Cause Analysis Root Cause Analysis reproduce problem – debug Fix reproduce problem – debug 3 © All rights reserved. Zend Technologies, Inc.
  • 4. Zend Server Code Tracing: Cuts Root Cause Analysis Time by up to 50% • Eliminates the need to reproduce problems • Records live application execution when problems occur • Activated through Zend Server monitoring rules or manually • Works in a live production environment or in a test lab Problem resolution time Root Cause Analysis Fix without Code Tracing reproduce problem – debug Problem resolution time Root Cause Analysis Fix with Code Tracing analyze code trace 4 © All rights reserved. Zend Technologies, Inc.
  • 5. Code Tracing – Data Capture • Reproducing an issue is not always possible. Dependency on specific SESSION state. Dependency on specific database state. “Replaying” the request is risky or impossible. • Code Tracing can capture the entire execution flow. 5 © All rights reserved. Zend Technologies, Inc.
  • 6. Code Tracing – Data Capture Code Tracing captures the following information: Execution tree including function calls and included files. Function arguments and return parameters. Output and HTTP headers generation. Location of errors, exceptions and Zend Monitor events. For each node, execution time and memory usage is measured. 6 © All rights reserved. Zend Technologies, Inc.
  • 7. DVD-Like Playback of Application Problems • Opening a Trace File enables you to “playback” the request execution flow using two perspectives: • A Tree perspective: Pinpoint root cause by viewing the sequence of function calls.  Highlights the critical path of functions execution flow (duration).  Pinpoints events led up to an error. 7 © All rights reserved. Zend Technologies, Inc.
  • 8. DVD-Like Playback of Application Problems • A Statistics perspective: displays traced data from a function perspective. Execution time: aggregated and a break down of each function invocation. Memory consumption: aggregated and a break down of each function invocation. Total number of calls. 8 © All rights reserved. Zend Technologies, Inc.
  • 9. How to Generate Trace Data? Manually • Code Trace data can be generated as a result of a manual request or by a monitoring event. • Zend Server’s console (Monitor | Code Trace) page contains a “Trace URL” field and a “Trace” button. Typing a valid URL and clicking the “Trace” button, will execute the request while adding a unique parameter (“dump_data=1” ) to the request. When Zend Server identifies the “dump_data=1” parameter, it generates a trace file for that request. 9 © All rights reserved. Zend Technologies, Inc.
  • 10. How to Generate Trace Data? Manually Trace Files are created and stored on the server where the URLs are executed on. 10 © All rights reserved. Zend Technologies, Inc.
  • 11. How to Generate Trace Data? Using Monitoring Rules • Code Tracing is tightly integrated with Zend Monitoring mechanism. • Monitoring rules supports two new actions: “Save code tracing” – when a monitoring event is generated, Zend Server will create a Trace file that captures the request’s execution flow. “Awake tracing” – when a monitoring event is generated, it will activate code tracing if it is running in standby mode. 11 © All rights reserved. Zend Technologies, Inc.
  • 12. Code Tracing – Operating modes • Code Tracing is a standard Zend Server extension, it can be turned on/off. Off – Trace files will not be generated. On – • Manual Trace files will be saved. • Trace files generated by Monitoring events will be saved according to the code tracing for monitoring settings. (Directive: zend_monitor.event_tracing_mode). 12 © All rights reserved. Zend Technologies, Inc.
  • 13. Code Tracing – Operating modes • Code Tracing for Monitoring Events : a Zend Monitoring parameter that controls whether Trace files will be created by Monitoring events. Active – When a monitoring rule with a “save trace” action is generated, trace data will be saved. Inactive – Trace data will not be saved regardless the events’ actions. Standby - Trace data will not be saved, unless a monitoring event with an “Activation” action is generated. At that point, code tracing for monitoring is activated for a certain amount of time. 13 © All rights reserved. Zend Technologies, Inc.
  • 14. Code Tracing – Standby Mode Code Tracing for Monitoring Status: ACTIVE STANDBY ACTIVE Trace Files Trace C Trace D Trace E Event A: Event B: Event C: Event D: Event E: Event F: Save Trace Activate Save Trace Save Trace Save Trace Save Trace Action Trace Action Action Action Action Action 6 min Time (min) 00:00 00:01 00:02 00:03 00:04 00:05 00:06 00:07 00:08 00:09 14 © All rights reserved. Zend Technologies, Inc.
  • 15. Code Tracing Supported Workflows • Monitoring workflow: When a monitoring event is created, the associated trace data of the specific request is captured. Trace data is attached and associated to the monitoring event. • Manual tests/functional workflow: Manually through the GUI or from a browser by adding a parameter to the request. • Production workflow Can be activated automatically in case of a Zend Monitoring event, for example a PHP error, a slow execution or high memory usage. 15 © All rights reserved. Zend Technologies, Inc.
  • 16. Monitoring Workflow • Monitoring workflow is used when running automated/load tests in pre-production/staging or even for monitoring applications in production environments. • Zend Monitoring proactively alerts when critical problem occurs. Code Tracing can be associated to the Monitoring mechanism as an action of a Monitoring Rules. Enables to capture a complete execution flow only when problems occur. Trace data is associated to the Monitoring Rule and can be “replayed” in context. 16 © All rights reserved. Zend Technologies, Inc.
  • 17. Manual Tests/Functional Workflow • Manual/functional workflow is used when performing unit tests during development or when running functional tests in QA. • Code tracing GUI enables to manually execute a one time request. The request’s execution flow is captured and stored in a Trace file. 17 © All rights reserved. Zend Technologies, Inc.
  • 18. Production Workflow • Production workflow is used when running in production or when running load tests. • Code Tracing Stand-by mode: Code Tracing can be set to work in Stand-by mode. Monitoring Rules can activate Code Tracing for a certain timeframe. By the end of that timeframe, Code Tracing is switched back to Standby. 18 © All rights reserved. Zend Technologies, Inc.
  • 19. Code Tracing - Live Demo © All rights reserved. Zend Technologies, Inc.
  • 20. Q&A • Zend Server 5.0 beta: download information: http://www.zend.com/en/products/server/zend-server-5- new • Zend Server 5.0 beta forum: http://forums.zend.com/viewforum.php?f=74 • Feel free to contact me: • tzahi.c@zend.com Thank you. 20 © All rights reserved. Zend Technologies, Inc.
  • 21. Webinar To watch the webinar please go to: http://www.zend.com/en/webinar/Server/webinar-code- tracing-with-zserver5-a-flight-recorder-for-your-php- applications-20091111.flv or http://bit.ly/oFYmwn (short registration required) 21 © All rights reserved. Zend Technologies, Inc.