-
Notifications
You must be signed in to change notification settings - Fork 296
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 support to delegate to spectator #445
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This is a first stab at adding a hook that will allow updates that go to standard Servo types to be forwarded to a Spectator registry. In most cases the updates will be sent as they happen, e.g., the basic counter will increment the spectator counter internally. This avoids delays or other data quality issues. Because so much of Servo is based on static, the main integration point is a static reference in SpectatorContext. The default registry is a noop implementation so it must be set as early as possible in the application setup. To minimize the compatibility issues the existing Servo implementations were changed as little as possible. Concerns: - Custom monitor implementations that get registered will currently get ignored. Will look into that later. - User defined functions registered as gauges will now get called more frequently. This might cause load issues if they perform expensive operations inline.
dmuino
approved these changes
May 10, 2018
@@ -0,0 +1,91 @@ | |||
package com.netflix.servo; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
License?
Not really sure how it was passing before, some of these were from files I didn't modify.
This interface would allow us to detect when polling whether or not the monitor type reports directly to spectator or would need to be sent in separately.
Most recent test failure is:
Only on jdk8 build, looks like a flakey test to me. |
Still need to add tests for:
|
Also updates StatsMonitor to have a `computeStats` method to force the update without worrying about timing issues in the tests.
Adds tests for ContentualCounter, ContextualTimer, PeakRateCounter, and MinGauge. The PeakRateCounter and MinGauge are examples of custom meters.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This is a first stab at adding a hook that will allow
updates that go to standard Servo types to be forwarded
to a Spectator registry. In most cases the updates will
be sent as they happen, e.g., the basic counter will
increment the spectator counter internally. This avoids
delays or other data quality issues.
Because so much of Servo is based on static, the main
integration point is a static reference in
SpectatorContext. The default registry is a noop
implementation so it must be set as early as possible
in the application setup.
To minimize the compatibility issues the existing
Servo implementations were changed as little as possible.
Concerns:
will currently get ignored. Will look into that later.
get called more frequently. This might cause load issues
if they perform expensive operations inline.