From d9e4dc6ddccc3c8b84c0ce0152efb4bf3799a236 Mon Sep 17 00:00:00 2001 From: wescai <35978557@qq.com> Date: Wed, 13 May 2020 20:26:49 +0800 Subject: [PATCH 1/2] =?UTF-8?q?fix:=20=E8=8E=B7=E5=8F=96context=E6=96=B9?= =?UTF-8?q?=E5=BC=8F=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/instrumentation/core/http.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/instrumentation/core/http.js b/src/instrumentation/core/http.js index 4043bf0..59c1fa0 100644 --- a/src/instrumentation/core/http.js +++ b/src/instrumentation/core/http.js @@ -15,7 +15,7 @@ function wrapEmitWithTransaction(agent, emit) { const statusCode = String(response.statusCode) const path = transaction.path || request.path if (/^\d+$/.test(statusCode)) { - const context = request.headers['x-apigateway-context'] + const context = request.__SLS_CONTEXT__ const latency = Date.now() - transaction.start const data = { latency, From f60a4831a03790e82d1d0950c3a024c37c670440 Mon Sep 17 00:00:00 2001 From: semantic-release-bot Date: Wed, 13 May 2020 12:30:00 +0000 Subject: [PATCH 2/2] chore(release): version 1.0.3 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ## [1.0.3](https://github.com/serverless-tencent/tencent-component-monitor/compare/v1.0.2...v1.0.3) (2020-05-13) ### Bug Fixes * 获取context方式修改 ([d9e4dc6](https://github.com/serverless-tencent/tencent-component-monitor/commit/d9e4dc6ddccc3c8b84c0ce0152efb4bf3799a236)) --- CHANGELOG.md | 7 +++++++ package.json | 2 +- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index b73fc9b..37750fc 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,10 @@ +## [1.0.3](https://github.com/serverless-tencent/tencent-component-monitor/compare/v1.0.2...v1.0.3) (2020-05-13) + + +### Bug Fixes + +* 获取context方式修改 ([d9e4dc6](https://github.com/serverless-tencent/tencent-component-monitor/commit/d9e4dc6ddccc3c8b84c0ce0152efb4bf3799a236)) + ## [1.0.2](https://github.com/serverless-tencent/tencent-component-monitor/compare/v1.0.1...v1.0.2) (2020-05-09) diff --git a/package.json b/package.json index 12c22fe..9dd79ed 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "tencent-component-monitor", - "version": "1.0.2", + "version": "1.0.3", "description": "Tencent component monitor", "main": "src/index.js", "scripts": {