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

Rework PhiAccrualFailureDetector to enable monitoring of interval #1137

Merged
merged 5 commits into from
Feb 26, 2024

Conversation

nvollmar
Copy link
Contributor

resolves #1136

Copy link

@danischroeter danischroeter left a comment

Choose a reason for hiding this comment

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

lgtm

@pjfanning
Copy link
Contributor

Would it be possible to write a fuller description to the issue? This is a non-trivial change to our code and we need to be able to release note it.

@nvollmar
Copy link
Contributor Author

nvollmar commented Feb 21, 2024

@pjfanning I can add more to the issue. But I’d consider this a rather trivial change.

There is no functional difference, the implementation is now open for Kanela to intercept the call to the new method to report that metric to Kamon. Or to extend this class and overwrite the method to get the interval.

Also the new trait makes it possible to implement a custom failure detector with the same functionality.
This isn’t really needed for our case, but we find it good design to not match on a specific implementation when that one is replaceable by design.

Copy link
Contributor

@mdedetrich mdedetrich left a comment

Choose a reason for hiding this comment

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

lgtm, as far as I can tell this is just shuffling code around so certain parts of it can be overridden (i.e. enabling features like monitoring interval).

@nvollmar
Copy link
Contributor Author

Looks like link validator is broken because the url changed from opensource.org/licenses/BSD-3-Clause to opensource.org/blog/license/bsd-3-clause

@mdedetrich
Copy link
Contributor

Looks like link validator is broken because the url changed from opensource.org/licenses/BSD-3-Clause to opensource.org/blog/license/bsd-3-clause

This is unrelated to this PR so you can file an issue or fix it in another PR

Copy link
Member

@He-Pin He-Pin left a comment

Choose a reason for hiding this comment

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

If the usercase is for aop,then we should better have javadsl in mind too.

@nvollmar
Copy link
Contributor Author

The use case would be to intercept or override the call to recordInterval

@nvollmar nvollmar requested a review from He-Pin February 23, 2024 10:42
Copy link
Member

@He-Pin He-Pin left a comment

Choose a reason for hiding this comment

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

Lgtm

@nvollmar
Copy link
Contributor Author

Had to add a mima exclude for the removed private[pekko] method

@nvollmar
Copy link
Contributor Author

This would be ready to merge unless there are some objections/further remarks

Copy link
Member

@Roiocam Roiocam left a comment

Choose a reason for hiding this comment

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

LGTM

Copy link
Contributor

@mdedetrich mdedetrich left a comment

Choose a reason for hiding this comment

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

Just a minor thing, want to add a NOTE prefix to comment so that it appears in IDE"s then I will approve

Copy link
Contributor

@mdedetrich mdedetrich left a comment

Choose a reason for hiding this comment

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

lgtm, just added a commit to capitalize the note

@nvollmar nvollmar merged commit 613a45b into apache:main Feb 26, 2024
18 checks passed
@nvollmar nvollmar deleted the heartbeat-monitoring-wip branch February 26, 2024 11:27
nvollmar added a commit to nvollmar/incubator-pekko that referenced this pull request Feb 26, 2024
…ache#1137)

* Introduce trait to avoid matching concrete subclass
* Extract interval method to make it available for recording metrics

---------
Co-authored-by: Matthew de Detrich <matthew.dedetrich@aiven.io>
@pjfanning pjfanning added this to the 1.1.0-M1 milestone Mar 6, 2024
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.

interceptable heartbeat interval to record metric
8 participants