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

Add stopWithFlush option to ffwd reporter & ffwd http reporter #96

Merged
merged 2 commits into from
Jan 8, 2021

Conversation

lmuhlha
Copy link
Member

@lmuhlha lmuhlha commented Jan 7, 2021

Add stop with flush option for user's who would like to ensure a final flush of metrics when their service shuts down.
Tests for:

  • Use of stopWithFlush with no executor tick
  • Ensure failure when there's no executor tick normally

if (executorOwner) {
executorService.shutdown();
}
//final flush of metrics
Copy link

Choose a reason for hiding this comment

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

I wonder if the log line might be sufficient documentation for what's going on.

Copy link
Member Author

Choose a reason for hiding this comment

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

true haha

registry.derivingMeter(MetricId.build("deriving-meter"));


Copy link

Choose a reason for hiding this comment

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

nit: extra line break


@Test
public void someReportingNoTickFails() {
Copy link

Choose a reason for hiding this comment

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

I'm not sure best description is that it fails? Perhaps a more descriptive name could be noReportingIfNoTick?

Copy link

@hexedpackets hexedpackets left a comment

Choose a reason for hiding this comment

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

I agree about renaming someReportingNoTickFails, otherwise LGTM

@lmuhlha lmuhlha changed the title Add stopWithFlush option to ffwd http reporter Add stopWithFlush option to ffwd reporter & ffwd http reporter Jan 8, 2021
@lmuhlha lmuhlha requested a review from hexedpackets January 8, 2021 16:46
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.

4 participants