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

feat: timeout configuration for client #87

Merged
merged 1 commit into from
Aug 15, 2024

Conversation

klopfdreh
Copy link
Contributor

This PR is going allow the configuration of the timeout for prometheus-rsocket-proxy-clientto connect to the proxy-server and to push the data to the server.

Fixes: #86

@klopfdreh
Copy link
Contributor Author

klopfdreh commented Aug 12, 2024

First I added the timeout as a static field which was not good, because if you use the builder a second time the newly created PrometheusRSocketClient would take the timeout of the previous one.

I then created another constructor to make it backwards compatible and added some convenient methods and also changed the timeout to a class member.

This way the timeout can be configured for each PrometheusRSocketClient differently.

@klopfdreh klopfdreh force-pushed the feature/timeoutconfig branch from 6ec5364 to 35b85fe Compare August 12, 2024 08:32
@klopfdreh
Copy link
Contributor Author

Update: I squashed the commits into one so that it can be easily merged.

Copy link
Member

@shakuzen shakuzen left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Overall looks good. I left one review about the configuration property type. Some of the formatting changes will probably be undone if/when we apply the formatter plugin, but no need to worry too much about that since we don't have it configured currently.

@klopfdreh klopfdreh force-pushed the feature/timeoutconfig branch from 35b85fe to 382c5e2 Compare August 15, 2024 04:18
@shakuzen shakuzen merged commit d9c7b94 into micrometer-metrics:main Aug 15, 2024
2 checks passed
shakuzen added a commit that referenced this pull request Aug 15, 2024
Remove reference to specific time unit in JavaDoc description now that the `Duration` type is being used.
Instead, make the default unit for conversion without an explicit unit to be seconds with `@DurationUnit`.

See gh-87
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

Successfully merging this pull request may close these issues.

PrometheusRSocketClient's connection is timing out very often
2 participants