3

In a presentation about Zend Server, the author lists the features of Zend Monitor. One of these features is called:

  • Zend Monitor will watch your application for failing functions

What does this mean, if you subtract error and exception monitoring? How can you detect a failing function, if not through and error or uncaught exception?

markus
  • 40,136
  • 23
  • 97
  • 142
  • 4
    I define this as "marketing speak." – Charles Apr 02 '11 at 21:50
  • @Charles Agreed It probably catches the errors and then warns you something is wrong with your site, probably it is even capable of pointing out what is failing exactly and if it was due to faulty input or something else. – Ronald Apr 02 '11 at 22:20

2 Answers2

3

Hope it's not too late to give an answer "from the makers" (I work on Zend Server), but the "Function Error" events (as well as "Database Error" events) are triggered when one of the watched functions (defined in the monitoring rule) returns boolean FALSE.

This follows a pattern which is common especially in the more "traditional" PHP APIs (e.g. mysql, curl, openssl etc.) where some function will simply return FALSE to indicate failure, and you then are required to call a "get_errors()" function to see what went wrong.

This is unlike "normal" PHP errors which are E_ERROR, E_WARNING etc. error types, which some other PHP functions will raise when something fails.

shevron
  • 3,463
  • 2
  • 23
  • 35
  • One more note: this means that there is no point in adding a function that will not return FALSE to the watched functions for "Function Error" and "Database Error" events. You shouldn't do that, because each function added to the list adds a little bit of performance overhead (usually unnoticeable, but may add up if that function is called hundreds or thousands of times) – shevron Apr 22 '11 at 21:52
  • Thanks for the answer! Good to know that the Zend guys are sticking around here too. – markus Apr 23 '11 at 07:03
2

Besides being "marketing speak" ...

"failing function" means:

  • PHP errors raised during function execution
  • slow functions

See at
http://files.zend.com/help/Zend-Server/monitor.htm

The Zend Monitor [...] watches for various events such as errors, failing functions, slow scripts, database errors, etc. When an event occurs, the Zend Monitor collects and reports all the relevant debugging information.

What is an Event?

Events are governed by rules created in Rule Management | Monitor. Rules define the nature of an event and the parameters for capturing event related information in an application.

And you can see the events of the Rule Management here (search "Rule Management" in the page) :
http://www.oracle.com/technetwork/articles/vaswani-zend-083732.html

And also here :
http://static.zend.com/topics/Zend-Server-Reference-Manual-v403-2.pdf

markus
  • 40,136
  • 23
  • 97
  • 142
Skrol29
  • 5,402
  • 1
  • 20
  • 25
  • PHP errors raised during function execution, how does that account for something beyond PHP errors? And what do you mean by PHP errors raised during slow functions? Thanks for your links but I didn't ask about events. – markus Apr 03 '11 at 09:17
  • A purely objective process will not be able to tell what a functional error is. Unit Test can tell you that, but not the Zend Monitor. Zend Monitor means by "a failing function", a function that makes a PHP errors. I don't meant "errors raised during slow functions", I meant "(errors raised during function) + (slow functions)", so I've edited by post in order to make it more precise. The Event concept helps you to understand what Zend Monitor is actually catching. – Skrol29 Apr 04 '11 at 09:49