Giter Site home page Giter Site logo

netwokteam.neos.sentryclient's Introduction

Networkteam.Neos.SentryClient

This is a Sentry client package for the Neos CMS (https://www.neos.io).

It's based on https://github.com/getsentry/sentry-php.

Have a look at https://sentry.io for more information about Sentry.

Installation:

$ composer require networkteam/neos-sentryclient

Configuration:

Add the following to your Settings.yaml and replace the dsn setting with your project DSN (API Keys in your Sentry project):

Networkteam:
  SentryClient:
    # The Sentry DSN
    dsn: 'http://public_key:[email protected]/project-id'

You can implement the \Networkteam\SentryClient\User\UserContextServiceInterface to pass your own user context information to the logging. If you do not have the TYPO3.Party Package and don't want to implement your own UserContextService you need to set the \Networkteam\SentryClient\User\DummyUserContext in the Objects.yaml like

Networkteam\SentryClient\User\UserContextServiceInterface:
  className: Networkteam\SentryClient\User\DummyUserContext

This will prevent any collection of user information except information that is available via the Flow SecurityContext.

Usage:

Sentry will log all exceptions that have the rendering option logException enabled. This can be enabled or disabled by status code or exception class according to the Flow configuration.

Development:

This package is managed on GitHub. Feel free to get in touch at https://github.com/networkteam/Networkteam.Neos.SentryClient.

License:

See the LICENSE file for license rights and limitations (MIT).

netwokteam.neos.sentryclient's People

Contributors

ger4003 avatar nilsjung avatar christophlehmann avatar paxuclus avatar

Stargazers

Frederic Darmstädter avatar Sebastian Helzle avatar Markus Günther avatar

Watchers

Sören Rohweder avatar Berit Hlubek avatar James Cloos avatar Paavo avatar  avatar  avatar  avatar Marcel Tams avatar Christian Lange avatar  avatar

Forkers

unikka paxuclus

netwokteam.neos.sentryclient's Issues

Incompatible to neos/flow >= 7.3.6

In version 7.3.6 of neos/flow the AbstractExceptionHandler::echoExceptionCli signature changed from

protected function echoExceptionCli(\Throwable $exception) to
protected function echoExceptionCli(\Throwable $exception, bool $exceptionWasLogged)

So this causes an error now:

PHP Fatal error: Declaration of Networkteam\SentryClient\Handler\DebugExceptionHandler::echoExceptionCLI(Throwable $exception) must be compatible with Neos\Flow\Error\AbstractExceptionHandler::echoExceptionCli(Throwable $exception, bool $exceptionWasLogged)

Temporary solution is to pin the package to 7.3.5 in composer.json.

Refactor package to use ThrowableStorage to hook into exception handling

Idea:

We want to use Sentry to log (useful) throwables. For containerized deployments there should be no local files written with exception information. We should investigate the idea if we could refactor the implementation to override the logger throwable storage class and use Sentry (with an ignore list of not very useful exceptions like "asset not found").

This should only happen if a Sentry DSN is set - otherwise the exception should be logged (console or log file).

Maybe we could get rid of the Debug / Production Exception Handlers.

User Details (User / Browser) missing on Sentry

Description

Netwokteam.Neos.SentryClient does not send User Details (User / Browser) to Sentry.

Steps to Reproduce

  1. Install Netwokteam.Neos.SentryClient
  2. Configuration (add dsn)
  3. Produce an Error 💥
  4. Check Error on Sentry

Expected behavior

Error will be logged to Sentry including User Details (User / Browser)

Actual behavior

Error will be logged to Sentry without User Details (User / Browser)

screenshot 2018-11-08 at 15 05 31

Affected Versions

Neos: 4.1.7
networkteam/neos-sentryclient: v4.0.1

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.