fix(tracing): eliminate aws service request time from latencies.kong #12678
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Summary
As per FTI-5261's report, it is unexpected that the external request time of AWS lambda service is also being added to
latencies.kong
latency number, which is part of our serialized log data and being used by some of our monitoring plugins, such as datadog.This PR tries to eliminate the AWS related request time from
latencies.kong
, by adding a new ctx variablectx.KONG_THIRDPARTY_ACCESS_TIME
. Since this problem is not a special one, we have a similar situation in many other plugins/vaults that requires external access(such as external IdP, secret management service, etc.). We can also add those things intoctx.KONG_THIRDPARTY_ACCESS_TIME
so that we can tracking external 3rd-party service's latency, as well as subtracting them from Kong's latency number.Checklist
changelog/unreleased/kong
orskip-changelog
label added on PR if changelog is unnecessary. README.mdIssue reference
https://konghq.atlassian.net/browse/FTI-5261