Open SorteKanin opened 9 months ago
I dont see any difference between these endpoint definitions in Lemmy. It seems to be an issue with the rust-prometheus library.
Edit: The relevant code is here, and it uses HttpRequest.match_pattern()
from actix_web. That method is wrongly returning None for the feeds endpoint, for reasons I dont understand.
Requirements
Summary
Prometheus metrics currently have performance issues due to label explosion of the
endpoint
label. This is handled for some endpoints (likeendpoint="/comment/{comment_id}
instead of using the actual ID) but not for others (likeendpoint="/feeds/u/user@instance.xml"
andendpoint="/pictrs/image/image_uuid.webp"
).Steps to Reproduce
lemmy_api_http_requests_duration_seconds_bucket
. For instancehistogram_quantile(0.99, sum by(le) (rate(lemmy_api_http_requests_duration_seconds_bucket[$__rate_interval])))
Technical Details
It's not a bug in the sense that logs will help. It's a performance bug, not a correctness issue. The system is working as designed, just with poor performance.
Suggested solutions
Do the same as the
endpoint="/comment/{comment_id}
strategy for image and feed endpoints as well.Version
BE 0.19.3
Lemmy Instance URL
Feddit.dk