agent.currentTransaction
is undefined when printed right before looking up the user.
The logs from the apm server:
apm_1 | 2019-02-06T20:10:50.160Z DEBUG [publish] pipeline/processor.go:308 Publish event: {
apm_1 | "@timestamp": "2019-02-06T20:10:40.101Z",
apm_1 | "@metadata": {
apm_1 | "beat": "apm-server",
apm_1 | "type": "doc",
apm_1 | "version": "6.6.0"
apm_1 | },
apm_1 | "system": {
apm_1 | "cpu": {
apm_1 | "total": {
apm_1 | "norm": {
apm_1 | "pct": 0.4144736842105263
apm_1 | }
apm_1 | }
apm_1 | },
apm_1 | "memory": {
apm_1 | "actual": {
apm_1 | "free": 6.0665856e+07
apm_1 | },
apm_1 | "total": 1.7179869184e+10
apm_1 | },
apm_1 | "process": {
apm_1 | "cpu": {
apm_1 | "total": {
apm_1 | "norm": {
apm_1 | "pct": 0.2816320242230635
apm_1 | }
apm_1 | }
apm_1 | },
apm_1 | "memory": {
apm_1 | "rss": {
apm_1 | "bytes": 1.11423488e+08
apm_1 | }
apm_1 | }
apm_1 | }
apm_1 | },
apm_1 | "context": {
apm_1 | "tags": {
apm_1 | "env": "development",
apm_1 | "hostname": "Deniss-MacBook-Pro.local"
apm_1 | },
apm_1 | "system": {
apm_1 | "hostname": "Deniss-MacBook-Pro.local",
apm_1 | "architecture": "x64",
apm_1 | "platform": "darwin",
apm_1 | "ip": "172.27.0.1"
apm_1 | },
apm_1 | "process": {
apm_1 | "pid": 13470,
apm_1 | "ppid": 13463,
apm_1 | "title": "node",
apm_1 | "argv": [
apm_1 | "/usr/local/Cellar/node/9.8.0/bin/node",
apm_1 | "/Users/denis/Development/project/server.js"
apm_1 | ]
apm_1 | },
apm_1 | "service": {
apm_1 | "name": "test-apm-local-3",
apm_1 | "agent": {
apm_1 | "name": "nodejs",
apm_1 | "version": "2.5.1"
apm_1 | },
apm_1 | "language": {
apm_1 | "name": "javascript"
apm_1 | },
apm_1 | "runtime": {
apm_1 | "name": "node",
apm_1 | "version": "9.8.0"
apm_1 | }
apm_1 | }
apm_1 | },
apm_1 | "processor": {
apm_1 | "name": "metric",
apm_1 | "event": "metric"
apm_1 | },
apm_1 | "beat": {
apm_1 | "name": "66901330dd93",
apm_1 | "hostname": "66901330dd93",
apm_1 | "version": "6.6.0"
apm_1 | },
apm_1 | "host": {
apm_1 | "name": "66901330dd93"
apm_1 | }
apm_1 | }
apm_1 | 2019-02-06T20:10:50.162Z DEBUG [publish] pipeline/processor.go:308 Publish event: {
apm_1 | "@timestamp": "2019-02-06T20:10:44.256Z",
apm_1 | "@metadata": {
apm_1 | "beat": "apm-server",
apm_1 | "type": "doc",
apm_1 | "version": "6.6.0"
apm_1 | },
apm_1 | "context": {
apm_1 | "system": {
apm_1 | "hostname": "Deniss-MacBook-Pro.local",
apm_1 | "architecture": "x64",
apm_1 | "platform": "darwin",
apm_1 | "ip": "172.27.0.1"
apm_1 | },
apm_1 | "process": {
apm_1 | "pid": 13470,
apm_1 | "ppid": 13463,
apm_1 | "title": "node",
apm_1 | "argv": [
apm_1 | "/usr/local/Cellar/node/9.8.0/bin/node",
apm_1 | "/Users/denis/Development/project/server.js"
apm_1 | ]
apm_1 | },
apm_1 | "service": {
apm_1 | "name": "test-apm-local-3",
apm_1 | "agent": {
apm_1 | "name": "nodejs",
apm_1 | "version": "2.5.1"
apm_1 | },
apm_1 | "language": {
apm_1 | "name": "javascript"
apm_1 | },
apm_1 | "runtime": {
apm_1 | "name": "node",
apm_1 | "version": "9.8.0"
apm_1 | }
apm_1 | },
apm_1 | "request": {
apm_1 | "body": "[REDACTED]",
apm_1 | "http_version": "1.1",
apm_1 | "method": "POST",
apm_1 | "url": {
apm_1 | "port": "20020",
apm_1 | "pathname": "/api/v0/auth",
apm_1 | "full": "http://localhost:20020/api/v0/auth",
apm_1 | "raw": "/api/v0/auth",
apm_1 | "protocol": "http:",
apm_1 | "hostname": "localhost"
apm_1 | },
apm_1 | "socket": {
apm_1 | "encrypted": false,
apm_1 | "remote_address": "127.0.0.1"
apm_1 | },
apm_1 | "headers": {
apm_1 | "connection": "keep-alive",
apm_1 | "postman-token": "46880aaa-03e6-453e-9071-9b6e74ba49c3",
apm_1 | "host": "localhost:20020",
apm_1 | "accept": "*/*",
apm_1 | "user-agent": "PostmanRuntime/7.6.0",
apm_1 | "accept-encoding": "gzip, deflate",
apm_1 | "content-length": "56",
apm_1 | "content-type": "application/json",
apm_1 | "cache-control": "no-cache"
apm_1 | }
apm_1 | },
apm_1 | "response": {
apm_1 | "headers": {
apm_1 | "date": "Wed, 06 Feb 2019 20:10:44 GMT",
apm_1 | "connection": "keep-alive",
apm_1 | "x-powered-by": "Express",
apm_1 | "content-type": "application/json; charset=utf-8",
apm_1 | "content-length": "446",
apm_1 | "etag": "W/\"1be-Zi8lgVrP3U09s2/24vh0MSe6zDA\""
apm_1 | },
apm_1 | "status_code": 200
apm_1 | }
apm_1 | },
apm_1 | "trace": {
apm_1 | "id": "95fca978e71ba9e6e592e9f8d08aa35e"
apm_1 | },
apm_1 | "timestamp": {
apm_1 | "us": 1549483844256067
apm_1 | },
apm_1 | "beat": {
apm_1 | "version": "6.6.0",
apm_1 | "name": "66901330dd93",
apm_1 | "hostname": "66901330dd93"
apm_1 | },
apm_1 | "host": {
apm_1 | "name": "66901330dd93"
apm_1 | },
apm_1 | "processor": {
apm_1 | "name": "transaction",
apm_1 | "event": "transaction"
apm_1 | },
apm_1 | "transaction": {
apm_1 | "id": "9c0d151bb517d701",
apm_1 | "name": "POST /api/v0/auth",
apm_1 | "duration": {
apm_1 | "us": 228181
apm_1 | },
apm_1 | "type": "request",
apm_1 | "result": "HTTP 2xx",
apm_1 | "sampled": true,
apm_1 | "span_count": {
apm_1 | "started": 0
apm_1 | }
apm_1 | }
apm_1 | }