Log request (and response) in single batch
Nobody has claimed this yet.
- Dominant language
- Java
- Stars
- 9.8k
- Forks
- 1.9k
- Avg merge
- 1d 2h
- Merged PRs (30d)
- 41
Description
Feign's Logger is logging once per request / response line item.
For example, JavaLogger will log the following request / response pair by invoking java.util.logging.Logger 7 times:
[SendsStuff#login] ---> POST http://localhost:61113/ HTTP/1.1
[SendsStuff#login] Content-Length: 80
[SendsStuff#login] Content-Type: application/json
[SendsStuff#login] ---> END HTTP (80-byte body)
[SendsStuff#login] <--- HTTP/1.1 200 OK (1ms)
[SendsStuff#login] content-length: 3
[SendsStuff#login] <--- END HTTP (3-byte body)
Currently, in a Kibana + Logstash environment, these log line are scattered, having one document per log line. The logs for one single request are scattered in different documents. The same goes for the response. Thus, it's difficult to follow the logs.
What I'm suggesting is to have some sort of log batching, such that we end up with one log call for the request, another for the response. Having a single log per request/response means having a single document for request, another for response. That would be much easier to follow.
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 with Feign's Logger and JavaLogger entry points described in the issue, and trace how request and response line items are emitted. Compare the current per-line calls with the desired request and response boundaries. Done means each request and response is emitted through one log call while retaining the shown information.
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