BlackfireProbe
final class BlackfireProbe (View source)
Blackfire extension stubs.
Methods
Returns a global singleton and enables it by default.
Tells whether the probe is currently profiling or not.
Adds a marker for the Timeline View.
BlackfireProbe constructor. SHOULD NOT BE USED DIRECTLY! USE getMainInstance() INSTEAD!
Tells if the probe is cryptographically verified, i.e. if the signature in X-Blackfire-Query HTTP header or BLACKFIRE_QUERY environment variable is valid.
No description
Gets the response message/status/line.
Enables manual instrumentation. Starts collecting profiling data.
Discards collected data and disables instrumentation.
Disables instrumentation.
Stops the profiling and forces the collected data to be sent to Blackfire.
Creates a sub-query string to create a new profile linked to the current one.
Sets a custom transaction name for Blackfire Monitoring.
Disables Blackfire Monitoring instrumentation for a transaction.
Manually starts a transaction. Useful for CLI/Consumer monitoring.
Manually stops a transaction. Useful for CLI/Consumer monitoring.
Details
static BlackfireProbe
getMainInstance()
Returns a global singleton and enables it by default.
static bool
isEnabled()
Tells whether the probe is currently profiling or not.
static
addMarker(string $markerName = '')
Adds a marker for the Timeline View.
__construct(string $query, string|null $envId = null, string|null $envToken = null, string|null $agentSocket = null)
BlackfireProbe constructor. SHOULD NOT BE USED DIRECTLY! USE getMainInstance() INSTEAD!
bool
isVerified()
Tells if the probe is cryptographically verified, i.e. if the signature in X-Blackfire-Query HTTP header or BLACKFIRE_QUERY environment variable is valid.
setConfiguration(string $configuration)
No description
string
getResponseLine()
Gets the response message/status/line.
This lines gives details about the status of the probe. That can be:
- an error:
Blackfire-Error: $errNumber $urlEncodedErrorMessage
- or not:
Blackfire-Response: $rfc1738EncodedMessage
bool
enable()
Enables manual instrumentation. Starts collecting profiling data.
bool
discard()
Discards collected data and disables instrumentation.
Does not close the profile payload, allowing to re-enable the probe and aggregate data in the same profile.
bool
disable()
Disables instrumentation.
Does not close the profile payload, allowing to re-enable the probe and to aggregate data in the same profile.
bool
close()
Stops the profiling and forces the collected data to be sent to Blackfire.
string|null
createSubProfileQuery()
Creates a sub-query string to create a new profile linked to the current one.
Generated query must be set in the X-Blackire-Query HTTP header or in the BLACKFIRE_QUERY environment variable.
static void
setTransactionName(string $transactionName)
Sets a custom transaction name for Blackfire Monitoring.
static void
ignoreTransaction()
Disables Blackfire Monitoring instrumentation for a transaction.
static void
startTransaction()
Manually starts a transaction. Useful for CLI/Consumer monitoring.
static void
stopTransaction()
Manually stops a transaction. Useful for CLI/Consumer monitoring.