Example metric documents

edit

This example shows what metric documents can look like when indexed in Elasticsearch:

[
    {
        "@timestamp": "2017-05-30T18:53:41.364Z",
        "agent": {
            "name": "elastic-node",
            "version": "3.14.0"
        },
        "ecs": {
            "version": "1.5.0"
        },
        "event": {
            "ingested": "2020-04-22T14:55:05.425020Z"
        },
        "go": {
            "memstats": {
                "heap": {
                    "sys": {
                        "bytes": 6520832.0
                    }
                }
            }
        },
        "host": {
            "ip": "127.0.0.1"
        },
        "labels": {
            "tag1": "one",
            "tag2": 2
        },
        "observer": {
            "ephemeral_id": "8785cbe1-7f89-4279-84c2-6c33979531fb",
            "hostname": "ix.lan",
            "id": "b0cfe4b7-76c9-4159-95ff-e558db368cbe",
            "type": "apm-server",
            "version": "8.0.0",
            "version_major": 8
        },
        "process": {
            "pid": 1234
        },
        "processor": {
            "event": "metric",
            "name": "metric"
        },
        "service": {
            "language": {
                "name": "ecmascript"
            },
            "name": "1234_service-12a3",
            "node": {
                "name": "node-1"
            }
        },
        "user": {
            "email": "user@mail.com",
            "id": "axb123hg",
            "name": "logged-in-user"
        }
    },
    {
        "@timestamp": "2017-05-30T18:53:42.281Z",
        "agent": {
            "name": "elastic-node",
            "version": "3.14.0"
        },
        "byte_counter": 1,
        "dotted": {
            "float": {
                "gauge": 6.12
            }
        },
        "double_gauge": 3.141592653589793,
        "ecs": {
            "version": "1.5.0"
        },
        "event": {
            "ingested": "2020-04-22T14:55:05.368308Z"
        },
        "float_gauge": 9.16,
        "host": {
            "ip": "127.0.0.1"
        },
        "integer_gauge": 42767,
        "labels": {
            "code": 200,
            "some": "abc",
            "success": true,
            "tag1": "one",
            "tag2": 2
        },
        "long_gauge": 3147483648.0,
        "negative": {
            "d": {
                "o": {
                    "t": {
                        "t": {
                            "e": {
                                "d": -1022
                            }
                        }
                    }
                }
            }
        },
        "observer": {
            "ephemeral_id": "8785cbe1-7f89-4279-84c2-6c33979531fb",
            "hostname": "ix.lan",
            "id": "b0cfe4b7-76c9-4159-95ff-e558db368cbe",
            "type": "apm-server",
            "version": "8.0.0",
            "version_major": 8
        },
        "process": {
            "pid": 1234
        },
        "processor": {
            "event": "metric",
            "name": "metric"
        },
        "service": {
            "language": {
                "name": "ecmascript"
            },
            "name": "1234_service-12a3",
            "node": {
                "name": "node-1"
            }
        },
        "short_counter": 227,
        "span": {
            "self_time": {
                "count": 1,
                "sum": {
                    "us": 633.288
                }
            },
            "subtype": "mysql",
            "type": "db"
        },
        "transaction": {
            "breakdown": {
                "count": 12
            },
            "duration": {
                "count": 2,
                "sum": {
                    "us": 12
                }
            },
            "name": "GET /",
            "self_time": {
                "count": 2,
                "sum": {
                    "us": 10
                }
            },
            "type": "request"
        },
        "user": {
            "email": "user@mail.com",
            "id": "axb123hg",
            "name": "logged-in-user"
        }
    }
]