You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The text was updated successfully, but these errors were encountered:
steve-chavez
added
idea
Needs of discussion to become an enhancement, not ready for implementation
difficulty: beginner
Pure Haskell task
enhancement
a feature, ready for implementation
and removed
idea
Needs of discussion to become an enhancement, not ready for implementation
labels
Apr 14, 2024
Damn, I wonder how much slower will OTel be when enabled then.
Not yet familiar with OTel (and the Push model) but doesn't it do some buffering before sending the events to a collector?
I've also read that they do sampling, so not all requests are traced. This would reduce resource consumption.
It would be interesting to have an internal sampling mechanism, so we could have some server-timing traces exposed as metrics. (just an idea for now, not sure if worth it)
Problem
Setting server-timing-enabled to true has a ~6.5% RPS decrease. Using GETSimple on https://github.com/PostgREST/postgrest-benchmark:
no timings = 2176.4712194 rps
with timings = 2033.3584706 rps
I don't think there's a way around it since calculating the timings requires using clock time which needs a system call (clock_gettime).
Solution
Allow getting server timing headers through a new preference header.
Prefer: metrics=timings
metrics=timings
would be the only value for now, but we could extend it later on.This can later be enabled/disabled with #2987.
While at it, deprecate server-timing-enabled since it has a perf impact.
The text was updated successfully, but these errors were encountered: