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

instrument retrying channels scheduled executor service #485

Merged
merged 3 commits into from
Mar 4, 2020

Conversation

ferozco
Copy link
Contributor

@ferozco ferozco commented Mar 4, 2020

Before this PR

We had no metrics on number of pending requests

After this PR

==COMMIT_MSG==
We produce metrics about requests that are going to be retried
==COMMIT_MSG==

Possible downsides?

This uses tritium to instrument the scheduledExecutor so the metric names won't be the best

@changelog-app
Copy link

changelog-app bot commented Mar 4, 2020

Generate changelog in changelog/@unreleased

Type

  • Feature
  • Improvement
  • Fix
  • Break
  • Deprecation
  • Manual task
  • Migration

Description

Produce metrics about requests that are going to be retried

Check the box to generate changelog(s)

  • Generate changelog entry

@@ -80,6 +83,7 @@
ClientConfiguration.RetryOnTimeout retryOnTimeout) {
this(
delegate,
new DefaultTaggedMetricRegistry(),
Copy link
Contributor

Choose a reason for hiding this comment

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

I think we need to add this to the constructor and pass the registry from our ClientConfiguration

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yes we do do that, this constructor is only visible for testing. Let me make that more clear

Copy link
Contributor

Choose a reason for hiding this comment

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

oh doh, I misread, sorry!

private static ListeningScheduledExecutorService instrument(
ScheduledExecutorService delegate, TaggedMetricRegistry metrics) {
return MoreExecutors.listeningDecorator(
Tracers.wrap(SCHEDULER_NAME, MetricRegistries.instrument(metrics, delegate, SCHEDULER_NAME)));
Copy link
Contributor

Choose a reason for hiding this comment

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

nice

Copy link
Contributor

@carterkozak carterkozak left a comment

Choose a reason for hiding this comment

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

thanks!

@ferozco
Copy link
Contributor Author

ferozco commented Mar 4, 2020

🤖

@bulldozer-bot bulldozer-bot bot merged commit 46fadcd into develop Mar 4, 2020
@bulldozer-bot bulldozer-bot bot deleted the fo/instrument-retrying-channel branch March 4, 2020 21:01
@svc-autorelease
Copy link
Collaborator

Released 0.13.3

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

Successfully merging this pull request may close these issues.

None yet

3 participants