Open s101d1 opened 8 years ago
Hi @s101d1 ! Unfortunately, I'm not very familiar with Dropwizard either; we use Play Framework here at Coursera. I dug around Dropwizard a bit and it looks like you shouldn't need to start the reporter on your own. Dropwizard should pick up your configuration from the yaml file and start DatadogReporter
automatically (see https://github.com/dropwizard/dropwizard/blob/7295c5faf42840325c161cc82ad4ed1db2bf8419/dropwizard-metrics/src/main/java/io/dropwizard/metrics/ScheduledReporterManager.java#L32 ). Can you try removing the reporter initialization from your run
method?
I removed them and still don't see metric data of "findUser" in DataDog Agent logs.
If I add this settings on config.yml, it shows the findUser metrics info on the console:
metrics:
frequency: 1 minute
reporters:
- type: datadog
transport:
type: udp
- type: console
output: stdout
Not sure if the DataDog Agent Manager app has bug or I'm missing someting here.
Make sure you have a DataDog agent and a DogStatsD listener running on the localhost where your application is running. The reporter under the hood sends data to DogStatsD endpoint, which, by default, is expected to be running on localhost:8125.
I have Dropwizard app with a Resource class and its method annotated with @Timed annotation:
When I opened http://localhost:8081/metrics?pretty=true on browser, I can see the findUser method metrics data, such as:
But I don't see the same metric data in DataDog Agent Manager logs.
Most of metrics data I see are jvm related metrics such as:
(as showed in "Logs & Status" -> "Dogstatsd Logs")
FYI this is the code where I enable the DataDog metrics:
and in the dropwizard yml file:
I'm new to dropwizard metrics so perhaps I missed something here?
Also, what is the difference between
frequency
option in yml and period time inreporter.start(10, TimeUnit.SECONDS)
?