apache / apache/couchdb

Consider eliminating known-slow requests from request_time stats/histogram

Open
#1,116 0 comments 2 reactions 0 assignees View on GitHub
enhancement
Dominant language
Erlang
Stars
7k
Forks
1.1k
Avg merge
1d 16h
Merged PRs (30d)
9

Description

Ran into this with a client recently. Here's what we do right now:

https://github.com/apache/couchdb/blob/master/src/chttpd/src/chttpd.erl#L353-L354

But it might be nice to ignore specific types of requests that are known to run long, that will skew the histogram/averages, such as:

* /_replicate
* any DB and global changes feeds with continuous or longpoll options

We could also relegate these to a separate "long request" histogram stats bucket.

/cc @janl

Contributor guide

Open the contributing guide

Research direction

Start with the request handling and timing code at src/chttpd/src/chttpd.erl#L353-L354, then trace how request_time statistics and histograms are recorded. The scope needs a decision between excluding replication and continuous or longpoll feed requests or placing them in a separate long-request bucket; done means the chosen behavior is defined and reflected in those stats.

Written by the indexing model from the issue text.

Assessment

Tech stack
erlang
Domain
observability, performance
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.