diff --git a/tests/plugins/axios/expected.data.yaml b/tests/plugins/axios/expected.data.yaml index 3ecd711..15638bf 100644 --- a/tests/plugins/axios/expected.data.yaml +++ b/tests/plugins/axios/expected.data.yaml @@ -35,6 +35,8 @@ segmentItems: tags: - key: http.url value: httpbin.org:80/json + - key: http.method + value: GET - key: http.status.code value: '200' - key: http.status.msg @@ -53,6 +55,8 @@ segmentItems: tags: - key: http.url value: server:5000/axios + - key: http.method + value: GET - key: http.status.code value: '200' - key: http.status.msg @@ -79,6 +83,8 @@ segmentItems: tags: - key: http.url value: server:5000/axios + - key: http.method + value: GET - key: http.status.code value: '200' - key: http.status.msg @@ -97,6 +103,8 @@ segmentItems: tags: - key: http.url value: localhost:5001/axios + - key: http.method + value: GET - key: http.status.code value: '200' - key: http.status.msg diff --git a/tests/plugins/express/client.ts b/tests/plugins/express/client.ts index 20e0487..2e4efa6 100644 --- a/tests/plugins/express/client.ts +++ b/tests/plugins/express/client.ts @@ -33,7 +33,7 @@ app.get('/express', (req, res) => { .request(`http://${process.env.SERVER || 'localhost:5000'}${req.url}`, (r) => { let data = ''; r.on('data', (chunk) => (data += chunk)); - r.on('end', () => res.send(data)); + r.on('close', () => res.send(data)); }) .end(); }); diff --git a/tests/plugins/express/expected.data.yaml b/tests/plugins/express/expected.data.yaml index 009c233..3a628f4 100644 --- a/tests/plugins/express/expected.data.yaml +++ b/tests/plugins/express/expected.data.yaml @@ -35,6 +35,8 @@ segmentItems: tags: - key: http.url value: httpbin.org/json + - key: http.method + value: GET - key: http.status.code value: '200' - key: http.status.msg @@ -47,6 +49,8 @@ segmentItems: tags: - key: http.url value: server:5000/express + - key: http.method + value: GET - key: http.status.code value: '200' - key: http.status.msg @@ -79,6 +83,8 @@ segmentItems: tags: - key: http.url value: server:5000/express + - key: http.method + value: GET - key: http.status.code value: '200' - key: http.status.msg @@ -97,6 +103,8 @@ segmentItems: tags: - key: http.url value: localhost:5001/express + - key: http.method + value: GET - key: http.status.code value: '200' - key: http.status.msg diff --git a/tests/plugins/express/server.ts b/tests/plugins/express/server.ts index 9ce3346..8bb15ef 100644 --- a/tests/plugins/express/server.ts +++ b/tests/plugins/express/server.ts @@ -33,7 +33,7 @@ app.get('/express', (req, res) => { .request('http://httpbin.org/json', (r) => { let data = ''; r.on('data', (chunk) => (data += chunk)); - r.on('end', () => res.send(data)); + r.on('close', () => res.send(data)); }) .end(); }); diff --git a/tests/plugins/http/client.ts b/tests/plugins/http/client.ts index c1ee8a9..cbdc2c6 100644 --- a/tests/plugins/http/client.ts +++ b/tests/plugins/http/client.ts @@ -30,7 +30,7 @@ const server = http.createServer((req, res) => { .request(`http://${process.env.SERVER || 'localhost:5000'}${req.url}`, (r) => { let data = ''; r.on('data', (chunk) => (data += chunk)); - r.on('end', () => res.end(data)); + r.on('close', () => res.end(data)); }) .end(); }); diff --git a/tests/plugins/http/expected.data.yaml b/tests/plugins/http/expected.data.yaml index b498ff7..a9ed484 100644 --- a/tests/plugins/http/expected.data.yaml +++ b/tests/plugins/http/expected.data.yaml @@ -37,6 +37,8 @@ segmentItems: value: server:5000/test - key: http.status.code value: '200' + - key: http.method + value: GET refs: - parentEndpoint: '' networkAddress: server:5000 @@ -60,6 +62,8 @@ segmentItems: tags: - key: http.url value: httpbin.org/json + - key: http.method + value: GET - key: http.status.code value: '200' - key: http.status.msg @@ -83,6 +87,8 @@ segmentItems: tags: - key: http.url value: localhost:5001/test + - key: http.method + value: GET - key: http.status.code value: '200' - operationName: /test @@ -99,6 +105,8 @@ segmentItems: tags: - key: http.url value: server:5000/test + - key: http.method + value: GET - key: http.status.code value: '200' - key: http.status.msg diff --git a/tests/plugins/http/server.ts b/tests/plugins/http/server.ts index bf362c7..87eada3 100644 --- a/tests/plugins/http/server.ts +++ b/tests/plugins/http/server.ts @@ -30,7 +30,7 @@ const server = http.createServer((req, res) => { .request('http://httpbin.org/json', (r) => { let data = ''; r.on('data', (chunk) => (data += chunk)); - r.on('end', () => res.end(data)); + r.on('close', () => res.end(data)); }) .end(); });