Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feign.micrometer.DefaultFeignObservationConvention not adding hostname and port to Observations #2630

Open
jonathan-baker-disney opened this issue Nov 1, 2024 · 0 comments

Comments

@jonathan-baker-disney
Copy link

The method feign.micrometer.DefaultFeignObservationConvention#getLowCardinalityKeyValues adds method, status, clientName and uri to observations as attributes. The uri is only the path and not the full url. As such, none of our observations contain the host and port (aka the base url) of any downstream calls. When loading these observations into our APM system, the only way to identify these calls is the clientName attribute which is the class name of the feign client object. There is no good way to correlate spans that call the same service if those class names aren't identical across applications (and they typically are not the same)

It would be beneficial to add the downstream hostname and port that is included in the FeignTarget object in the observations so that we can see what host is being called and correlate that across spans for different applications.

adding something something like this would help a lot:
URL url = URI.create(requestTemplate.feignTarget().url()).toURL(); lowCardinalityKeyValues.and("http.host", url.getHost()).and("http.port", String.valueOf(url.getPort));

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant