Metric Indicesedit

By default, metrics are stored to indices of the format apm-[version]-metric-[date].

Example Documentsedit

Here’s what a metric document looks like when indexed in Elasticsearch:

[
    {
        "agent": {
            "name": "elastic-node",
            "version": "3.14.0"
        },
        "process": {
            "pid": 1234
        },
        "go": {
            "memstats": {
                "heap": {
                    "sys": {
                        "bytes": 6520832.0
                    }
                }
            }
        },
        "processor": {
            "name": "metric",
            "event": "metric"
        },
        "labels": {
            "tag1": "one",
            "tag2": 2
        },
        "observer": {
            "hostname": "x1",
            "id": "a7c0ce59-daf8-49ba-860f-ef1b52246c2b",
            "ephemeral_id": "94e0ca6d-6394-4185-a101-98cb24aaf19b",
            "type": "apm-server",
            "version": "7.7.0",
            "version_major": 7
        },
        "@timestamp": "2017-05-30T18:53:41.364Z",
        "ecs": {
            "version": "1.5.0"
        },
        "service": {
            "node": {
                "name": "node-1"
            },
            "name": "1234_service-12a3",
            "language": {
                "name": "ecmascript"
            }
        },
        "event": {
            "ingested": "2020-03-12T07:34:49.211976Z"
        },
        "user": {
            "name": "logged-in-user",
            "id": "axb123hg",
            "email": "user@mail.com"
        }
    },
    {
        "agent": {
            "name": "elastic-node",
            "version": "3.14.0"
        },
        "byte_counter": 1,
        "double_gauge": 3.141592653589793,
        "observer": {
            "hostname": "x1",
            "id": "045dfe88-de7d-479c-8635-60329e4a3e1f",
            "ephemeral_id": "ba893567-a118-43b6-bf33-e45b844b0d4e",
            "type": "apm-server",
            "version": "7.7.0",
            "version_major": 7
        },
        "negative": {
            "d": {
                "o": {
                    "t": {
                        "t": {
                            "e": {
                                "d": -1022
                            }
                        }
                    }
                }
            }
        },
        "ecs": {
            "version": "1.5.0"
        },
        "event": {
            "ingested": "2020-03-12T07:34:48.922439Z"
        },
        "dotted": {
            "float": {
                "gauge": 6.12
            }
        },
        "process": {
            "pid": 1234
        },
        "processor": {
            "name": "metric",
            "event": "metric"
        },
        "labels": {
            "tag1": "one",
            "some": "abc",
            "code": 200,
            "success": true,
            "tag2": 2
        },
        "integer_gauge": 42767,
        "@timestamp": "2017-05-30T18:53:42.281Z",
        "service": {
            "node": {
                "name": "node-1"
            },
            "name": "1234_service-12a3",
            "language": {
                "name": "ecmascript"
            }
        },
        "long_gauge": 3147483648.0,
        "short_counter": 227,
        "float_gauge": 9.16,
        "user": {
            "name": "logged-in-user",
            "id": "axb123hg",
            "email": "user@mail.com"
        },
        "transaction": {
            "duration": {
                "count": 2,
                "sum": {
                    "us": 12
                }
            },
            "self_time": {
                "count": 2,
                "sum": {
                    "us": 10
                }
            },
            "breakdown": {
                "count": 12
            },
            "name": "GET /",
            "type": "request"
        },
        "span": {
            "self_time": {
                "count": 1,
                "sum": {
                    "us": 633.288
                }
            },
            "subtype": "mysql",
            "type": "db"
        }
    }
]