Coder Social home page Coder Social logo

Comments (18)

vietj avatar vietj commented on May 27, 2024

can you provide a reproducer please ?

from vertx-dropwizard-metrics.

leolux avatar leolux commented on May 27, 2024

Yep, I am working on it now.

from vertx-dropwizard-metrics.

leolux avatar leolux commented on May 27, 2024

Mhh, the issue seems not reproducable with the 3.0.0 Snapshot, but with the current up-to-date code. Is it possible that my code version is ahead of the snapshot version from https://oss.sonatype.org/content/repositories/snapshots?

from vertx-dropwizard-metrics.

leolux avatar leolux commented on May 27, 2024

I think that I've found the "cause": The metrics are null when pom.xml contains a dependency to vertx-web. I finish my reproducer now.

from vertx-dropwizard-metrics.

leolux avatar leolux commented on May 27, 2024

Reproducer that shows the issue: https://github.com/leolux/vertx-metrics-null

from vertx-dropwizard-metrics.

vietj avatar vietj commented on May 27, 2024

I'm not able to have null when I run it:

Jun 16, 2015 11:55:34 AM com.reproducer.Main
INFO: ************* PeriodicMetricsFetcher deployed successfully
Metrics: {"vertx.eventbus.messages.bytes-read":{"count":0,"meanRate":0.0,"oneMinuteRate":0.0,"fiveMinuteRate":0.0,"fifteenMinuteRate":0.0,"rate":"events/seconds"},"vertx.eventbus.messages.published":{"oneSecondRate":0,"count":0,"meanRate":0.0,"oneMinuteRate":0.0,"fiveMinuteRate":0.0,"fifteenMinuteRate":0.0,"rate":"events/seconds"},"vertx.eventbus.messages.published-local":{"oneSecondRate":0,"count":0,"meanRate":0.0,"oneMinuteRate":0.0,"fiveMinuteRate":0.0,"fifteenMinuteRate":0.0,"rate":"events/seconds"},"vertx.eventbus.messages.published-remote":{"oneSecondRate":0,"count":0,"meanRate":0.0,"oneMinuteRate":0.0,"fiveMinuteRate":0.0,"fifteenMinuteRate":0.0,"rate":"events/seconds"},"vertx.eventbus.messages.received":{"oneSecondRate":0,"count":0,"meanRate":0.0,"oneMinuteRate":0.0,"fiveMinuteRate":0.0,"fifteenMinuteRate":0.0,"rate":"events/seconds"},"vertx.eventbus.messages.sent":{"oneSecondRate":0,"count":0,"meanRate":0.0,"oneMinuteRate":0.0,"fiveMinuteRate":0.0,"fifteenMinuteRate":0.0,"rate":"events/seconds"},"vertx.verticles.com.reproducer.PeriodicMetricsFetcher":{"count":1},"vertx.eventbus.messages.delivered-remote":{"oneSecondRate":0,"count":0,"meanRate":0.0,"oneMinuteRate":0.0,"fiveMinuteRate":0.0,"fifteenMinuteRate":0.0,"rate":"events/seconds"},"vertx.eventbus.messages.pending":{"count":0},"vertx.eventbus.messages.sent-local":{"oneSecondRate":0,"count":0,"meanRate":0.0,"oneMinuteRate":0.0,"fiveMinuteRate":0.0,"fifteenMinuteRate":0.0,"rate":"events/seconds"},"vertx.eventbus.messages.received-local":{"oneSecondRate":0,"count":0,"meanRate":0.0,"oneMinuteRate":0.0,"fiveMinuteRate":0.0,"fifteenMinuteRate":0.0,"rate":"events/seconds"},"vertx.eventbus.messages.received-remote":{"oneSecondRate":0,"count":0,"meanRate":0.0,"oneMinuteRate":0.0,"fiveMinuteRate":0.0,"fifteenMinuteRate":0.0,"rate":"events/seconds"},"vertx.eventbus.messages.bytes-written":{"count":0,"meanRate":0.0,"oneMinuteRate":0.0,"fiveMinuteRate":0.0,"fifteenMinuteRate":0.0,"rate":"events/seconds"},"vertx.eventbus.messages.pending-remote":{"count":0},"vertx.eventbus.messages.pending-local":{"count":0},"vertx.eventbus.messages.delivered-local":{"oneSecondRate":0,"count":0,"meanRate":0.0,"oneMinuteRate":0.0,"fiveMinuteRate":0.0,"fifteenMinuteRate":0.0,"rate":"events/seconds"},"vertx.eventbus.messages.delivered":{"oneSecondRate":0,"count":0,"meanRate":0.0,"oneMinuteRate":0.0,"fiveMinuteRate":0.0,"fifteenMinuteRate":0.0,"rate":"events/seconds"},"vertx.eventbus.messages.reply-failures":{"count":0,"meanRate":0.0,"oneMinuteRate":0.0,"fiveMinuteRate":0.0,"fifteenMinuteRate":0.0,"rate":"events/seconds"},"vertx.worker-pool-size":{"value":20},"vertx.eventbus.messages.sent-remote":{"oneSecondRate":0,"count":0,"meanRate":0.0,"oneMinuteRate":0.0,"fiveMinuteRate":0.0,"fifteenMinuteRate":0.0,"rate":"events/seconds"},"vertx.eventbus.handlers":{"count":0},"vertx.event-loop-size":{"value":16},"vertx.verticles":{"count":1},"vertx.timers":{"count":1}}
Metrics: {"vertx.eventbus.messages.bytes-read":{"count":0,"meanRate":0.0,"oneMinuteRate":0.0,"fiveMinuteRate":0.0,"fifteenMinuteRate":0.0,"rate":"events/seconds"},"vertx.eventbus.messages.published":{"oneSecondRate":0,"count":0,"meanRate":0.0,"oneMinuteRate":0.0,"fiveMinuteRate":0.0,"fifteenMinuteRate":0.0,"rate":"events/seconds"},"vertx.eventbus.messages.published-local":{"oneSecondRate":0,"count":0,"meanRate":0.0,"oneMinuteRate":0.0,"fiveMinuteRate":0.0,"fifteenMinuteRate":0.0,"rate":"events/seconds"},"vertx.eventbus.messages.published-remote":{"oneSecondRate":0,"count":0,"meanRate":0.0,"oneMinuteRate":0.0,"fiveMinuteRate":0.0,"fifteenMinuteRate":0.0,"rate":"events/seconds"},"vertx.eventbus.messages.received":{"oneSecondRate":0,"count":0,"meanRate":0.0,"oneMinuteRate":0.0,"fiveMinuteRate":0.0,"fifteenMinuteRate":0.0,"rate":"events/seconds"},"vertx.eventbus.messages.sent":{"oneSecondRate":0,"count":0,"meanRate":0.0,"oneMinuteRate":0.0,"fiveMinuteRate":0.0,"fifteenMinuteRate":0.0,"rate":"events/seconds"},"vertx.verticles.com.reproducer.PeriodicMetricsFetcher":{"count":1},"vertx.eventbus.messages.delivered-remote":{"oneSecondRate":0,"count":0,"meanRate":0.0,"oneMinuteRate":0.0,"fiveMinuteRate":0.0,"fifteenMinuteRate":0.0,"rate":"events/seconds"},"vertx.eventbus.messages.pending":{"count":0},"vertx.eventbus.messages.sent-local":{"oneSecondRate":0,"count":0,"meanRate":0.0,"oneMinuteRate":0.0,"fiveMinuteRate":0.0,"fifteenMinuteRate":0.0,"rate":"events/seconds"},"vertx.eventbus.messages.received-local":{"oneSecondRate":0,"count":0,"meanRate":0.0,"oneMinuteRate":0.0,"fiveMinuteRate":0.0,"fifteenMinuteRate":0.0,"rate":"events/seconds"},"vertx.eventbus.messages.received-remote":{"oneSecondRate":0,"count":0,"meanRate":0.0,"oneMinuteRate":0.0,"fiveMinuteRate":0.0,"fifteenMinuteRate":0.0,"rate":"events/seconds"},"vertx.eventbus.messages.bytes-written":{"count":0,"meanRate":0.0,"oneMinuteRate":0.0,"fiveMinuteRate":0.0,"fifteenMinuteRate":0.0,"rate":"events/seconds"},"vertx.eventbus.messages.pending-remote":{"count":0},"vertx.eventbus.messages.pending-local":{"count":0},"vertx.eventbus.messages.delivered-local":{"oneSecondRate":0,"count":0,"meanRate":0.0,"oneMinuteRate":0.0,"fiveMinuteRate":0.0,"fifteenMinuteRate":0.0,"rate":"events/seconds"},"vertx.eventbus.messages.delivered":{"oneSecondRate":0,"count":0,"meanRate":0.0,"oneMinuteRate":0.0,"fiveMinuteRate":0.0,"fifteenMinuteRate":0.0,"rate":"events/seconds"},"vertx.eventbus.messages.reply-failures":{"count":0,"meanRate":0.0,"oneMinuteRate":0.0,"fiveMinuteRate":0.0,"fifteenMinuteRate":0.0,"rate":"events/seconds"},"vertx.worker-pool-size":{"value":20},"vertx.eventbus.messages.sent-remote":{"oneSecondRate":0,"count":0,"meanRate":0.0,"oneMinuteRate":0.0,"fiveMinuteRate":0.0,"fifteenMinuteRate":0.0,"rate":"events/seconds"},"vertx.eventbus.handlers":{"count":0},"vertx.event-loop-size":{"value":16},"vertx.verticles":{"count":1},"vertx.timers":{"count":1}}
Metrics: {"vertx.eventbus.messages.bytes-read":{"count":0,"meanRate":0.0,"oneMinuteRate":0.0,"fiveMinuteRate":0.0,"fifteenMinuteRate":0.0,"rate":"events/seconds"},"vertx.eventbus.messages.published":{"oneSecondRate":0,"count":0,"meanRate":0.0,"oneMinuteRate":0.0,"fiveMinuteRate":0.0,"fifteenMinuteRate":0.0,"rate":"events/seconds"},"vertx.eventbus.messages.published-local":{"oneSecondRate":0,"count":0,"meanRate":0.0,"oneMinuteRate":0.0,"fiveMinuteRate":0.0,"fifteenMinuteRate":0.0,"rate":"events/seconds"},"vertx.eventbus.messages.published-remote":{"oneSecondRate":0,"count":0,"meanRate":0.0,"oneMinuteRate":0.0,"fiveMinuteRate":0.0,"fifteenMinuteRate":0.0,"rate":"events/seconds"},"vertx.eventbus.messages.received":{"oneSecondRate":0,"count":0,"meanRate":0.0,"oneMinuteRate":0.0,"fiveMinuteRate":0.0,"fifteenMinuteRate":0.0,"rate":"events/seconds"},"vertx.eventbus.messages.sent":{"oneSecondRate":0,"count":0,"meanRate":0.0,"oneMinuteRate":0.0,"fiveMinuteRate":0.0,"fifteenMinuteRate":0.0,"rate":"events/seconds"},"vertx.verticles.com.reproducer.PeriodicMetricsFetcher":{"count":1},"vertx.eventbus.messages.delivered-remote":{"oneSecondRate":0,"count":0,"meanRate":0.0,"oneMinuteRate":0.0,"fiveMinuteRate":0.0,"fifteenMinuteRate":0.0,"rate":"events/seconds"},"vertx.eventbus.messages.pending":{"count":0},"vertx.eventbus.messages.sent-local":{"oneSecondRate":0,"count":0,"meanRate":0.0,"oneMinuteRate":0.0,"fiveMinuteRate":0.0,"fifteenMinuteRate":0.0,"rate":"events/seconds"},"vertx.eventbus.messages.received-local":{"oneSecondRate":0,"count":0,"meanRate":0.0,"oneMinuteRate":0.0,"fiveMinuteRate":0.0,"fifteenMinuteRate":0.0,"rate":"events/seconds"},"vertx.eventbus.messages.received-remote":{"oneSecondRate":0,"count":0,"meanRate":0.0,"oneMinuteRate":0.0,"fiveMinuteRate":0.0,"fifteenMinuteRate":0.0,"rate":"events/seconds"},"vertx.eventbus.messages.bytes-written":{"count":0,"meanRate":0.0,"oneMinuteRate":0.0,"fiveMinuteRate":0.0,"fifteenMinuteRate":0.0,"rate":"events/seconds"},"vertx.eventbus.messages.pending-remote":{"count":0},"vertx.eventbus.messages.pending-local":{"count":0},"vertx.eventbus.messages.delivered-local":{"oneSecondRate":0,"count":0,"meanRate":0.0,"oneMinuteRate":0.0,"fiveMinuteRate":0.0,"fifteenMinuteRate":0.0,"rate":"events/seconds"},"vertx.eventbus.messages.delivered":{"oneSecondRate":0,"count":0,"meanRate":0.0,"oneMinuteRate":0.0,"fiveMinuteRate":0.0,"fifteenMinuteRate":0.0,"rate":"events/seconds"},"vertx.eventbus.messages.reply-failures":{"count":0,"meanRate":0.0,"oneMinuteRate":0.0,"fiveMinuteRate":0.0,"fifteenMinuteRate":0.0,"rate":"events/seconds"},"vertx.worker-pool-size":{"value":20},"vertx.eventbus.messages.sent-remote":{"oneSecondRate":0,"count":0,"meanRate":0.0,"oneMinuteRate":0.0,"fiveMinuteRate":0.0,"fifteenMinuteRate":0.0,"rate":"events/seconds"},"vertx.eventbus.handlers":{"count":0},"vertx.event-loop-size":{"value":16},"vertx.verticles":{"count":1},"vertx.timers":{"count":1}}

