Skip to content

Conversation

@YannRobert
Copy link
Contributor

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.

cyrille-leclerc and others added 30 commits December 31, 2012 01:37
classpath : org.jmxexporter -> org.jmxtrans.embedded
Github repo transfer to jmxtrans organization
Fix build failure due to Apache RAT "unlicensed file CNAME"
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
Adrian PAPUSOI and others added 23 commits February 3, 2015 14:27
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
@buildhive
Copy link

jmxtrans project » embedded-jmxtrans #113 SUCCESS
This pull request looks good
(what's this?)

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.

10 participants