splunk / splunk/splunk-library-javalogging
Allow configuring dispatcher 'maxRequestsPerHost'
Nobody has claimed this yet.
- Dominant language
- Java
- Stars
- 140
- Forks
- 173
- PR merge metrics
- No merged PRs in 30d
Description
In developing some code that produces/consume a lot of message, I found that the default appender would get backed up, causing log messages to queue up, chewing up memory until the application crashed. This appears to have been due to the default OKHttp dispatcher only allowing 5 calls 'per host' at a time.
I added the ability to access the Dispatcher from the Logback appender in the code and was able to set the maxRequestsPerHost to 30 and that fixed my problem.
Would that change be welcome as a PR?
Exposing the Dispatcher also gave me access to the ready and running queue sizes, so I was able to set those up as metrics and get much better insight into what was clogging the system and how I might address it.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by locating the default appender and its OkHttp Dispatcher usage, then review how the dispatcher is currently created and accessed. The change is complete when callers can configure maxRequestsPerHost and inspect the relevant queue sizes without altering existing default behavior.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java
- Domain
- observability
- Issue type
- Feature
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100