rollbar

Class RollbarService

lucee.Component
    extended by rollbar.RollbarService

Copyright Since 2005 ColdBox Framework by Luis Majano and Ortus Solutions, Corp www.ortussolutions.com --- Connector to Rollbar

Class Attributes:
  • singleton
  •  
  • synchronized : false
  •  
  • accessors : true
  •  
  • persistent : false
  •  
    Property Summary
    type property default serializable required
    any APIBaseURL
          API Base URL.

    • access = public
    • returntype = any
    https://api.rollbar.com/api/1/item/ true false
    struct moduleConfig
          Module Configuration struct.

    • access = public
    • returntype = any
    true false
    struct settings
          Module Settings.

    • access = public
    • returntype = any
    true false
    Constructor Summary
    init(struct settings, any coldbox)
          Constructor.
    Method Summary
    any exceptionToLogBody(any exception)
         Convert an exception to log body struct.
    string getAPIBaseURL()
    private any getHostName()
         Get the host name you are on.
    string getModuleConfig()
    private any getRealIP()
         Get Real IP, by looking at clustered, proxy headers and locally.
    string getSettings()
    private any marshallStackTrace(any exception)
         Marshall a stack trace.
    private struct sanitizeFields(struct data)
         Sanitize fields.
    private any sanitizeHeaders(struct data)
         Sanitize the incoming http headers in the request data struct.
    private any sanitizeQueryString(string target)
         Sanitize the incoming query string.
    any sendMessage(string message, [struct metadata='[runtime expression]'], [any level='info'])
         Send a message to rollbar.
    any sendToRollbar(struct logBody, [struct metadata='[runtime expression]'], [any level='info'])
         Send a log body to rollbar.
    any setAPIBaseURL(any APIBaseURL)
    any setModuleConfig(struct moduleConfig)
    any setSettings(struct settings)
     
    Methods inherited from class lucee.Component
    None

    Constructor Detail

    init

    public init(struct settings, any coldbox)

    Constructor

    Parameters:
    settings - The module settings
    coldbox

    Property Detail

    APIBaseURL

    property any APIBaseURL = [https://api.rollbar.com/api/1/item/]

    API Base URL

    Attributes:
    access - public
    required - false
    returntype - any
    serializable - true

    moduleConfig

    property struct moduleConfig

    Module Configuration struct

    Attributes:
    access - public
    required - false
    returntype - any
    serializable - true

    settings

    property struct settings

    Module Settings

    Attributes:
    access - public
    required - false
    returntype - any
    serializable - true

    Method Detail

    exceptionToLogBody

    public any exceptionToLogBody(any exception)

    Convert an exception to log body struct

    Parameters:
    exception - The exception object

    getAPIBaseURL

    public string getAPIBaseURL()


    getHostName

    private any getHostName()

    Get the host name you are on


    getModuleConfig

    public string getModuleConfig()


    getRealIP

    private any getRealIP()

    Get Real IP, by looking at clustered, proxy headers and locally.


    getSettings

    public string getSettings()


    marshallStackTrace

    private any marshallStackTrace(any exception)

    Marshall a stack trace

    Parameters:
    exception - The exception object

    sanitizeFields

    private struct sanitizeFields(struct data)

    Sanitize fields

    Parameters:
    data - The data fields struct

    sanitizeHeaders

    private any sanitizeHeaders(struct data)

    Sanitize the incoming http headers in the request data struct

    Parameters:
    data - The HTTP data struct, passed by reference

    sanitizeQueryString

    private any sanitizeQueryString(string target)

    Sanitize the incoming query string

    Parameters:
    target - The target string to sanitize

    sendMessage

    public any sendMessage(string message, [struct metadata='[runtime expression]'], [any level='info'])

    Send a message to rollbar

    Parameters:
    message - A string message
    metadata - A struct of metadata to send alongside the message
    level - One of: "critical", "error", "warning", "info", "debug", defaults to "info"
    Returns:
    struct

    sendToRollbar

    public any sendToRollbar(struct logBody, [struct metadata='[runtime expression]'], [any level='info'])

    Send a log body to rollbar

    Parameters:
    logBody - The logBody struct to send as a message
    metadata - A struct of metadata to send alongside the message
    level - One of: "critical", "error", "warning", "info", "debug", defaults to "info"
    Returns:
    struct

    setAPIBaseURL

    public any setAPIBaseURL(any APIBaseURL)

    Parameters:
    APIBaseURL

    setModuleConfig

    public any setModuleConfig(struct moduleConfig)

    Parameters:
    moduleConfig

    setSettings

    public any setSettings(struct settings)

    Parameters:
    settings