Transaction Indices

edit

Transactions are by default stored to indices of the format apm-[version]-transaction-[date].

Example Documents

edit

See how transaction documents can look like when indexed in Elasticsearch:

[
    {
        "transaction": {
            "sampled": true,
            "name": "GET /api/types",
            "span_count": {
                "started": 0
            },
            "result": "failure",
            "duration": {
                "us": 13980
            },
            "type": "request",
            "id": "85925e55b43f4340"
        },
        "container": {
            "id": "container-id"
        },
        "kubernetes": {
            "pod": {
                "uid": "pod-uid",
                "name": "pod-name"
            },
            "namespace": "namespace1"
        },
        "observer": {
            "ephemeral_id": "a8dcdc38-86e5-4adf-8ba4-93b65be40bdf",
            "version_major": 8,
            "hostname": "alloy",
            "version": "8.0.0",
            "type": "apm-server",
            "id": "d4d46875-dd50-465b-a5d7-8dd287e45144"
        },
        "process": {
            "ppid": 6789,
            "args": [
                "node",
                "server.js"
            ],
            "pid": 1234,
            "title": "node"
        },
        "timestamp": {
            "us": 1496170422281000
        },
        "@timestamp": "2017-05-30T18:53:42.281Z",
        "event": {
            "ingested": "2017-05-30T18:53:42.282Z"
        },
        "agent": {
            "version": "3.14.0",
            "name": "elastic-node"
        },
        "host": {
            "ip": "127.0.0.1",
            "os": {
                "platform": "darwin"
            },
            "architecture": "x64"
        },
        "service": {
            "node": {
                "name": "container-id"
            },
            "name": "1234_service-12a3",
            "language": {
                "version": "8",
                "name": "ecmascript"
            },
            "environment": "staging",
            "framework": {
                "version": "1.2.3",
                "name": "Express"
            },
            "version": "5.1.3",
            "runtime": {
                "version": "8.0.0",
                "name": "node"
            }
        },
        "ecs": {
            "version": "1.5.0"
        },
        "user": {
            "email": "foo@bar.com",
            "name": "foo",
            "id": "123user"
        },
        "trace": {
            "id": "85925e55b43f4340aaaaaaaaaaaaaaaa"
        },
        "processor": {
            "name": "transaction",
            "event": "transaction"
        }
    },
    {
        "transaction": {
            "sampled": false,
            "name": "GET /api/types",
            "span_count": {
                "started": 0
            },
            "result": "200",
            "duration": {
                "us": 13980
            },
            "type": "request",
            "id": "85925e55b43f4341"
        },
        "container": {
            "id": "container-id"
        },
        "kubernetes": {
            "pod": {
                "uid": "pod-uid",
                "name": "pod-name"
            },
            "namespace": "namespace1"
        },
        "observer": {
            "ephemeral_id": "a8dcdc38-86e5-4adf-8ba4-93b65be40bdf",
            "version_major": 8,
            "hostname": "alloy",
            "version": "8.0.0",
            "type": "apm-server",
            "id": "d4d46875-dd50-465b-a5d7-8dd287e45144"
        },
        "process": {
            "ppid": 6789,
            "args": [
                "node",
                "server.js"
            ],
            "pid": 1234,
            "title": "node"
        },
        "timestamp": {
            "us": 1496170422000000
        },
        "@timestamp": "2017-05-30T18:53:42.000Z",
        "event": {
            "ingested": "2017-05-30T18:53:42.001Z"
        },
        "agent": {
            "version": "3.14.0",
            "name": "elastic-node"
        },
        "host": {
            "ip": "127.0.0.1",
            "os": {
                "platform": "darwin"
            },
            "architecture": "x64"
        },
        "service": {
            "node": {
                "name": "container-id"
            },
            "name": "1234_service-12a3",
            "language": {
                "version": "8",
                "name": "ecmascript"
            },
            "environment": "staging",
            "framework": {
                "version": "1.2.3",
                "name": "Express"
            },
            "version": "5.1.3",
            "runtime": {
                "version": "8.0.0",
                "name": "node"
            }
        },
        "ecs": {
            "version": "1.5.0"
        },
        "user": {
            "email": "foo@bar.com",
            "name": "foo",
            "id": "123user"
        },
        "trace": {
            "id": "85925e55b43f4341aaaaaaaaaaaaaaaa"
        },
        "processor": {
            "name": "transaction",
            "event": "transaction"
        }
    },
    {
        "transaction": {
            "sampled": true,
            "name": "GET /api/types",
            "span_count": {
                "started": 1,
                "dropped": 258
            },
            "result": "200",
            "duration": {
                "us": 13980
            },
            "type": "request",
            "id": "85925e55b43f4342"
        },
        "container": {
            "id": "container-id"
        },
        "kubernetes": {
            "pod": {
                "uid": "pod-uid",
                "name": "pod-name"
            },
            "namespace": "namespace1"
        },
        "observer": {
            "ephemeral_id": "a8dcdc38-86e5-4adf-8ba4-93b65be40bdf",
            "version_major": 8,
            "hostname": "alloy",
            "version": "8.0.0",
            "type": "apm-server",
            "id": "d4d46875-dd50-465b-a5d7-8dd287e45144"
        },
        "process": {
            "ppid": 6789,
            "args": [
                "node",
                "server.js"
            ],
            "pid": 1234,
            "title": "node"
        },
        "timestamp": {
            "us": 1496170422281999
        },
        "@timestamp": "2017-05-30T18:53:42.281Z",
        "event": {
            "ingested": "2017-05-30T18:53:42.282Z"
        },
        "agent": {
            "version": "3.14.0",
            "name": "elastic-node"
        },
        "host": {
            "ip": "127.0.0.1",
            "os": {
                "platform": "darwin"
            },
            "architecture": "x64"
        },
        "service": {
            "node": {
                "name": "container-id"
            },
            "name": "1234_service-12a3",
            "language": {
                "version": "8",
                "name": "ecmascript"
            },
            "environment": "staging",
            "framework": {
                "version": "1.2.3",
                "name": "Express"
            },
            "version": "5.1.3",
            "runtime": {
                "version": "8.0.0",
                "name": "node"
            }
        },
        "ecs": {
            "version": "1.5.0"
        },
        "user": {
            "email": "foo@bar.com",
            "name": "foo",
            "id": "123user"
        },
        "trace": {
            "id": "85925e55b43f4342aaaaaaaaaaaaaaaa"
        },
        "processor": {
            "name": "transaction",
            "event": "transaction"
        }
    },
    {
        "user_agent": {
            "device": {
                "name": "Other"
            },
            "original": "Mozilla Chrome Edge",
            "name": "Other"
        },
        "container": {
            "id": "container-id"
        },
        "observer": {
            "ephemeral_id": "a8dcdc38-86e5-4adf-8ba4-93b65be40bdf",
            "version_major": 8,
            "hostname": "alloy",
            "version": "8.0.0",
            "type": "apm-server",
            "id": "d4d46875-dd50-465b-a5d7-8dd287e45144"
        },
        "kubernetes": {
            "pod": {
                "uid": "pod-uid",
                "name": "pod-name"
            },
            "namespace": "namespace1"
        },
        "process": {
            "ppid": 6789,
            "args": [
                "node",
                "server.js"
            ],
            "pid": 1234,
            "title": "node"
        },
        "timestamp": {
            "us": 1496170407154000
        },
        "@timestamp": "2017-05-30T18:53:27.154Z",
        "event": {
            "ingested": "2017-05-30T18:53:27.155Z"
        },
        "labels": {
            "organization_uuid": "9f0e9d64-c185-4d21-a6f4-4673ed561ec8",
            "bool_error": false,
            "number_code": 2
        },
        "agent": {
            "version": "1.3",
            "name": "js-base"
        },
        "client": {
            "ip": "8.8.8.8",
            "geo": {
                "continent_name": "North America",
                "country_iso_code": "US",
                "location": {
                    "lat": 37.751,
                    "lon": -97.822
                }
            }
        },
        "source": {
            "ip": "8.8.8.8"
        },
        "host": {
            "ip": "127.0.0.1",
            "os": {
                "platform": "darwin"
            },
            "architecture": "x64"
        },
        "service": {
            "node": {
                "name": "special-name"
            },
            "name": "serviceabc",
            "language": {
                "version": "8",
                "name": "ecmascript"
            },
            "environment": "staging",
            "framework": {
                "version": "1.2.3",
                "name": "Express"
            },
            "version": "5.1.3",
            "runtime": {
                "version": "8.0.0",
                "name": "javascript"
            }
        },
        "ecs": {
            "version": "1.5.0"
        },
        "url": {
            "domain": "www.example.com",
            "full": "https://www.example.com/p/a/t/h?query=string#hash",
            "fragment": "#hash",
            "port": 8080,
            "query": "?query=string",
            "path": "/p/a/t/h",
            "scheme": "https",
            "original": "/p/a/t/h?query=string#hash"
        },
        "trace": {
            "id": "945254c567a5417eaaaaaaaaaaaaaaaa"
        },
        "http": {
            "version": "1.1",
            "request": {
                "body": {
                    "original": {
                        "additional": {
                            "req": "additional information",
                            "bar": 123
                        },
                        "str": "hello world"
                    }
                },
                "cookies": {
                    "c2": "v2",
                    "c1": "v1"
                },
                "socket": {
                    "encrypted": true,
                    "remote_address": "8.8.8.8"
                },
                "headers": {
                    "Some-Other-Header": [
                        "foo"
                    ],
                    "Content-Type": [
                        "text/html"
                    ],
                    "Array": [
                        "foo",
                        "bar",
                        "baz"
                    ],
                    "Cookie": [
                        "c1=v1,c2=v2"
                    ],
                    "User-Agent": [
                        "Mozilla Chrome Edge"
                    ]
                },
                "env": {
                    "SERVER_SOFTWARE": "nginx",
                    "GATEWAY_INTERFACE": "CGI/1.1"
                },
                "method": "post"
            },
            "response": {
                "headers": {
                    "Content-Type": [
                        "application/json"
                    ]
                },
                "finished": true,
                "headers_sent": true,
                "status_code": 200
            }
        },
        "transaction": {
            "sampled": true,
            "name": "GET /api/types",
            "id": "945254c567a5417e",
            "span_count": {
                "started": 4,
                "dropped": 2
            },
            "custom": {
                "(": "not a valid regex and that is fine",
                "my_key": 1,
                "some_other_value": "foo bar",
                "and_objects": {
                    "foo": [
                        "bar",
                        "baz"
                    ]
                }
            },
            "result": "success",
            "marks": {
                "another_mark": {
                    "some_long": 10,
                    "some_float": 10
                },
                "navigationTiming": {
                    "navigationStart": -21,
                    "appBeforeBootstrap": 608.9300000000001
                }
            },
            "duration": {
                "us": 32592
            },
            "type": "request",
            "page": {
                "url": "http://localhost:8000/test/e2e/general-usecase/",
                "referer": "http://localhost:8000/test/e2e/"
            }
        },
        "processor": {
            "name": "transaction",
            "event": "transaction"
        },
        "user": {
            "id": "99",
            "email": "foo@example.com"
        }
    }
]