-
Notifications
You must be signed in to change notification settings - Fork 37
Dont discard metrics on exception while exporting #98
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
Closed
YannRobert
wants to merge
289
commits into
jmxtrans:master
from
YannRobert:DontDiscardMetricsOnExceptionWhileExporting
Closed
Dont discard metrics on exception while exporting #98
YannRobert
wants to merge
289
commits into
jmxtrans:master
from
YannRobert:DontDiscardMetricsOnExceptionWhileExporting
Conversation
This file contains hidden or 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
classpath : org.jmxexporter -> org.jmxtrans.embedded
Github repo transfer to jmxtrans organization
…ad) from "site" phase"
pom.xml cleanup
…y embedded-jmxtrans javadocs
Use dedicated hostname http://embedded-jmxtrans.jmxtrans.org to deploy javadocs
Fix build failure due to Apache RAT "unlicensed file CNAME"
…n outputwriter JSON declaration.
Add support for disabling output writer
Add spring xml namespace <jmxtrans:jmxtrans />
Add @author Jon Stevens and change license from ASL to MIT
Change license declaration in pom.xml from ASL to MIT
Add Spring javadocs URL in pom.xml's maven-javadoc-plugin configuration
Added hot configuration reloading for Spring
Rename "configuration-scan-period" in "configuration-scan-period-in-seconds" to prevent misunderstanding of the time unit + add log messages + thread safety.
…r to avoid java.lang.NoSuchMethodException: org.jmxtrans.embedded.spring.EmbeddedJmxTransFactory.<init>() thrown in some case by Spring's SimpleInstantiationStrategy
…s alreaded executed, then it should not be removed from the Runtime otherwise we get an IllegalStateException: Shutdown in progress. The code was refactored so that the shutdown hook executes the same code as the normal stop, still with logging message that indicates whether it's the hook or the normal stop. The shutdown hook Thread's name is set explicitly so that it's even easier to see that in the logs.
Add osgi support. Make common pool optionnal
In some case, we can get ```java.lang.IllegalStateException: Pool not open``` when Thread ```jmxtrans-export-1``` calls write(...) on a GraphiteWriter that was previously closed. In order to prevent that - as much as possible - we can shutdownNow() the ScheduledExecutorServices so that tasks that are currently running can detect that the Thread is interrupted, and eventually terminate earlier.
… state of each of the OutputWriters is maintained by OutputWriterSet class, that also provided way to ensure consistent write on all OutputWriters even when some of them are failing. Methods ```startAll()```, ```stopAll()``` and ```writeAll()``` are mutually synchronized, so that we neither stop OutputWriters while writing on it, nor write with OutputWriter while or after they are stopped.
…exported, so that in case of an Excpetion during the export, we try again to export this batch on the next export invocation
|
jmxtrans project » embedded-jmxtrans #113 SUCCESS |
Closed
696645d to
760eba8
Compare
This was referenced Nov 10, 2015
Merged
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.
In case an Exception occurs while exporting a metric, we don't want to discard the value.
We want to keep metrics value in memory, until it is successfully exported (or until the buffer is full)
So that when the backend is unavailable for minutes or hours, we keep the metrics in memory. When the backend becomes available again, the metrics are sent (and you didn't loose all your metrics)
There was already a discarding strategy to discard metrics values when the buffer is full.
The default buffer size was 200. So if you collect metrics every 30 seconds, it keeps 100 minutes of metrics in memory before starting to discard oldest metrics. If you backend has less than 100 minutes in a raw of unavailability, you don't loose anything.