Error Indicesedit

Errors are stored in separate indices of the format apm-[version]-error-[date]. Read more about the general purpose of error documents.

Example documentedit

Example of an error document indexed in Elasticsearch:

{
    "context": {
        "custom": {
            "and_objects": {
                "foo": [
                    "bar",
                    "baz"
                ]
            },
            "my_key": 1,
            "some_other_value": "foo bar"
        },
        "process": {
            "argv": [
                "node",
                "server.js"
            ],
            "pid": 1234,
            "ppid": 7788,
            "title": "node"
        },
        "request": {
            "body": "Hello World",
            "cookies": {
                "c1": "v1",
                "c2": "v2"
            },
            "env": {
                "GATEWAY_INTERFACE": "CGI/1.1",
                "SERVER_SOFTWARE": "nginx"
            },
            "headers": {
                "array": [
                    "foo",
                    "bar",
                    "baz"
                ],
                "content-type": "text/html",
                "cookie": "c1=v1; c2=v2",
                "some-other-header": "foo",
                "user-agent": "Mozilla Chrome Edge"
            },
            "http_version": "1.1",
            "method": "POST",
            "socket": {
                "encrypted": true,
                "remote_address": "12.53.12.1"
            },
            "url": {
                "full": "https://www.example.com/p/a/t/h?query=string#hash",
                "hash": "#hash",
                "hostname": "www.example.com",
                "pathname": "/p/a/t/h",
                "port": "8080",
                "protocol": "https:",
                "raw": "/p/a/t/h?query=string#hash",
                "search": "?query=string"
            }
        },
        "response": {
            "finished": true,
            "headers": {
                "content-type": "application/json"
            },
            "headers_sent": true,
            "status_code": 200
        },
        "service": {
            "agent": {
                "name": "elastic-node",
                "version": "3.14.0"
            },
            "environment": "staging",
            "framework": {
                "name": "Express",
                "version": "1.2.3"
            },
            "language": {
                "name": "ecmascript",
                "version": "8"
            },
            "name": "1234_service-12a3",
            "runtime": {
                "name": "node",
                "version": "8.0.0"
            },
            "version": "5.1.3"
        },
        "system": {
            "architecture": "x64",
            "hostname": "prod1.example.com",
            "platform": "darwin"
        },
        "tags": {
            "organization_uuid": "9f0e9d64-c185-4d21-a6f4-4673ed561ec8"
        },
        "user": {
            "email": "foo@example.com",
            "id": 99,
            "username": "foo"
        }
    },
    "error": {
        "culprit": "my.module.function_name",
        "exception": {
            "attributes": {
                "foo": "bar"
            },
            "code": "42",
            "handled": false,
            "message": "The username root is unknown",
            "module": "__builtins__",
            "stacktrace": [
                {
                    "abs_path": "/real/file/name.py",
                    "context": {
                        "post": [
                            "line4",
                            "line5"
                        ],
                        "pre": [
                            "line1",
                            "line2"
                        ]
                    },
                    "exclude_from_grouping": false,
                    "filename": "file/name.py",
                    "function": "foo",
                    "library_frame": true,
                    "line": {
                        "column": 4,
                        "context": "line3",
                        "number": 3
                    },
                    "module": "App::MyModule",
                    "vars": {
                        "key": "value"
                    }
                },
                {
                    "abs_path": "/Users/watson/code/node_modules/elastic/lib/instrumentation/index.js",
                    "context": {
                        "post": [
                            "    ins.currentTransaction = prev",
                            "    return result",
                            "}",
                            "}",
                            "",
                            "Instrumentation.prototype._recoverTransaction = function (trans) {",
                            "  if (this.currentTransaction === trans) return"
                        ],
                        "pre": [
                            "  var trans = this.currentTransaction",
                            "",
                            "  return instrumented",
                            "",
                            "  function instrumented () {",
                            "    var prev = ins.currentTransaction",
                            "    ins.currentTransaction = trans"
                        ]
                    },
                    "exclude_from_grouping": false,
                    "filename": "lib/instrumentation/index.js",
                    "function": "instrumented",
                    "line": {
                        "context": "    var result = original.apply(this, arguments)",
                        "number": 102
                    },
                    "vars": {
                        "key": "value"
                    }
                }
            ],
            "type": "DbError"
        },
        "grouping_key": "50f62f37edffc4630c6655ba3ecfcf46",
        "id": "5f0e9d64-c185-4d21-a6f4-4673ed561ec8",
        "log": {
            "level": "warning",
            "logger_name": "my.logger.name",
            "message": "My service could not talk to the database named foobar",
            "param_message": "My service could not talk to the database named %s",
            "stacktrace": [
                {
                    "abs_path": "/real/file/name.py",
                    "context": {
                        "post": [
                            "line4",
                            "line5"
                        ],
                        "pre": [
                            "line1",
                            "line2"
                        ]
                    },
                    "exclude_from_grouping": false,
                    "filename": "/webpack/file/name.py",
                    "function": "foo",
                    "library_frame": false,
                    "line": {
                        "column": 4,
                        "context": "line3",
                        "number": 3
                    },
                    "module": "App::MyModule",
                    "vars": {
                        "key": "value"
                    }
                },
                {
                    "abs_path": "/Users/watson/code/node_modules/elastic/lib/instrumentation/index.js",
                    "context": {
                        "post": [
                            "    ins.currentTransaction = prev",
                            "    return result",
                            "}",
                            "}",
                            "",
                            "Instrumentation.prototype._recoverTransaction = function (trans) {",
                            "  if (this.currentTransaction === trans) return"
                        ],
                        "pre": [
                            "  var trans = this.currentTransaction",
                            "",
                            "  return instrumented",
                            "",
                            "  function instrumented () {",
                            "    var prev = ins.currentTransaction",
                            "    ins.currentTransaction = trans"
                        ]
                    },
                    "exclude_from_grouping": false,
                    "filename": "lib/instrumentation/index.js",
                    "function": "instrumented",
                    "line": {
                        "context": "    var result = original.apply(this, arguments)",
                        "number": 102
                    },
                    "vars": {
                        "key": "value"
                    }
                }
            ]
        }
    },
    "processor": {
        "event": "error",
        "name": "error"
    },
    "transaction": {
        "id": "945254c5-67a5-417e-8a4e-aa29efcbfb79"
    }
}