-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Use WavefrontSender interface in WavefrontMeterRegistry #1901
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
Conversation
…ront via HTTP transport-only (proxy is still supported as later versions of the Wavefront proxy accepts both metrics and histograms via HTTP on the socket port (typically 2878). This change is backwards compatible and will interpret existing proxy://<proxy_host>:2878 configurations as reporting via HTTP to http://<proxy_host>:2878 (note there is no SSL encryption) while leaving existing users that do use http reporting (e.g. https://longboard.wavefront.com) intact. This also changes the default reporting interval to match the Wavefront recommended default of once every minute.
Now we are good |
...rometer-registry-wavefront/src/main/java/io/micrometer/wavefront/WavefrontMeterRegistry.java
Show resolved
Hide resolved
...rometer-registry-wavefront/src/main/java/io/micrometer/wavefront/WavefrontMeterRegistry.java
Show resolved
Hide resolved
} | ||
|
||
static String getWavefrontReportingUri(WavefrontConfig wavefrontConfig) { | ||
// proxy reporting is now http reporting on newer wavefront proxies. |
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.
Should we mention a minimum version of the proxy in release notes? Is there any concern some users may still be running an older version of the proxy?
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.
It would have to be a very old proxy, @basilisk487 care to comment?
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.
I believe HTTP support was added in 4.29, which was released in early July of 2018. Since we consider all 4.x and 5.x releases deprecated, it should have us covered.
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.
Looks good. Thank you for the pull request!
The `WavefrontSender` handles batching internally, so this removes partitioning we were doing on publishing meters. Renames private methods to reflect their modified behavior. Changes signature of `publishMetric` and `publishDistribution` to use the registry's `WavefrontSender`. Lowers log level of failed publish to WARN, which still may be too verbose on a per-metric/per-distribution basis to log publish failures. We can revisit this more in follow-ups. See #1901
I have added a polish commit for these changes in fac0211 |
Use WavefrontSender interface to send metrics and histograms to Wavefront via HTTP transport-only (proxy is still supported as later versions of the Wavefront proxy accepts both metrics and histograms via HTTP on the socket port (typically 2878).
This change is backwards compatible and will interpret existing proxy://<proxy_host>:2878 configurations as reporting via HTTP to http://<proxy_host>:2878 (note there is no SSL encryption) while leaving existing users that do use http reporting (e.g. https://longboard.wavefront.com) intact.
This also changes the default reporting interval to match the Wavefront recommended default of once every minute.