承接 helhum/sentry-typo3 相关项目开发

从需求分析到上线部署,全程专人跟进,保证项目质量与交付效率

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

helhum/sentry-typo3

最新稳定版本:v0.2.6

Composer 安装命令:

composer require helhum/sentry-typo3

包简介

Sentry Integration for TYPO3

README 文档

README

Exception and error logging with Sentry, see https://sentry.io

Sentry provides open-source and hosted error monitoring that helps all software teams discover, triage, and prioritize errors in real-time.

Sentry is available as SaaS including a free plan for developers or as download for self-hosting.

This package is a wrapper for https://github.com/getsentry/sentry-php

Installation

$ composer require helhum/sentry-typo3

Configuration

Set the dsn in your global configuration:

$GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['sentry']['dsn'] = 'http://public_key:secret_key@your-sentry-server.com/project-id';

It is possible to change / add other Sentry options like this:

$GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['sentry'][<sentry option>];

Since the integration is purely done with log writers, make sure you add at least one writer. It is recommended to add a global writer as follows:

$GLOBALS['TYPO3_CONF_VARS']['LOG']['writerConfiguration'][\TYPO3\CMS\Core\Log\LogLevel::WARNING] = [
    \Helhum\SentryTypo3\Log\Writer\SentryWriter::class => [],
];

To get additional information for each error/warning logged, add the breadcrumb writer as well

$GLOBALS['TYPO3_CONF_VARS']['LOG']['writerConfiguration'][\TYPO3\CMS\Core\Log\LogLevel::INFO][\Helhum\SentryTypo3\Log\Writer\SentryBreadcrumbWriter::class] = [];

If you want to have different environments to filter by in Sentry, you can set them like this:

$GLOBALS['TYPO3_CONF_VARS']['SYS']['environment'] = 'development';

Where should I put the configuration?

This package expects settings to be exposed in main TYPO3 configuration (aka `TYPO3_CONF_VARS). How you expose it, totally depends on your use case, your deployment strategy and project structure.

This means: Put the configuration in either LocalConfiguration.php or AdditionalConfiguration.php depending on your needs and structure of your project.

How to test the connection to Sentry?

Run typo3 sentry:test cli command, that is provided and some messages should be reported to the configured Sentry endpoint.

Improvements / Issues

This package is managed on GitHub. Feel free to get in touch at https://github.com/helhum/sentry-typo3

统计信息

  • 总下载量: 32.52k
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 22
  • 点击次数: 1
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 19
  • Watchers: 5
  • Forks: 16
  • 开发语言: PHP

其他信息

  • 授权协议: GPL-2.0-or-later
  • 更新时间: 2019-11-03