ChristophWurst / nextcloud_sentry

Sentry integration for Nextcloud
GNU Affero General Public License v3.0
36 stars 5 forks source link

Minimum log level default and settings is not applied #282

Open SimJoSt opened 3 years ago

SimJoSt commented 3 years ago

Steps to reproduce

I have been using the Sentry app for some time. Every month my free Sentry quota gets eaten up in a matter of a few days. Contrary to the docs here the log level apparently isn't set to warning. I have a lot of debug entries in sentry and even some info ones. I tried fixing this with the minimum log level setting. I tried setting it by hand and via the cli. None worked.

Expected behaviour

Minimum sentry log level is warning by default. Minimum sentry log level can be set with config.php setting.

Actual behaviour

Minimum sentry log level defaults and settings are not applied.

Server configuration detail

Operating system: Linux 4.9.0-13-amd64 #1 SMP Debian 4.9.228-1 (2020-07-05) x86_64

Webserver: Apache/2.4.38 (Debian) (apache2handler)

Database: mysql 10.1.47

PHP version:

7.4.12 Modules loaded: Core, date, libxml, openssl, pcre, sqlite3, zlib, ctype, curl, dom, fileinfo, filter, ftp, hash, iconv, json, mbstring, SPL, PDO, session, posix, Reflection, standard, SimpleXML, pdo_sqlite, Phar, tokenizer, xml, xmlreader, xmlwriter, mysqlnd, apache2handler, apcu, bcmath, exif, gd, gmp, imagick, intl, ldap, memcached, pcntl, pdo_mysql, pdo_pgsql, redis, sodium, zip, Zend OPcache

Nextcloud version: 19.0.5 - 19.0.5.2

Updated from an older Nextcloud/ownCloud or fresh install: yes

Where did you install Nextcloud from: Docker