from vertx-dropwizard-metrics.

leolux avatar leolux commented on May 27, 2024

Ok, thank you. I don't know what happened to my project vertx-web. So I made a new git clone and now everything works. It seems that the command git pull -> Already-up-to-date was not enough in my case.

from vertx-dropwizard-metrics.

BlackRider97 avatar BlackRider97 commented on May 27, 2024

I also have same problem. Whenever I call metricsService.getMetricsSnapshot(vertx) , it always returns null

  • vertx-auth-common-3.2.0.jar
  • vertx-core-3.2.0.jar
  • vertx-dropwizard-metrics-3.2.0.jar
  • metrics-core-3.0.2.jar
  • vertx-web-3.2.0.jar
  • vertx-auth-jwt-3.2.0.jar

from vertx-dropwizard-metrics.

vietj avatar vietj commented on May 27, 2024

it means that you haven't enabled metrics in VertxOptions

from vertx-dropwizard-metrics.

BlackRider97 avatar BlackRider97 commented on May 27, 2024

@vietj No. I have enabled it.

        Vertx vertx = Vertx.vertx();
        VertxOptions options = new VertxOptions();
        options.setWarningExceptionTime(500);
        options.setMetricsOptions(new DropwizardMetricsOptions().setEnabled(true).addMonitoredHttpServerUri(new Match().setValue("/*").setType(MatchType.REGEX)));
        Vertx.vertx(options);
        DeploymentOptions verticleOptions = new DeploymentOptions().setInstances(1);
        vertx.deployVerticle(new HttpServer(), verticleOptions, res-> {
            if (res.succeeded()){
                System.out.println("Http Server verticle deployment completed with id " + res.result());
            } else{
                System.out.println("Deployment failed!");
            }
        });

