OpenFeign / OpenFeign/feign

Logging should happen after micrometer instrumentation

Open
#1,912 10 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

feedback provided proposal
Dominant language
Java
Stars
9.8k
Forks
1.9k
Avg merge
1d 2h
Merged PRs (30d)
41

Description

Request logging happens at line 96 of SynchronousMethodHandler and client.execute called a few lines after that.
However, micrometer observation starts in client.execute (in enriched client code), which means that extra trace headers added for example by Brave's PropagatingSenderTracingObservationHandler do not appear in the logs.

I think logging should happen only after the request is fully decorated by all possible observationhandlers, so the log should reflect the exact same data that was sent...

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start in core/src/main/java/feign/SynchronousMethodHandler.java at the request logging near line 96, then inspect micrometer/src/main/java/feign/micrometer/MicrometerObservationCapability.java near line 50. Trace when observation handlers decorate the request relative to client.execute. Done means request logs include the same fully decorated data, including added trace headers, that is sent.

Written by the indexing model from the issue text.

Assessment

Tech stack
java
Domain
backend, observability
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.