Signing status
List of activated apps ``` Enabled: - accessibility: 1.5.0 - activity: 2.12.1 - admin_audit: 1.9.0 - apporder: 0.11.0 - audioplayer: 2.13.0 - bookmarks: 3.4.9 - breezedark: 19.0.9 - bruteforcesettings: 2.0.1 - calendar: 2.0.4 - camerarawpreviews: 0.7.9 - checksum: 0.4.5 - circles: 0.19.9 - cloud_federation_api: 1.2.0 - comments: 1.9.0 - contacts: 3.4.2 - contactsinteraction: 1.0.0 - cospend: 1.0.5 - data_request: 1.6.0 - dav: 1.15.0 - deck: 1.2.2 - drawio: 0.9.7 - event_update_notification: 1.0.2 - federatedfilesharing: 1.9.0 - federation: 1.9.0 - files: 1.14.0 - files_3d: 0.3.3 - files_downloadactivity: 1.8.0 - files_fulltextsearch: 1.4.3 - files_fulltextsearch_tesseract: 1.4.2 - files_linkeditor: 1.1.2 - files_markdown: 2.3.1 - files_mindmap: 0.0.23 - files_pdfviewer: 1.8.0 - files_photospheres: 1.19.1 - files_rightclick: 0.16.0 - files_sharing: 1.11.0 - files_trashbin: 1.9.0 - files_versions: 1.12.0 - files_videoplayer: 1.8.0 - firstrunwizard: 2.8.0 - flowupload: 1.1.2 - forms: 2.0.4 - fulltextsearch: 1.4.2 - fulltextsearch_elasticsearch: 1.5.2 - groupfolders: 7.1.1 - impersonate: 1.6.1 - issuetemplate: 0.7.0 - keeweb: 0.6.3 - logreader: 2.4.0 - lookup_server_connector: 1.7.0 - mail: 1.4.1 - maps: 0.1.6 - metadata: 0.12.0 - music: 0.17.3 - nextcloud_announcements: 1.8.0 - notes: 3.6.4 - notifications: 2.7.0 - oauth2: 1.7.0 - ownpad: 0.6.15 - password_policy: 1.9.1 - phonetrack: 0.6.4 - photos: 1.1.0 - piwik: 0.7.0 - polls: 1.6.2 - privacy: 1.3.0 - provisioning_api: 1.9.0 - quota_warning: 1.8.0 - ransomware_detection: 0.8.0 - recommendations: 0.7.0 - richdocuments: 3.7.9 - sentry: 7.0.0 - serverinfo: 1.9.0 - settings: 1.1.0 - sharebymail: 1.9.0 - socialsharing_diaspora: 2.1.0 - socialsharing_email: 2.1.0 - socialsharing_facebook: 2.1.0 - socialsharing_twitter: 2.1.0 - spreed: 9.0.6 - survey_client: 1.7.0 - talk_simple_poll: 1.2.0 - tasks: 0.13.6 - text: 3.0.1 - theming: 1.10.0 - timemanager: 0.1.6 - timetracker: 0.0.45 - twofactor_admin: 3.0.0 - twofactor_backupcodes: 1.8.0 - twofactor_gateway: 0.17.0 - twofactor_nextcloud_notification: 2.3.0 - twofactor_totp: 5.0.0 - twofactor_u2f: 6.0.0 - updatenotification: 1.9.0 - viewer: 1.3.0 - workflowengine: 2.1.0 Disabled: - announcementcenter - browser_warning - dashboard - documentserver_community - dropit - encryption - external - extract - files_external - files_external_gdrive - files_external_onedrive - files_reader - files_readmemd - group_everyone - hsts - mindmaps - news - occweb - ocsms - onlyoffice - previewgenerator - rainloop - ransomware_protection - sharelisting - sharerenamer - support - systemtags - telephoneprovider - twofactor_email - twofactor_yubikey - uploaddetails - user_ldap - whiteboard ```
Configuration (config/config.php) ``` { "instanceid": "***REMOVED SENSITIVE VALUE***", "passwordsalt": "***REMOVED SENSITIVE VALUE***", "secret": "***REMOVED SENSITIVE VALUE***", "trusted_domains": [ "***REMOVED SENSITIVE VALUE***", "***REMOVED SENSITIVE VALUE***", "***REMOVED SENSITIVE VALUE***" ], "datadirectory": "***REMOVED SENSITIVE VALUE***", "dbtype": "mysql", "version": "19.0.5.2", "dbname": "***REMOVED SENSITIVE VALUE***", "dbhost": "***REMOVED SENSITIVE VALUE***", "dbuser": "***REMOVED SENSITIVE VALUE***", "dbpassword": "***REMOVED SENSITIVE VALUE***", "installed": true, "forcessl": true, "logtimezone": "Europe\/Berlin", "log_rotate_size": 104857600, "mail_from_address": "***REMOVED SENSITIVE VALUE***", "mail_domain": "***REMOVED SENSITIVE VALUE***", "mail_smtpauth": 1, "mail_smtpauthtype": "LOGIN", "mail_smtphost": "***REMOVED SENSITIVE VALUE***", "mail_smtpmode": "smtp", "mail_smtpname": "***REMOVED SENSITIVE VALUE***", "mail_smtppassword": "***REMOVED SENSITIVE VALUE***", "mail_smtpport": "465", "mail_smtpsecure": "ssl", "htaccess.RewriteBase": "\/", "htaccess.IgnoreFrontController": true, "overwrite.cli.url": "***REMOVED SENSITIVE VALUE***", "overwriteprotocol": "https", "skeletondirectory": "", "auth.bruteforce.protection.enabled": true, "check_for_working_webdav": true, "maintenance": false, "loglevel": 0, "debug": false, "memcache.local": "\\OC\\Memcache\\APCu", "apps_paths": [ { "path": "\/var\/www\/html\/apps", "url": "\/apps", "writable": false }, { "path": "\/var\/www\/html\/custom_apps", "url": "\/custom_apps", "writable": true } ], "memcache.locking": "\\OC\\Memcache\\Redis", "redis": { "host": "***REMOVED SENSITIVE VALUE***", "port": 6379 }, "updater.release.channel": "stable", "mysql.utf8mb4": true, "theme": "", "sentry.dsn": "https:\/\/0725a66e07fe4f3bb5e5eb837ec4fcda@sentry.io\/1756997", "sentry.public-dsn": "https:\/\/0725a66e07fe4f3bb5e5eb837ec4fcda@sentry.io\/1756997", "sentry.csp-report-url": "https:\/\/sentry.io\/api\/1756997\/security\/?sentry_key=0725a66e07fe4f3bb5e5eb837ec4fcda", "app_install_overwrite": [ "keeweb" ], "trashbin_retention_obligation": "7,30", "versions_retention_obligation": "30,180", "activity_expire_days": 180, "sentry.minimum.log.level": 3, "enabledPreviewProviders": [ "OC\\Preview\\BMP", "OC\\Preview\\GIF", "OC\\Preview\\HEIC", "OC\\Preview\\JPEG", "OC\\Preview\\Krita", "OC\\Preview\\MarkDown", "OC\\Preview\\MP3", "OC\\Preview\\OpenDocument", "OC\\Preview\\PNG", "OC\\Preview\\TXT", "OC\\Preview\\XBitmap", "OC\\Preview\\Movie" ] } ```

Are you using external storage, if yes which one:

Are you using encryption:

Are you using an external user-backend, if yes which one:

Client configuration

Browser: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/87.0.4280.141 Safari/537.36

Operating system:

Logs

Web server error log ``` ```
Nextcloud log ``` ```
Browser log
ChristophWurst commented 3 years ago

IIRC if anything does not satisfy the minimum log level we hand it over as breadcrumb. but in my understanding those shouldn't exhaust the sentry quota unless an error occurs … or am I wrong?

ChristophWurst commented 3 years ago

could you share a link to one of those "debug entries"?

SimJoSt commented 3 years ago

@ChristophWurst I sent you an email with a sentry share link to one of these debug events.
Let me know, if I can supply you with any further info.