- Legacy APM Server Reference:
- Overview
- Get started
- Set up
- How-to guides
- Configure
- Secure
- Monitor
- API
- Explore data in Elasticsearch
- Exported fields
- APM Application Metrics fields
- APM Error fields
- APM Profile fields
- APM Sourcemap fields
- APM Span fields
- APM Span Metrics fields
- APM Transaction fields
- APM Transaction Metrics fields
- APM Transaction Metrics fields
- Beat fields
- Cloud provider metadata fields
- Docker fields
- ECS fields
- Host fields
- Kubernetes fields
- Process fields
- System Metrics fields
- Troubleshoot
- Upgrade
- Release notes
- APM Server version 7.15
- APM Server version 7.14
- APM Server version 7.13
- APM Server version 7.12
- APM Server version 7.11
- APM Server version 7.10
- APM Server version 7.9
- APM Server version 7.8
- APM Server version 7.7
- APM Server version 7.6
- APM Server version 7.5
- APM Server version 7.4
- APM Server version 7.3
- APM Server version 7.2
- APM Server version 7.1
- APM Server version 7.0
- APM Server version 6.8
- APM Server version 6.7
- APM Server version 6.6
- APM Server version 6.5
- APM Server version 6.4
- APM Server version 6.3
- APM Server version 6.2
- APM Server version 6.1
- APM integration (Elastic Agent)
The Elastic APM integration became generally available in 7.16 — see the APM Guide for updated documentation. Standalone APM Server users can see the Legacy APM Overview and Legacy APM Server Reference.
Example span documentsedit
This example shows what span documents can look like when indexed in Elasticsearch:
[ { "@timestamp": "2017-05-30T18:53:27.154Z", "agent": { "name": "elastic-node", "version": "3.14.0" }, "ecs": { "version": "1.11.0" }, "event": { "outcome": "unknown" }, "http": { "request": { "method": "GET" }, "response": { "status_code": 200 } }, "labels": { "span_tag": "something" }, "observer": { "ephemeral_id": "c0cea3b6-97d7-4e15-9e35-c868e7a3c869", "hostname": "ix.lan", "id": "a49b4a08-689a-4724-8050-8bd0ae043281", "type": "apm-server", "version": "8.0.0", "version_major": 8 }, "parent": { "id": "945254c567a5417e" }, "processor": { "event": "span", "name": "transaction" }, "service": { "environment": "staging", "name": "1234_service-12a3" }, "span": { "action": "query", "db": { "instance": "customers", "statement": "SELECT * FROM product_types WHERE user_id=?", "type": "sql", "user": { "name": "readonly_user" } }, "duration": { "us": 3781 }, "http": { "method": "GET", "response": { "status_code": 200 } }, "http.url.original": "http://localhost:8000", "id": "0aaaaaaaaaaaaaaa", "name": "SELECT FROM product_types", "stacktrace": [ { "abs_path": "net.js", "context": { "post": [ " ins.currentTransaction = prev", " return result", "}" ], "pre": [ " var trans = this.currentTransaction", "" ] }, "exclude_from_grouping": false, "filename": "net.js", "function": "onread", "library_frame": true, "line": { "column": 4, "context": "line3", "number": 547 }, "module": "some module", "vars": { "key": "value" } }, { "exclude_from_grouping": false, "filename": "my2file.js", "line": { "number": 10 } } ], "start": { "us": 2830 }, "subtype": "postgresql", "sync": false, "type": "db" }, "timestamp": { "us": 1496170407154000 }, "trace": { "id": "945254c567a5417eaaaaaaaaaaaaaaaa" }, "transaction": { "id": "945254c567a5417e" }, "url": { "original": "http://localhost:8000" } }, { "@timestamp": "2017-05-30T18:53:42.281Z", "agent": { "name": "js-base", "version": "1.3" }, "destination": { "address": "0:0::0:1", "ip": "0:0::0:1", "port": 5432 }, "ecs": { "version": "1.11.0" }, "event": { "outcome": "unknown" }, "observer": { "ephemeral_id": "2f13d8fa-83cd-4356-8123-aabfb47a1808", "hostname": "goat", "id": "17ad47dd-5671-4c89-979f-ef4533565ba2", "type": "apm-server", "version": "8.0.0", "version_major": 8 }, "parent": { "id": "85925e55b43f4342" }, "processor": { "event": "span", "name": "transaction" }, "service": { "environment": "staging", "name": "serviceabc" }, "span": { "action": "query.custom", "db": { "instance": "customers", "statement": "SELECT * FROM product_types WHERE user_id=?", "type": "sql", "user": { "name": "readonly_user" } }, "destination": { "service": { "name": "postgresql", "resource": "postgresql", "type": "db" } }, "duration": { "us": 3781 }, "id": "15aaaaaaaaaaaaaa", "name": "SELECT FROM product_types", "start": { "us": 2830 }, "subtype": "postgresql", "type": "db.postgresql.query" }, "timestamp": { "us": 1496170422281000 }, "trace": { "id": "85925e55b43f4342aaaaaaaaaaaaaaaa" }, "transaction": { "id": "85925e55b43f4342" } }, { "@timestamp": "2017-05-30T18:53:27.154Z", "agent": { "name": "elastic-node", "version": "3.14.0" }, "ecs": { "version": "1.11.0" }, "event": { "outcome": "unknown" }, "observer": { "ephemeral_id": "2f13d8fa-83cd-4356-8123-aabfb47a1808", "hostname": "goat", "id": "17ad47dd-5671-4c89-979f-ef4533565ba2", "type": "apm-server", "version": "8.0.0", "version_major": 8 }, "parent": { "id": "945254c567a5417e" }, "processor": { "event": "span", "name": "transaction" }, "service": { "environment": "staging", "name": "1234_service-12a3" }, "span": { "duration": { "us": 32592 }, "id": "1aaaaaaaaaaaaaaa", "name": "GET /api/types", "start": { "us": 0 }, "subtype": "external", "type": "request" }, "timestamp": { "us": 1496170407154000 }, "trace": { "id": "945254c567a5417eaaaaaaaaaaaaaaaa" }, "transaction": { "id": "945254c567a5417e" } }, { "@timestamp": "2017-05-30T18:53:27.154Z", "agent": { "name": "elastic-node", "version": "3.14.0" }, "ecs": { "version": "1.11.0" }, "event": { "outcome": "unknown" }, "observer": { "ephemeral_id": "2f13d8fa-83cd-4356-8123-aabfb47a1808", "hostname": "goat", "id": "17ad47dd-5671-4c89-979f-ef4533565ba2", "type": "apm-server", "version": "8.0.0", "version_major": 8 }, "parent": { "id": "945254c567a5417e" }, "processor": { "event": "span", "name": "transaction" }, "service": { "environment": "staging", "name": "1234_service-12a3" }, "span": { "action": "post", "duration": { "us": 3564 }, "id": "2aaaaaaaaaaaaaaa", "name": "GET /api/types", "start": { "us": 1845 }, "subtype": "http", "type": "request" }, "timestamp": { "us": 1496170407154000 }, "trace": { "id": "945254c567a5417eaaaaaaaaaaaaaaaa" }, "transaction": { "id": "945254c567a5417e" } }, { "@timestamp": "2017-05-30T18:53:27.154Z", "agent": { "name": "elastic-node", "version": "3.14.0" }, "child": { "id": [ "4aaaaaaaaaaaaaaa" ] }, "ecs": { "version": "1.11.0" }, "event": { "outcome": "unknown" }, "observer": { "ephemeral_id": "2f13d8fa-83cd-4356-8123-aabfb47a1808", "hostname": "goat", "id": "17ad47dd-5671-4c89-979f-ef4533565ba2", "type": "apm-server", "version": "8.0.0", "version_major": 8 }, "parent": { "id": "945254c567a5417e" }, "processor": { "event": "span", "name": "transaction" }, "service": { "environment": "staging", "name": "1234_service-12a3" }, "span": { "duration": { "us": 13980 }, "id": "3aaaaaaaaaaaaaaa", "name": "GET /api/types", "start": { "us": 0 }, "type": "request" }, "timestamp": { "us": 1496170407154000 }, "trace": { "id": "945254c567a5417eaaaaaaaaaaaaaaaa" }, "transaction": { "id": "945254c567a5417e" } } ]
Was this helpful?
Thank you for your feedback.