API keys

PRIVATE API KEY:

{{ $ctrl.resource.api_key }}

PUBLIC API KEY (for javascript clients):

{{ $ctrl.resource.public_key }}

Your key will be used to identify to which application your data belongs to please keep them private at all times.

Regenerate API keys

Are you sure you want to regenerate API KEY for this application?

All client application keys will need to be updated.

How to connect your application?

Visit our developer documentation for step-by-step integration instructions.

Django Logo Pyramid Logo Flask Logo Javascript Logo Node.js Ruby Logo PHP Logo


Required for Javascript error tracking (one line one domain, skip http:// part)

Application requires to send at least this amount of error reports per minute to open alert

Application requires to send at least this amount of slow reports per minute to open alert

Allow permanent storage of logs in separate DB partitions (only administrator can enable this feature)

Plugins

API Testing

Please be sure to add at least one email alert channel for your account.

This will enable AppEnlight to send you notification emails about errors inside your $ctrl.

After this is done you can use this CURL commands to test APIs:

(Please note that the data like execution times is semi randomly generated)

Log API
curl -H "Content-Type: application/json" -k {{$ctrl.AeConfig.urls.baseUrl}}api/logs?protocol_version=0.5\&api_key={{$ctrl.resource.api_key}} -d '
    [
      {
      "log_level": "WARNING",
      "message": "OMG ValueError happened",
      "namespace": "some.namespace.indicator",
      "request_id": "SOME_UUID",
      "permanent": false,
      "primary_key": "random_key",
      "server": "some.server.hostname",
      "date": "{{$ctrl.momentJs.utc().milliseconds(0).toISOString()}}",
      "tags": [["tag1","value"], ["tag2", 5]]
      },
      {
      "log_level": "ERROR",
      "message": "OMG ValueError happened2",
      "namespace": "some.namespace.indicator",
      "request_id": "SOME_UUID",
      "permanent": false,
      "server": "some.server.hostname",
      "date": "{{$ctrl.momentJs.utc().milliseconds(0).toISOString()}}"
      }
    ]'
                    
Report API
curl -H "Content-Type: application/json" -k {{$ctrl.AeConfig.urls.baseUrl}}api/reports?protocol_version=0.5\&api_key={{$ctrl.resource.api_key}} -d '
    [{
    "client": "your-client-name-python",
    "language": "python",
    "view_name": "views/foo:bar",
    "server": "SERVERNAME/INSTANCENAME",
    "priority": 5,
    "error": "OMG ValueError happened",
    "occurences":1,
    "http_status": 500,
    "tags": [["tag1","value"], ["tag2", 5]],
    "username": "USER",
    "url": "HTTP://SOMEURL",
    "ip": "127.0.0.1",
    "start_time": "{{$ctrl.momentJs.utc().milliseconds(0).toISOString()}}",
    "end_time": "{{$ctrl.momentJs.utc().milliseconds(0).add(2, 'seconds').toISOString()}}",
    "user_agent": "BROWSER_AGENT",
    "extra": [["message","CUSTOM MESSAGE"], ["custom_value", "some payload"]],
    "request_id": "SOME_UUID",
    "request": {"REQUEST_METHOD": "GET",
             "PATH_INFO": "/FOO/BAR",
             "POST": {"FOO":"BAZ","XXX":"YYY"}
             },
    "slow_calls":[{
                   "start": "{{$ctrl.momentJs.utc().milliseconds(0).toISOString()}}",
                   "end": "{{$ctrl.momentJs.utc().milliseconds(0).add(1, 'seconds').toISOString()}}",
                   "type": "sql",
                   "subtype": "postgresql",
                   "parameters": ["QPARAM1","QPARAM2","QPARAMX"],
                   "statement": "QUERY"
                   }],
    "request_stats": {
                    "main": 2.50779,
                    "nosql": 0.01008,
                    "nosql_calls": 17.0,
                    "remote": 0.0,
                    "remote_calls": 0.0,
                    "sql": 1,
                    "sql_calls": 1.0,
                    "tmpl": 0.0,
                    "tmpl_calls": 0.0,
                    "custom": 0.0,
                    "custom_calls": 0.0
                },
    "traceback": [
                {"cline": "return foo_bar_baz(1,2,3)",
                "file": "somedir/somefile.py",
                "fn": "somefunction",
                "line": 454,
                "vars": [["a_list",
                         ["1",2,"4","5",6]],
                         ["b", {"1": "2", "ccc": "ddd", "1": "a"}],
                         ["obj", "object object at 0x7f0030853dc0"]]
                        },
                        {"cline": "OMG ValueError happened",
                        "file": "",
                        "fn": "",
                        "line": "",
                        "vars": []}
                        ]
                        }]'
                    
Metrics API
curl -H "Content-Type: application/json" -k {{$ctrl.AeConfig.urls.baseUrl}}api/general_metrics?protocol_version=0.5\&api_key={{$ctrl.resource.api_key}} -d '
        [{
        "namespace": "some.monitor",
        "timestamp": "{{$ctrl.momentJs.utc().milliseconds(0).toISOString()}}",
        "server_name": "server.name",
        "tags": [["value1", 15.7], ["value2", 26]]}]'
                    
Request Stats API
curl -H "Content-Type: application/json" -k {{$ctrl.AeConfig.urls.baseUrl}}api/request_stats?protocol_version=0.5\&api_key={{$ctrl.resource.api_key}} -d '
        [{"server": "some.server.hostname",
          "timestamp": "{{$ctrl.momentJs.utc().milliseconds(0).toISOString()}}",
          "metrics": [["dir/module:func",
               {"custom": 0.0,
                "custom_calls": 0,
                "main": 0.01664,
                "nosql": 0.00061,
                "nosql_calls": 23,
                "remote": 0.0,
                "remote_calls": 0,
                "requests": 1,
                "sql": 0.00105,
                "sql_calls": 2,
                "tmpl": 0.0,
                "tmpl_calls": 0}],
              ["SomeView.function",
               {"custom": 0.0,
                "custom_calls": 0,
                "main": 0.647261,
                "nosql": 0.306554,
                "nosql_calls": 140,
                "remote": 0.0,
                "remote_calls": 0,
                "requests": 28,
                "sql": 0.0,
                "sql_calls": 0,
                "tmpl": 0.0,
                "tmpl_calls": 0}]]
                }]'
                    

Postprocessing

This section allows you influence the rating of report groups - if rule is matched once its not executed anymore

Add rule

Administration

Transfer ownership

Please note that by transfering ownership you WILL lose access to the application data and new owner needs to give you access permission


Remove application

This operation will wipe out all data from database - there is no undo.