metricsService.metricsNames() also returns empty string array []

from vertx-dropwizard-metrics.

vietj avatar vietj commented on May 27, 2024

can you pack this in a small project and make a reproducer ?

from vertx-dropwizard-metrics.

dixiesraj avatar dixiesraj commented on May 27, 2024

I tried with version 3.3.3. I have this issue.
Both the metricsNames and metrics are null / empty.

I also observed the following,

When I print the VertxOptions before creating a clusteredVertx, I get the following

metrics=MetricsOptions{enabled=true, json=null},

After the vertx creation, I get the following from vertx.properties map

clusterManager:io.vertx.spi.cluster.hazelcast.HazelcastClusterManager@73545b80, metricsEnabled:false,

Which mean, the VertxOptions set is not honoured during vertx creation.

from vertx-dropwizard-metrics.

tsegismont avatar tsegismont commented on May 27, 2024

Can you provide a reproducer? Thanks

2016-09-15 12:25 GMT+02:00 Dixie Raj [email protected]:

I tried with version 3.3.3. I have this issue.
Both the metricsNames and metrics are null / empty.

I also observed the following,

When I print the VertxOptions before creating a clusteredVertx, I get the
following

metrics=MetricsOptions{enabled=true, json=null},

After the vertx creation, I get the following from vertx.properties map

