-
Notifications
You must be signed in to change notification settings - Fork 188
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
Added logging decorator for CuratorFramework to Audit ZK Endpoints #2172
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
rosalind210
commented
Jan 29, 2021
SingularityService/src/main/java/com/hubspot/singularity/data/LoggingCuratorFramework.java
Outdated
Show resolved
Hide resolved
rosalind210
commented
Jan 29, 2021
SingularityService/src/main/java/com/hubspot/singularity/data/LoggingCuratorFramework.java
Show resolved
Hide resolved
rosalind210
changed the title
WIP: Added logging decorator for CuratorFramework
Added logging decorator for CuratorFramework to Audit ZK Endpoints
Jan 29, 2021
rosalind210
commented
Jan 29, 2021
SingularityService/src/main/java/com/hubspot/singularity/data/LoggingCuratorFramework.java
Outdated
Show resolved
Hide resolved
SingularityService/src/main/java/com/hubspot/singularity/data/LoggingCuratorFramework.java
Outdated
Show resolved
Hide resolved
SingularityService/src/main/java/com/hubspot/singularity/data/LoggingCuratorFramework.java
Outdated
Show resolved
Hide resolved
Looks solid overall 👍 Couple minor things but the core is all there I'm curious — will these logs mostly be read by humans or machines (presumably aggregating for further analysis)? If the latter, may want to make the output format more easily parsable, but otherwise looks good. |
SingularityService/src/main/java/com/hubspot/singularity/data/LoggingCuratorFramework.java
Outdated
Show resolved
Hide resolved
SingularityService/src/main/java/com/hubspot/singularity/data/LoggingCuratorFramework.java
Outdated
Show resolved
Hide resolved
🚢 |
ssalinas
reviewed
Feb 2, 2021
SingularityService/src/main/java/com/hubspot/singularity/data/LoggingCuratorFramework.java
Outdated
Show resolved
Hide resolved
SingularityService/src/main/java/com/hubspot/singularity/data/LoggingCuratorFramework.java
Show resolved
Hide resolved
SingularityService/src/main/java/com/hubspot/singularity/data/LoggingCuratorFramework.java
Outdated
Show resolved
Hide resolved
🚢 |
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.
Created a decorator for the CuratorFramework to handle logging calls to ZooKeeper. It holds a maps that connects the thread ID, classname, and method nameto the number of zookeeper calls it has made over certain interval of time.
The most important updates:
LoggingCuratorFramework
created that keeps track of call counts and logs when that amountSingularityCuratorProvider
, if a booleanuseLoggingCuratorFramework
is true in theSingularityConfiguration
clear()
performed by a timer, clears every 30 milliseconds.[1/28 Update] Added timer to LoggingCuratorFramework that performs a clear (logs and empties everything in the map) every 3 minutes.
[1/29] Logs tested in
iad03-test
, output: