-
Notifications
You must be signed in to change notification settings - Fork 304
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
WIP api security sampling #4766
base: api-security-sampling
Are you sure you want to change the base?
Conversation
BenchmarksBenchmark execution time: 2024-10-09 13:22:36 Comparing candidate commit 832800a in PR branch Found 0 performance improvements and 0 performance regressions! Performance is the same for 260 metrics, 6 unstable metrics. |
448d9dd
to
832800a
Compare
@@ -70,7 +65,7 @@ function isSampled (req, res) { | |||
function computeKey (req, res) { | |||
const route = req.route?.path || req.url | |||
const method = req.method.toLowerCase() | |||
const statusCode = res.statusCode | |||
const statusCode = res.statusCode === 304 ? 200 : res.statusCode |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this is funny because sometimes, for the same request, status code is 200
in onResponseBody
but 304
in incomingHttpEndTranslator
. It depends on when you are trying to get it.
3ecd200
to
a6b3cf7
Compare
What does this PR do?
Motivation
Plugin Checklist
Additional Notes