VERSION
VERSION = '1.9.x-dev'
Raven PHP Client
$context : \Raven_Context
$processors : array<mixed,\Raven_Processor>
$serializer : \Raven_Serializer
$reprSerializer : \Raven_ReprSerializer
$_curl_handler : \Raven_CurlHandler
setPrefixes(array $value) : \Raven_Client
| array | $value |
setTransport(Callable $value) : \Raven_Client
Set a custom transport to override how Sentry events are sent upstream.
The bound function will be called with $client and $data arguments
and is responsible for encoding the data, authenticating, and sending
the data to the upstream Sentry server.
| Callable | $value | Function to be called |
getDefaultProcessors() : array<mixed,string>|array<mixed,\Raven_Processor>
setProcessorsFromOptions( $options) : array<mixed,\Raven_Processor>
Sets the Raven_Processor sub-classes to be used when data is processed before being sent to Sentry.
| $options |
message(string $message, array $params = array(), string $level = self::INFO, boolean|array $stack = false, mixed $vars = null) : string|null
| string | $message | The message (primary description) for the event. |
| array | $params | params to use when formatting the message. |
| string | $level | Log level group |
| boolean|array | $stack | |
| mixed | $vars |
exception(\Exception $exception) : string|null
| \Exception | $exception |
| codeCoverageIgnore |
|---|
captureMessage(string $message, array $params = array(), array $data = array(), boolean|array $stack = false, mixed $vars = null) : string|null
Log a message to sentry
| string | $message | The message (primary description) for the event. |
| array | $params | params to use when formatting the message. |
| array | $data | Additional attributes to pass with this event (see Sentry docs). |
| boolean|array | $stack | |
| mixed | $vars |
| None found |
captureException(\Throwable|\Exception $exception, array $data = null, mixed $logger = null, mixed $vars = null) : string|null
Log an exception to sentry
| \Throwable|\Exception | $exception | The Throwable/Exception object. |
| array | $data | Additional attributes to pass with this event (see Sentry docs). |
| mixed | $logger | |
| mixed | $vars |
| None found |
captureLastError() : string|null
Capture the most recent error (obtained with ``error_get_last``).
| None found |
captureQuery(string|null $query, string $level = self::INFO, string $engine = '')
Log an query to sentry
| string|null | $query | |
| string | $level | |
| string | $engine |
| None found |
| None found |
| None found |
| None found |
| None found |
process(array $data)
Process data through all defined Raven_Processor sub-classes
| array | $data | Associative array of data to log |
| None found |
| None found |
| None found |
send(array $data)
Wrapper to handle encoding and sending data to the Sentry API server.
| array | $data | Associative array of data to log |
| None found |
| None found |
translateSeverity(string $severity) : string
Translate a PHP Error constant into a Sentry log level group
| string | $severity | PHP E_$x error constant |
Sentry log level group
| None found |
registerSeverityMap(array $map)
Provide a map of PHP Error constants to Sentry logging groups to use instead of the defaults in translateSeverity()
| array | $map |
| None found |
set_user_data(string $id, string|null $email = null, array $data = array())
Convenience function for setting a user's ID and Email
| string | $id | User's ID |
| string|null | User's email |
|
| array | $data | Additional user data |
| codeCoverageIgnore |
|---|
| None found |
user_context(array $data, boolean $merge = true)
Sets user context.
| array | $data | Associative array of user data |
| boolean | $merge | Merge existing context with new context |
| None found |
tags_context(array $data)
Appends tags context.
| array | $data | Associative array of tags |
| None found |
extra_context(array $data)
Appends additional context.
| array | $data | Associative array of extra data |
| None found |
| None found |
| None found |
| None found |
| None found |
setSerializer(\Raven_Serializer $serializer)
| \Raven_Serializer | $serializer |
| None found |
setReprSerializer(\Raven_ReprSerializer $reprSerializer)
| \Raven_ReprSerializer | $reprSerializer |
| None found |
getInputStream()
Note: Prior to PHP 5.6, a stream opened with php://input can only be read once;
| None found |
| None found |
| None found |
| codeCoverageIgnore |
|---|
| None found |
| None found |
| None found |
send_remote(string $url, array|string $data, array $headers = array())
Send data to Sentry
| string | $url | Full URL to Sentry |
| array|string | $data | Associative array of data to log |
| array | $headers | Associative array of headers |
| None found |
| None found |
| None found |
send_http(string $url, array|string $data, array $headers = array())
Send the message over http to the sentry url given
| string | $url | URL of the Sentry instance to log to |
| array|string | $data | Associative array of data to log |
| array | $headers | Associative array of headers |
| None found |
| None found |
send_http_asynchronous_curl_exec(string $url, array|string $data, array $headers) : boolean
Send the cURL to Sentry asynchronously. No errors will be returned from cURL
| string | $url | URL of the Sentry instance to log to |
| array|string | $data | Associative array of data to log |
| array | $headers | Associative array of headers |
| None found |
send_http_synchronous(string $url, array|string $data, array $headers) : boolean
Send a blocking cURL to Sentry and check for errors from cURL
| string | $url | URL of the Sentry instance to log to |
| array|string | $data | Associative array of data to log |
| array | $headers | Associative array of headers |
| None found |
get_auth_header(string $timestamp, string $client, string $api_key, string $secret_key) : string
Generate a Sentry authorization header string
| string | $timestamp | Timestamp when the event occurred |
| string | $client | HTTP client name (not Raven_Client object) |
| string | $api_key | Sentry API key |
| string | $secret_key | Sentry API key |
| None found |
| None found |
get_current_url() : string|null
Return the URL for the current request
| None found |
| None found |
| None found |
| None found |
_server_variable(string $key) : string
Get the value of a key from $_SERVER
| string | $key | Key whose value you wish to obtain |
Key's value
| None found |
| None found |