coursera / metrics-datadog

metrics-datadog
Other
187 stars 105 forks source link

Provide example of integration in Java (not Scala) #90

Open roryodonnell opened 6 years ago

roryodonnell commented 6 years ago

Thanks

Frantch commented 6 years ago

HttpTransport httpTransport = new HttpTransport.Builder().withApiKey(apiKey).build(); datadogReporter = DatadogReporter.forRegistry(registry).withTransport(httpTransport) .withExpansions(EnumSet.of(DatadogReporter.Expansion.COUNT)).build(); datadogReporter.start(1, TimeUnit.MINUTES);

registry.counter("if.you.really.cant.do.that.by.yourself.you.really.should.reconsider.yourself.as.a.develeoper").inc()