Transaction Indicesedit

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

Example Documentsedit

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

{
    "events": [
        {
            "@timestamp": "2018-08-01T10:00:00Z",
            "agent": {
                "name": "elastic-node",
                "version": "3.14.0"
            },
            "container": {
                "id": "container-id"
            },
            "host": {
                "architecture": "x64",
                "hostname": "node-name",
                "ip": "192.0.0.1",
                "os": {
                    "platform": "darwin"
                }
            },
            "kubernetes": {
                "namespace": "namespace1",
                "node": {
                    "name": "node-name"
                },
                "pod": {
                    "name": "pod-name",
                    "uid": "pod-uid"
                }
            },
            "labels": {
                "tag1": "one",
                "tag2": 2
            },
            "parent": {
                "id": "abcdefabcdef01234567"
            },
            "process": {
                "args": [
                    "node",
                    "server.js"
                ],
                "pid": 1234,
                "ppid": 6789,
                "title": "node"
            },
            "processor": {
                "event": "transaction",
                "name": "transaction"
            },
            "service": {
                "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"
            },
            "timestamp": {
                "us": 1533117600000000
            },
            "trace": {
                "id": "0123456789abcdef0123456789abcdef"
            },
            "transaction": {
                "duration": {
                    "us": 32592
                },
                "id": "945254c567a5417e",
                "sampled": true,
                "span_count": {
                    "started": 43
                },
                "type": "request"
            },
            "user": {
                "email": "bar@user.com",
                "id": "123user",
                "name": "bar"
            }
        },
        {
            "@timestamp": "2017-05-30T18:53:27.154Z",
            "agent": {
                "name": "elastic-node",
                "version": "3.14.0"
            },
            "container": {
                "id": "container-id"
            },
            "host": {
                "architecture": "x64",
                "hostname": "node-name",
                "ip": "192.0.0.1",
                "os": {
                    "platform": "darwin"
                }
            },
            "http": {
                "request": {
                    "body": {
                        "original": {
                            "additional": {
                                "bar": 123,
                                "req": "additional information"
                            },
                            "str": "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"
                        ]
                    },
                    "method": "post",
                    "socket": {
                        "encrypted": true,
                        "remote_address": "12.53.12.1"
                    }
                },
                "response": {
                    "finished": true,
                    "headers": {
                        "Content-Type": [
                            "application/json"
                        ]
                    },
                    "headers_sent": true,
                    "status_code": 200
                },
                "version": "1.1"
            },
            "kubernetes": {
                "namespace": "namespace1",
                "node": {
                    "name": "node-name"
                },
                "pod": {
                    "name": "pod-name",
                    "uid": "pod-uid"
                }
            },
            "labels": {
                "organization_uuid": "9f0e9d64-c185-4d21-a6f4-4673ed561ec8",
                "tag1": "one",
                "tag2": 12,
                "tag3": 12.45,
                "tag4": false
            },
            "process": {
                "args": [
                    "node",
                    "server.js"
                ],
                "pid": 1234,
                "ppid": 6789,
                "title": "node"
            },
            "processor": {
                "event": "transaction",
                "name": "transaction"
            },
            "service": {
                "environment": "staging",
                "framework": {
                    "name": "Express",
                    "version": "1.2.3"
                },
                "language": {
                    "name": "ecmascript",
                    "version": "8"
                },
                "name": "1234_service-12a3",
                "runtime": {
                    "name": "node",
                    "version": "7.0"
                },
                "version": "5.1.3"
            },
            "timestamp": {
                "us": 1496170407154000
            },
            "trace": {
                "id": "0acd456789abcdef0123456789abcdef"
            },
            "transaction": {
                "custom": {
                    "(": "not a valid regex and that is fine",
                    "and_objects": {
                        "foo": [
                            "bar",
                            "baz"
                        ]
                    },
                    "my_key": 1,
                    "some_other_value": "foo bar"
                },
                "duration": {
                    "us": 32592
                },
                "id": "4340a8e0df1906ecbfa9",
                "name": "GET /api/types",
                "page": {
                    "referer": "http://localhost:8000/test/e2e/",
                    "url": "http://localhost:8000/test/e2e/general-usecase/"
                },
                "result": "success",
                "sampled": true,
                "span_count": {
                    "started": 17
                },
                "type": "request"
            },
            "url": {
                "domain": "www.example.com",
                "fragment": "#hash",
                "full": "https://www.example.com/p/a/t/h?query=string#hash",
                "original": "/p/a/t/h?query=string#hash",
                "path": "/p/a/t/h",
                "port": 8080,
                "query": "?query=string",
                "scheme": "https"
            },
            "user": {
                "id": "99",
                "name": "foo"
            },
            "user_agent": {
                "original": "Mozilla Chrome Edge"
            }
        },
        {
            "@timestamp": "2018-07-30T18:53:42.281Z",
            "agent": {
                "ephemeral_id": "justanid",
                "name": "elastic-ruby",
                "version": "2.2"
            },
            "container": {
                "id": "container-id"
            },
            "host": {
                "architecture": "x64",
                "hostname": "node-name",
                "ip": "192.0.0.1",
                "os": {
                    "platform": "darwin"
                }
            },
            "http": {
                "request": {
                    "method": "post"
                }
            },
            "kubernetes": {
                "namespace": "namespace1",
                "node": {
                    "name": "node-name"
                },
                "pod": {
                    "name": "pod-name",
                    "uid": "pod-uid"
                }
            },
            "labels": {
                "tag1": "one",
                "tag2": 2
            },
            "process": {
                "args": [
                    "node",
                    "server.js"
                ],
                "pid": 1234,
                "ppid": 6789,
                "title": "node"
            },
            "processor": {
                "event": "transaction",
                "name": "transaction"
            },
            "service": {
                "environment": "testing",
                "framework": {
                    "name": "Rails",
                    "version": "5.0"
                },
                "language": {
                    "name": "ruby",
                    "version": "2.5"
                },
                "name": "service1",
                "runtime": {
                    "name": "cruby",
                    "version": "2.5"
                },
                "version": "2"
            },
            "timestamp": {
                "us": 1532976822281000
            },
            "trace": {
                "id": "0acd456789abcdef0123456789abcdef"
            },
            "transaction": {
                "duration": {
                    "us": 13980
                },
                "id": "cdef4340a8e0df19",
                "marks": {
                    "another_mark": {
                        "some_float": 10,
                        "some_long": 10
                    },
                    "navigationTiming": {
                        "appBeforeBootstrap": 608.93,
                        "navigationStart": -21
                    }
                },
                "sampled": true,
                "span_count": {
                    "dropped": 55,
                    "started": 436
                },
                "type": "request"
            },
            "user": {
                "email": "bar@user.com",
                "id": "123user",
                "name": "bar"
            }
        }
    ]
}