Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add message attributes to transactions and spans #3104

Merged
merged 8 commits into from
Jan 7, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -373,6 +373,71 @@
"trace": {
"id": "abcdef0123456789abcdef9876543210"
}
},
{
"@metadata": {
"beat": "apm-test",
"pipeline": "apm",
"type": "_doc",
"version": "8.0.0"
},
"@timestamp": "2018-07-30T18:53:42.281Z",
"agent": {
"name": "elastic-node",
"version": "3.14.0"
},
"ecs": {
"version": "1.2.0"
},
"labels": {
"tag1": "label1"
},
"observer": {
"ephemeral_id": "00000000-0000-0000-0000-000000000000",
"hostname": "",
"id": "fbba762a-14dd-412c-b7e9-b79f903eb492",
"type": "test-apm-server",
"version": "8.0.0",
"version_major": 8
},
"parent": {
"id": "abcdef0123456789"
},
"processor": {
"event": "span",
"name": "transaction"
},
"service": {
"environment": "staging",
"name": "backendspans"
},
"span": {
"action": "receive",
"duration": {
"us": 141581
},
"id": "00xxx12312312312",
"message": {
"age": {
"ms": 1577958057123
},
"queue": {
"name": "new_users"
}
},
"name": "Rabbitmq receive",
"subtype": "JMS",
"type": "messaging"
},
"timestamp": {
"us": 1532976822281000
},
"trace": {
"id": "fdedef0123456789abcdef9876543210"
},
"transaction": {
"id": "01af25874dec69dd"
}
}
]
}
Original file line number Diff line number Diff line change
Expand Up @@ -432,6 +432,133 @@
"id": "123user",
"name": "bar"
}
},
{
"@metadata": {
"beat": "apm-test",
"pipeline": "apm",
"type": "_doc",
"version": "8.0.0"
},
"@timestamp": "2019-01-09T21:40:53.000Z",
"agent": {
"name": "elastic-node",
"version": "3.14.0"
},
"container": {
"id": "container-id"
},
"ecs": {
"version": "1.2.0"
},
"host": {
"architecture": "x64",
"hostname": "node-name",
"ip": "127.0.0.1",
"name": "node-name",
"os": {
"platform": "darwin"
}
},
"kubernetes": {
"namespace": "namespace1",
"node": {
"name": "node-name"
},
"pod": {
"name": "pod-name",
"uid": "pod-uid"
}
},
"labels": {
"tag1": "one",
"tag2": 2
},
"observer": {
"ephemeral_id": "00000000-0000-0000-0000-000000000000",
"hostname": "",
"id": "fbba762a-14dd-412c-b7e9-b79f903eb492",
"type": "test-apm-server",
"version": "8.0.0",
"version_major": 8
},
"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",
"node": {
"name": "node-123"
},
"runtime": {
"name": "node",
"version": "8.0.0"
},
"version": "5.1.3"
},
"timestamp": {
"us": 1547070053000000
},
"trace": {
"id": "0123456789abcdef0123456789abcdef"
},
"transaction": {
"duration": {
"us": 3000
},
"id": "00xxxxFFaaaa1234",
"message": {
"age": {
"ms": 1577958057123
},
"body": "user created",
"headers": {
"Involved_services": [
"user",
"auth"
],
"User_id": [
"1ax3"
]
},
"queue": {
"name": "new_users"
}
},
"name": "amqp receive",
"sampled": true,
"span_count": {
"started": 1
},
"type": "messaging"
},
"user": {
"email": "[email protected]",
"id": "123user",
"name": "bar"
}
}
]
}
1 change: 1 addition & 0 deletions beater/tracing_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ var testTransactionIds = tests.NewSet(
"945254c567a5417e",
"4340a8e0df1906ecbfa9",
"cdef4340a8e0df19",
"00xxxxFFaaaa1234",
)

func TestServerTracingEnabled(t *testing.T) {
Expand Down
1 change: 1 addition & 0 deletions changelogs/head.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ https://github.com/elastic/apm-server/compare/7.5\...master[View commits]
==== Intake API Changes
- Add support for `span.context.db.rows_affected` {pull}3095[3095].
- Add support for `classname` as stacktrace frame attribute {pull}3096[3096].
- Add support for `message.*` information for spans and transactions {pull}3104[3104].

[float]
==== Added
Expand Down
48 changes: 48 additions & 0 deletions docs/data/elasticsearch/generated/spans.json
Original file line number Diff line number Diff line change
Expand Up @@ -288,6 +288,54 @@
"trace": {
"id": "abcdef0123456789abcdef9876543210"
}
},
{
"@timestamp": "2018-07-30T18:53:42.281Z",
"agent": {
"name": "elastic-node",
"version": "3.14.0"
},
"labels": {
"tag1": "label1"
},
"parent": {
"id": "abcdef0123456789"
},
"processor": {
"event": "span",
"name": "transaction"
},
"service": {
"environment": "staging",
"name": "backendspans"
},
"span": {
"action": "receive",
"duration": {
"us": 141581
},
"id": "00xxx12312312312",
"message": {
"age": {
"ms": 1577958057123
},
"queue": {
"name": "new_users"
}
},
"name": "Rabbitmq receive",
"subtype": "JMS",
"type": "messaging"
},
"timestamp": {
"us": 1532976822281000
},
"trace": {
"id": "fdedef0123456789abcdef9876543210"
},
"transaction": {
"id": "01af25874dec69dd"
}
}
]
}
110 changes: 110 additions & 0 deletions docs/data/elasticsearch/generated/transactions.json
Original file line number Diff line number Diff line change
Expand Up @@ -381,6 +381,116 @@
"id": "123user",
"name": "bar"
}
},
{
"@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",
"name": "node-name",
"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",
"node": {
"name": "node-123"
},
"runtime": {
"name": "node",
"version": "8.0.0"
},
"version": "5.1.3"
},
"timestamp": {
"us": 1533117600000000
},
"trace": {
"id": "0123456789abcdef0123456789abcdef"
},
"transaction": {
"duration": {
"us": 3000
},
"id": "00xxxxFFaaaa1234",
"message": {
"age": {
"ms": 1577958057123
},
"body": "user created",
"headers": {
"Involved_services": [
"user",
"auth"
],
"User_id": [
"1ax3"
]
},
"queue": {
"name": "new_users"
}
},
"name": "amqp receive",
"sampled": true,
"span_count": {
"started": 1
},
"type": "messaging"
},
"user": {
"email": "[email protected]",
"id": "123user",
"name": "bar"
}
}
]
}
Loading