Skip to content

Commit d9e4dc6

Browse files
committed
fix: 获取context方式修改
1 parent da42f87 commit d9e4dc6

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/instrumentation/core/http.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ function wrapEmitWithTransaction(agent, emit) {
1515
const statusCode = String(response.statusCode)
1616
const path = transaction.path || request.path
1717
if (/^\d+$/.test(statusCode)) {
18-
const context = request.headers['x-apigateway-context']
18+
const context = request.__SLS_CONTEXT__
1919
const latency = Date.now() - transaction.start
2020
const data = {
2121
latency,

0 commit comments

Comments
 (0)