OpenFeign / OpenFeign/feign

How to monitor dynamic URLs using feign-micrometer

Open
#2,664 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

question spring-cloud
Dominant language
Java
Stars
9.8k
Forks
1.9k
Avg merge
1d 2h
Merged PRs (30d)
41

Description

@FeignClient(name = "my-service")
public interface MyClient {

    @PostMapping(consumes = "application/json", headers = {"Content-Type=application/json;charset=utf-8"})
    Response getApi(URI uri, @RequestBody String reqBody);
}

In my scenario, the URL is changing, so I use it as a parameter and use a feign method. But I found that the relevant monitoring can only be at the method level. Can I monitor the URL level? I really need it.

actuator:
feign_Feign_seconds_count{client="MyClient",method="getApi",port="8080"} 8156.0 feign_Feign_seconds_sum{client="MyClient",method="getApi",port="8080"} 807.2327363

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 from the shown MyClient interface and the feign-micrometer instrumentation that produces the actuator metrics. Determine whether metrics can distinguish the dynamic URI rather than only getApi, and define completion as URL-level monitoring appearing in the reported metrics without losing the existing client and method labels.

Written by the indexing model from the issue text.

Assessment

Tech stack
java
Domain
observability
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.