Download the PHP package netlogix/sentry without Composer

On this page you can find all versions of the php package netlogix/sentry. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package sentry

Netlogix.Sentry

About

This package provides a Flow integration for the sentry.io PHP SDK. Some basic information about the Flow application is added to the sentry Event by default, but you can easily configure and extend this package to fit your needs.

Installation

composer require netlogix/sentry

Currently the following Flow versions are supported:

Setup

The sentry DSN Client Key has to be configured. Get it from your project settings (SDK Setup -> Client Keys (DSN)).

Then simply run ./flow sentry:test to log an exception to sentry. While this is technically all you have to do, you might want to adjust the providers - see below.

Configuration

This package allows you to configure which data should be added to the sentry event by changing the providers for each scope. Currently, the available scopes are environment, extra, release, tags and user.

Providers can be sorted using the PositionalArraySorter position strings. For the scopes extra, tags and user, all data provided will be merged together. The scopes environment and release only support a single value (you can still configure more than one provider, but the last one wins).

Environments

The sentry SDK will search for the environment variable SENTRY_ENVIRONMENT and use it's value as the current environment. This is still the default, however you can configure the Netlogix\Sentry\Scope\Environment\FlowSettings provider to use a different value:

Release tracking

You can use the Netlogix\Sentry\Scope\Release\PathPattern ReleaseProvider to extract your current release from the app directory. By default, the configured pathPattern is matched against the FLOW_PATH_ROOT constant:

You can also use the Netlogix\Sentry\Scope\Release\FlowSettings to set the Release through Flow Configuration (Netlogix.Sentry.release.setting, set to %env:SENTRY_RELEASE% by default).

Custom Providers

For each scope, you can implement your own providers. Each scope requires it's own interface:

Then simply add them to the configuration.

If you need access to the thrown exception, you can check Netlogix\Sentry\Scope\ScopeProvider::getCurrentThrowable():

Manually logging exceptions to sentry

If you need to manually send exceptions to sentry (inside a catch block for example), you can use the Netlogix\Sentry\ThrowableStorage\SentryStorage:

Ignoring exceptions

If you need to skip sending a specific exception to sentry, you can use Flow's renderingGroups. Simply create one that matches your exception and set logException to false:

Please note that this also disables logging of this exception to Data/Logs/Exceptions.

Encrypt POST payload

By default, the array of POST payload data is transported to the sentry server "as is".

When encryption is enabled and a valid rsa key fingerprint is set, the POST payload is stripped and replaced by an RSA encrypted string.

POST data without encryption usually looks like this in sentry:

With encryption enabled it looks like this:

There will be an additional sentry field "Encrypted POST Data" which contains a backlink to encrypt and show the original data.

In order for this to work, there must be an authentication provider in place that handels the Neos.Sentry controller.

If this package is used in conjunction with the neos/neos CMS, the neos backend authentication provider can be tasked with this job. See the code snippet below.

If this package is used without neos/neos, a custom privilege for policy Netlogix.Sentry:Backend.EncryptedPayload has to be configured.

Scrubbing variables or adding more details

Allow in php.ini config

Context variables depend on zend not removing exception arguments. Make sure zend is not configured to remove arguments from exceptions to make use of fine-grained variable scrubbing and context-aware variable details.

Scrub all frame arguments

Ignoring exception arguments via zend setting would just remove every exception argument. Scrubbing can be re-added manually in userspace code by config settings. This might be helpful for either different environments or deployment targets.

Prevent specific arguments from being scrubbed

In contrast to zend.exception_ignore_args, having them scrubbed manually allows for keeping very specific variables by naming them individually.

Add specific object information of frame variables to the sentry event context

Data that is not ony "a representation of" a method argument but somewhere within any given data structure can be extracted and adde to the sentry event.

This covers way more details about any given event frame, as long as the information is accessible by either public properties or a getter method.

Cron Monitoring

Add cron monitoring slug and schedule to your command parameters:

 --cron-monitor-slug=CRON-MONITOR-SLUG                  if command should be monitored then pass cron monitor slug
 --cron-monitor-schedule=CRON-MONITOR-SCHEDULE          if command should be monitored then pass cron monitor schedule
 --cron-monitor-max-time=CRON-MONITOR-MAX-TIME          if command should be monitored then pass cron monitor max execution time
 --cron-monitor-check-margin=CRON-MONITOR-CHECK-MARGIN  if command should be monitored then pass cron monitor check margin

example usage in crontab

Optionally you can also set max run time and check margin (see https://docs.sentry.io/platforms/php/crons/)


All versions of sentry with dependencies

PHP Build Version
Package Version
Requires php Version ^8.0
neos/flow Version ^7.3.6 || ^8.0.4 || ~9.0.0
sentry/sdk Version ^3.1
ext-openssl Version *
ext-json Version *
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package netlogix/sentry contains the following files

Loading the files please wait ....