clusterManager:io.vertx.spi.cluster.hazelcast.HazelcastClusterManager@73545b80, metricsEnabled:false,

Which mean, the VertxOptions set is not honoured during vertx creation.


You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
#8 (comment),
or mute the thread
https://github.com/notifications/unsubscribe-auth/ABbltu2VxE1n9Kc__k-LRs2kjOvKzU0Aks5qqR0rgaJpZM4FDshL
.

from vertx-dropwizard-metrics.

dixiesraj avatar dixiesraj commented on May 27, 2024

I solved this issue. Looks like OSGi Version of DropwizardOptions
requires a separate classloader.

Thanks.

On Friday 16 September 2016 02:58 PM, Thomas Segismont wrote:

Can you provide a reproducer? Thanks

2016-09-15 12:25 GMT+02:00 Dixie Raj [email protected]:

I tried with version 3.3.3. I have this issue.
Both the metricsNames and metrics are null / empty.

I also observed the following,

When I print the VertxOptions before creating a clusteredVertx, I
get the
following

metrics=MetricsOptions{enabled=true, json=null},

After the vertx creation, I get the following from vertx.properties map

clusterManager:io.vertx.spi.cluster.hazelcast.HazelcastClusterManager@73545b80,
metricsEnabled:false,

Which mean, the VertxOptions set is not honoured during vertx creation.


