-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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
Client observations creating too many uri tag values #4290
Comments
Hello @sunruh, thanks for reporting the issue. Makes sense. I don't think we want to modify Eureka's REST API at this point, but we may want to create our own implementation of |
@sunruh @OlgaMaciaszek |
Thanks, @jonatan-ivanov, @sunruh. I've started working on it just to realise that this issue should already be resolved as a side effect of a different fix that I just merged yesterday. It switches from using |
That fixes the issue. Of course all requests now end up with
Both issues (this one and the one regarding special characters in e.g. the instance id) could have been solved by using templating in the |
@sunruh would you like to create a PR with the improvement? |
If you would like us to look at this issue, please provide the requested information. If the information is not provided within the next 7 days this issue will be closed. |
Closing due to lack of requested feedback. If you would like us to look at this issue, please provide the requested information and we will re-open the issue. |
Reopening as enhancement. |
Was my PR maybe missed as the status is now "help wanted"? |
Thanks @sunruh, I think the status was changed before your PR or roughly at the same time. Will look at it next week. |
Hi all, I stumbled on this issue just now; and I'm sorry if it is already resolved (quite frankly, it's a late Friday night for me, and I'm not fully able to follow the conversation anymore). In any case, while searching for solutions I stumbled on this article which presents a way of using WebClient that will still create a tag with the Just thought it might be helpful in this situation. If this issue is already been taken care of or obsolete, please disregard this comment. |
After observability support was added to
RestTemplateEurekaHttpClient
in #4255 by using theRestTemplateBuilder
metrics are being generated for Eureka client requests.The
ClientRequestObservationConvention
adds the URI template of the requests as a low cardinality observability/metric key-value/tag.The current implementations of
EurekaHttpClient
based on RestTemplate and WebClient assemble the full URL of the requsts and pass it to the client implementation. This causes a high number of values for the URI tag in the metrics, especially if thelastDirtyTimestamp
changes often (due to e.g. flaky health of some component). By default only 100 values are allowed for the URI tag, additional values would be dropped and the metrics using these values are ignored.Could be mitigated by passing at least the
lastDirtyTimestamp
as auriVariable
to the RestTemplate calls.Version: spring-cloud-netflix-eureka-client 4.1.2
Sample of generated (prometheus) metrics
The following metrics where available after making the Eureka server unavailable twice and thus causing a status change to
UNKNOWN
and dirying of the InstanceInfo.The text was updated successfully, but these errors were encountered: