Coder Social home page Coder Social logo

rob5300 / sm-sentry-error-logger Goto Github PK

View Code? Open in Web Editor NEW
7.0 2.0 6.0 8.08 MB

Log srcds Sourcemod errors and exceptions to Sentry.io. Made for TF2.

Python 20.04% Makefile 8.71% C 43.04% SourcePawn 1.14% C++ 27.06%
sourcemod sourcemod-extension sentry-integration sentry sentry-io metamod tf2 cpp

sm-sentry-error-logger's Introduction

Sourcemod Sentry Error Logger

Log sourcemod errors and sourcepawn exceptions to a sentry.io instance.

Originaly made for use on Creators.TF servers, but can be used on any TF2 server running sourcemod.

Preview of the Sentry dashboard

Setup

On your Sentry.io instance, set up a project and get the SDK DSN url. Use this as the value for ce_sentry_dsn_url.

Put either the .dll or .so extension in your servers sourcemod/extensions folder. Create a .autoload file if you want the plugin to load on server start (e.g. ctferrorlogger.autoload).

Requirements

A TF2 server running an up to date version of sourcemod.

Linux servers require curl4 (x32 bit version) to be installed.

If you see an error message such as "libcurl.so.4: cannot open shared object file: No such file or directory" when trying to load the extension, you are missing curl4.

How to install curl 4 via apt for Debian/Ubuntu based distros:

  • Allow installing x32 bit versions of packages: sudo dpkg --add-architecture i386

  • Update apt sources: sudo apt-get update

  • Install i368(x32) version of curl 4: sudo apt-get install libcurl4:i386

Convars

  • ce_sentry_dsn_url Sentry DSN url, required. Extension will not setup without this.

  • ce_logreaderwaittime How many seconds between re checking for new log errors.

  • ce_server_index Server number (not required)

  • ce_environment Server environment (not required)

  • ce_region Server region (not required)

  • ce_type Server type (not required)

Known Issues

  • The extension may not properly work if it is unloaded then reloaded, but unloading should be fine.

  • The extension gets sourcemod errors (not exceptions) via reading the latest error log file. If there is a better way to achieve this, please let me know! This process is done on a timer as to not waste resources.

If you experience a new bug/crash, please create an issue here.

Building

Ensure you have the required dependencies for building Sourcemod.

Currently, the sourcemod and sdk dependency locations are assumed to be where they exist for the sample extensions, so clone this repo into /public folder. Metamod, Sourcemod and hl2sdk-tf2 are needed.

Linix:

Use the provided make file via make. Requires GCC 8 and above for full STD 17 support (w filesystem).

Ambuild cannot be used due to linker errors.

Windows:

Open and build using the solution file (ctferrorloggerext.sln). Ambuild can also be used for windows.

sm-sentry-error-logger's People

Contributors

kchnst avatar moonexpr avatar rob5300 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

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.