Skip to content


Folders and files

Last commit message
Last commit date

Latest commit



10 Commits

Repository files navigation

Sentry SDK for ColdFusion

sentry-cfml is based on the original raven-cfml client developed by jmacul2 (

sentry-cfml is a CFML client for Sentry and it has been updated to work with Sentry's Protocol @ version 7.

sentry-cfml been updated to full script with support to instantiate and use as a singleton. Also some functions have been rewritten to use either new ColdFusion language enhancements or existing functions.

sentry-cfml is for use with at least ColdFusion 2016. Testing on earlier versions of ColdFusion has not been done.

Sentry SDK Documentation


To install simply clone or download the sentry.cfc file and place it anywhere in your project.

Instantiating as a Singleton

sentry-cfml can be instantiated each time you call it or it can also live as a Singleton in your Application scope.

function onApplicationStart(){

    application.sentry = new
        release     : "release-number-of-your-application",
        environment : "production|staging|etc",
        publicKey   : "your-public-key",
        privateKey  : "your-private-key",
        projectID   : "your-project-id"

    return true;

Using in your Application

Add to the onError() function to use for application wide errors.

function onError(
       exception : arguments.exception


It is recommended that you review the Sentry SDK Docs to understand the attributes and Interfaces that are supported.


The following are examples on how to send messages and errors to Sentry. The examples are based on the singleton instance.

Passing Messages

An information Message using a thread to post to Sentry including data that is passed into the User Interface

        message     : "This is just info",
        level       : "info",
        useThread   : true,
        userInfo    : {
            id          : 100,
            email       : "",
            type        : "administrator",
            username    : "john",
            ip_address  : cgi.remote_addr

Other level types allowed by Sentry

        message :"This is a fatal message",
        level   :"fatal"

        message :"This is an error message",
        level   :"error"

        message :"This is a warning message",
        level   :"warning"

        message :"This is a debug message",
        level   :"debug"

Capturing Errors

To capture an error you simply use the captureExeption function. Capturing an exception allows for more options than just posting a message. Review the argument hints on the CFC for more information.

        exception                   : e,
        level                       : "error",
        oneLineStackTrace           : true,
        showJavaStackTrace          : true,
        removeTabsOnJavaStackTrace  : false,
        additionalData              : {
            session : session
        useSignature                : false,
        cgiVars                     : cgi,
        useThread                   : true,
        userInfo                    : {}


No releases published


No packages published

Contributors 4