Skip to content

Commit 820450e

Browse files
committed
[#243] Fix API Metadata gRPC stream error
* Support Send Messages by local gRPC Fixtures a Server
1 parent 7c15f3a commit 820450e

File tree

14 files changed

+504
-454
lines changed

14 files changed

+504
-454
lines changed

demo/express/package-lock.json

Lines changed: 47 additions & 23 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

demo/express/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,6 @@
1616
"morgan": "~1.9.1",
1717
"mysql": "^2.18.1",
1818
"mysql2": "^3.9.1",
19-
"pinpoint-node-agent": "^0.8.4"
19+
"pinpoint-node-agent": "^0.9.0"
2020
}
2121
}

demo/express/routes/index.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,9 @@ router.get('/', async function(req, res, next) {
4848
const json = await response.json()
4949
console.log(json)
5050

51-
res.render('index', { title: 'Express' });
51+
setTimeout(() => {
52+
res.render('index', { title: 'Express' })
53+
}, 1000)
5254
})
5355

5456
router.get('/api', function(req, res, next) {

lib/instrumentation/http-shared.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ exports.instrumentRequest2 = function (agent) {
4343
const trace = requestTrace.makeTrace()
4444
return localStorage.run(trace, () => {
4545
endOfStream(res, function (err) {
46-
const spanRecorder = trace.spanRecorder
46+
const spanRecorder = trace.getSpanRecorder()
4747
if (err) {
4848
const end = res.end
4949
res.end = function () {

0 commit comments

Comments
 (0)