-
Notifications
You must be signed in to change notification settings - Fork 992
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
Not sending metrics after stop and start of the StatsdMeterRegistry #1676
Comments
This looks like a duplicate of #1252 |
I'd like to verify but I think this will be an issue when stopping and starting the registry even if not changing the address. See #1252 (comment). This will probably be obviated when we stop having the issue with only a single subscriber allowed to the publisher (see #1251 (comment)) |
Upgrades to the latest version of reactor-core and reactor-netty. Uses a `DirectProcessor` instead of a `UnicastProcessor` that can only be subscribed to once. We need to be able to subscribe multiple times for reconnecting to a server with a new `TcpClient`. For multi-threaded publishing to the `Processor`, we use a `FluxSink` rather than calling `onNext` directly. Starting and stopping the registry should now work as expected and is tested. Unlike before, there is no buffering done in the `Processor`. If the UDP/TCP client or `lineSink` cannot keep up with the rate metrics are produced at, metric lines will be dropped rather than buffered indefinitely (potentially until the application runs out of memory). A mitigation when using the UDP/TCP client is to use the `BufferingFlux` which is enabled by default - it buffers metric lines in memory up to a configurable size/time before emitting to the UDP/TCP client. As a consequence, the queue size/capacity methods and metrics (`StatsdMetrics`) are no longer available. Resolves #1212 Resolves #1591 Resolves #1676 Resolves #1741 Supersedes #1251 Co-authored-by: Johnny Lim <izeye@naver.com>
Stopping and starting the |
micrometer-registry-statsd 1.4.0-snapshot with spring boot 2.2.0.RELEASE, 2.2.4.RELEASE release will throw java.lang.NoClassDefFoundError: io/micrometer/shaded/reactor/core/publisher/FluxSink |
Thanks for trying things out. Indeed it looks like the shaded dependencies are missing from the latest snapshots. I've opened #1843 to fix that. Once that is fixed, if you could try again, things should work. |
@uchandroth could you try again with the latest snapshots now that a fixed has been merged for the |
@shakuzen could you please let me know the release version of micrometer-registry-statsd which has this fix |
For now it is only available in the snapshot version |
@shakuzen thanks for the update |
Environment : spring-boot 2.2.0.RELEASE
micrometer-registry-statsd : 1.3.0 also tried with older versions
steps to replicate the issue:
But statsd metrics will not be send.
could you please help to understand the issue. Or is this the right way to reinitialise the connection
Background of the issue : we are using a stasd daemon with a dns name, if the deamon is restarted the ip address maybe different, because of the dns caching udp client will not be able to connect to the stasd daemon if the ip address is different.
We have tried setting networkaddress.cache.ttl=10 but it is not getting affected for the StatsdMeterRegistry UdpClient object
The text was updated successfully, but these errors were encountered: