Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(log-serializer): add latencies.receive property to log-serializer #12730

Merged
merged 1 commit into from
Mar 17, 2024

Conversation

flrgh
Copy link
Contributor

@flrgh flrgh commented Mar 13, 2024

Summary

This adds receive time to the latencies object, as reported in ctx.KONG_RECEIVE_TIME:

kong/kong/init.lua

Lines 1685 to 1692 in 15a3797

-- time spent receiving the response ((response +) header_filter + body_filter)
-- we could use $upstream_response_time but we need to distinguish the waiting time
-- from the receiving time in our logging plugins (especially ALF serializer).
ctx.KONG_RECEIVE_TIME = ctx.KONG_BODY_FILTER_ENDED_AT - (ctx.KONG_RESPONSE_START or
ctx.KONG_HEADER_FILTER_START or
ctx.KONG_BALANCER_ENDED_AT or
ctx.KONG_BALANCER_START or
ctx.KONG_ACCESS_ENDED_AT)

Checklist

  • The Pull Request has tests
  • A changelog file has been created under changelog/unreleased/kong or skip-changelog label added on PR if changelog is unnecessary. README.md
  • There is a user-facing docs PR (link)

Issue reference

KAG-3798

Copy link
Contributor

@nowNick nowNick left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice 🚀 !

@flrgh flrgh added the cherry-pick kong-ee schedule this PR for cherry-picking to kong/kong-ee label Mar 17, 2024
@flrgh flrgh merged commit 58fc97d into master Mar 17, 2024
39 checks passed
@flrgh flrgh deleted the feat/log-receive-time branch March 17, 2024 17:36
@team-gateway-bot
Copy link
Collaborator

Successfully created cherry-pick PR for master:

@gszr
Copy link
Member

gszr commented Mar 18, 2024

Note that the scope here must be PDK in the changelog

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cherry-pick kong-ee schedule this PR for cherry-picking to kong/kong-ee core/logs size/XS
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants