SlideShare une entreprise Scribd logo
1  sur  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.

Contenu connexe

Similaire à 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
 

Similaire à 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
 

Plus de Zend by Rogue Wave Software

Plus de 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
 

Dernier

Easier, Faster, and More Powerful – Alles Neu macht der Mai -Wir durchleuchte...
Easier, Faster, and More Powerful – Alles Neu macht der Mai -Wir durchleuchte...Easier, Faster, and More Powerful – Alles Neu macht der Mai -Wir durchleuchte...
Easier, Faster, and More Powerful – Alles Neu macht der Mai -Wir durchleuchte...
panagenda
 

Dernier (20)

2024 May Patch Tuesday
2024 May Patch Tuesday2024 May Patch Tuesday
2024 May Patch Tuesday
 
Human Expert Website Manual WCAG 2.0 2.1 2.2 Audit - Digital Accessibility Au...
Human Expert Website Manual WCAG 2.0 2.1 2.2 Audit - Digital Accessibility Au...Human Expert Website Manual WCAG 2.0 2.1 2.2 Audit - Digital Accessibility Au...
Human Expert Website Manual WCAG 2.0 2.1 2.2 Audit - Digital Accessibility Au...
 
Overview of Hyperledger Foundation
Overview of Hyperledger FoundationOverview of Hyperledger Foundation
Overview of Hyperledger Foundation
 
Vector Search @ sw2con for slideshare.pptx
Vector Search @ sw2con for slideshare.pptxVector Search @ sw2con for slideshare.pptx
Vector Search @ sw2con for slideshare.pptx
 
Using IESVE for Room Loads Analysis - UK & Ireland
Using IESVE for Room Loads Analysis - UK & IrelandUsing IESVE for Room Loads Analysis - UK & Ireland
Using IESVE for Room Loads Analysis - UK & Ireland
 
Google I/O Extended 2024 Warsaw
Google I/O Extended 2024 WarsawGoogle I/O Extended 2024 Warsaw
Google I/O Extended 2024 Warsaw
 
Design and Development of a Provenance Capture Platform for Data Science
Design and Development of a Provenance Capture Platform for Data ScienceDesign and Development of a Provenance Capture Platform for Data Science
Design and Development of a Provenance Capture Platform for Data Science
 
JavaScript Usage Statistics 2024 - The Ultimate Guide
JavaScript Usage Statistics 2024 - The Ultimate GuideJavaScript Usage Statistics 2024 - The Ultimate Guide
JavaScript Usage Statistics 2024 - The Ultimate Guide
 
How Red Hat Uses FDO in Device Lifecycle _ Costin and Vitaliy at Red Hat.pdf
How Red Hat Uses FDO in Device Lifecycle _ Costin and Vitaliy at Red Hat.pdfHow Red Hat Uses FDO in Device Lifecycle _ Costin and Vitaliy at Red Hat.pdf
How Red Hat Uses FDO in Device Lifecycle _ Costin and Vitaliy at Red Hat.pdf
 
Secure Zero Touch enabled Edge compute with Dell NativeEdge via FDO _ Brad at...
Secure Zero Touch enabled Edge compute with Dell NativeEdge via FDO _ Brad at...Secure Zero Touch enabled Edge compute with Dell NativeEdge via FDO _ Brad at...
Secure Zero Touch enabled Edge compute with Dell NativeEdge via FDO _ Brad at...
 
Generative AI Use Cases and Applications.pdf
Generative AI Use Cases and Applications.pdfGenerative AI Use Cases and Applications.pdf
Generative AI Use Cases and Applications.pdf
 
Design Guidelines for Passkeys 2024.pptx
Design Guidelines for Passkeys 2024.pptxDesign Guidelines for Passkeys 2024.pptx
Design Guidelines for Passkeys 2024.pptx
 
Collecting & Temporal Analysis of Behavioral Web Data - Tales From The Inside
Collecting & Temporal Analysis of Behavioral Web Data - Tales From The InsideCollecting & Temporal Analysis of Behavioral Web Data - Tales From The Inside
Collecting & Temporal Analysis of Behavioral Web Data - Tales From The Inside
 
ADP Passwordless Journey Case Study.pptx
ADP Passwordless Journey Case Study.pptxADP Passwordless Journey Case Study.pptx
ADP Passwordless Journey Case Study.pptx
 
Intro in Product Management - Коротко про професію продакт менеджера
Intro in Product Management - Коротко про професію продакт менеджераIntro in Product Management - Коротко про професію продакт менеджера
Intro in Product Management - Коротко про професію продакт менеджера
 
Easier, Faster, and More Powerful – Alles Neu macht der Mai -Wir durchleuchte...
Easier, Faster, and More Powerful – Alles Neu macht der Mai -Wir durchleuchte...Easier, Faster, and More Powerful – Alles Neu macht der Mai -Wir durchleuchte...
Easier, Faster, and More Powerful – Alles Neu macht der Mai -Wir durchleuchte...
 
The Value of Certifying Products for FDO _ Paul at FIDO Alliance.pdf
The Value of Certifying Products for FDO _ Paul at FIDO Alliance.pdfThe Value of Certifying Products for FDO _ Paul at FIDO Alliance.pdf
The Value of Certifying Products for FDO _ Paul at FIDO Alliance.pdf
 
Linux Foundation Edge _ Overview of FDO Software Components _ Randy at Intel.pdf
Linux Foundation Edge _ Overview of FDO Software Components _ Randy at Intel.pdfLinux Foundation Edge _ Overview of FDO Software Components _ Randy at Intel.pdf
Linux Foundation Edge _ Overview of FDO Software Components _ Randy at Intel.pdf
 
TopCryptoSupers 12thReport OrionX May2024
TopCryptoSupers 12thReport OrionX May2024TopCryptoSupers 12thReport OrionX May2024
TopCryptoSupers 12thReport OrionX May2024
 
UiPath manufacturing technology benefits and AI overview
UiPath manufacturing technology benefits and AI overviewUiPath manufacturing technology benefits and AI overview
UiPath manufacturing technology benefits and AI overview
 

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.