Skip to content

Commit

Permalink
Merge branch 'master' into patch-1
Browse files Browse the repository at this point in the history
  • Loading branch information
RS-labhub authored Mar 18, 2024
2 parents 3a4bca4 + 58fc97d commit ecbdc8e
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 0 deletions.
3 changes: 3 additions & 0 deletions changelog/unreleased/kong/log-serializer-receive-latency.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
message: 'Add `latencies.receive` property to log serializer'
type: feature
scope: Core
1 change: 1 addition & 0 deletions kong/pdk/log.lua
Original file line number Diff line number Diff line change
Expand Up @@ -845,6 +845,7 @@ do
(ctx.KONG_RECEIVE_TIME or 0),
proxy = ctx.KONG_WAITING_TIME or -1,
request = tonumber(var.request_time) * 1000,
receive = ctx.KONG_RECEIVE_TIME or 0,
},
tries = (ctx.balancer_data or {}).tries,
authenticated_entity = build_authenticated_entity(ctx),
Expand Down
1 change: 1 addition & 0 deletions spec/01-unit/10-log_serializer_spec.lua
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,7 @@ describe("kong.log.serialize", function()
assert.equal(0, res.latencies.kong)
assert.equal(-1, res.latencies.proxy)
assert.equal(2000, res.latencies.request)
assert.equal(0, res.latencies.receive)

-- Request
assert.is_table(res.request)
Expand Down

0 comments on commit ecbdc8e

Please sign in to comment.