You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub

#8 (comment),
or mute the thread

https://github.com/notifications/unsubscribe-auth/ABbltu2VxE1n9Kc__k-LRs2kjOvKzU0Aks5qqR0rgaJpZM4FDshL
.


You are receiving this because you commented.
Reply to this email directly, view it on GitHub
#8 (comment),
or mute the thread
https://github.com/notifications/unsubscribe-auth/AIfKadblEoNZu6DXcymjD3KIEuqf8hPmks5qqmEngaJpZM4FDshL.

from vertx-dropwizard-metrics.

SankalpPatil09 avatar SankalpPatil09 commented on May 27, 2024

i am facing the same issue, sometimes it returns value, but some time it returns null always

  Vertx vertx = Vertx.vertx(new VertxOptions().setMetricsOptions(
    new DropwizardMetricsOptions().setEnabled(true)
  ));
  
  
  vertx.setPeriodic(5000L, (handler) -> {
    MetricsService metricsService = MetricsService.create(vertx);
    JsonObject metrics = metricsService.getMetricsSnapshot("vertx.pools");
    System.out.println("vertx metrics new pool" + metrics);
  });

from vertx-dropwizard-metrics.

SankalpPatil09 avatar SankalpPatil09 commented on May 27, 2024

Found the issue, it was due to the order of import of compile 'io.vertx:vertx-dropwizard-metrics:4.3.3' . Changed the order of import to start of dependencies in gradle, seems to work now. Which is very strange. Somehow declaring the dependency at the end was affecting the dropwizard.

from vertx-dropwizard-metrics.

vietj avatar vietj commented on May 27, 2024

that sounds very weird

from vertx-dropwizard-metrics.

SankalpPatil09 avatar SankalpPatil09 commented on May 27, 2024

yes weird, it was something to do these dependencies.
implementation "io.vertx:vertx-micrometer-metrics:$vertxVersion"
implementation "io.micrometer:micrometer-registry-prometheus:1.2.0"

maybe these dependencies were overwriting the drop-wizard settings.

from vertx-dropwizard-metrics.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.