未验证 提交 d2413150 编写于 作者: D Daming 提交者: GitHub

add stauts_code (#41)

上级 b4700215
......@@ -77,6 +77,7 @@ function Tracer:prepareForReport()
local TC = require('tracing_context')
local Segment = require('segment')
if ngx.ctx.entrySpan ~= nil then
Span.tag(ngx.ctx.entrySpan, 'http.status', ngx.var.status)
Span.finish(ngx.ctx.entrySpan, ngx.now() * 1000)
local status, segment = TC.drainAfterFinished(ngx.ctx.tracingContext)
if status then
......
......@@ -42,6 +42,7 @@ segmentItems:
tags:
- {key: http.method, value: GET}
- {key: http.params, value: 'http://127.0.0.1/tier2/lb'}
- {key: http.status, value: '200'}
endTime: gt 0
spanType: Entry
spanId: 0
......@@ -71,6 +72,7 @@ segmentItems:
tags:
- {key: http.method, value: GET}
- {key: http.params, value: 'not null'}
- {key: http.status, value: '200'}
endTime: gt 0
spanType: Entry
spanId: 0
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册