question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Add Dropwizard like annotations

See original GitHub issue

Add annotations like in Dropwizard

@Metered
@ExceptionMetered
@Counted
@Gauge
@CachedGauge
@Metric
@ResponseMetered

and Spring support for that

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Reactions:6
  • Comments:25 (20 by maintainers)

github_iconTop GitHub Comments

5reactions
paul-ovchinnikovcommented, Oct 25, 2018

Ok, let’s forget about DropWizard and its weird architecture. The main concern about micrometer that it’s a Pivotal project and a Spring Framework is the main project of Pivotal too. So why not to make micrometer more useful to integrate with Spring. Not as part of micrometer but as an additional bridge library ‘micrometer-spring’ for example. With annotations and BPP or static generator and blackjack. Annotations definitely make development easier and code cleaner. This issue the most discussed in micrometer project, but you just closed it. Maybe it is worth extending a little more attention to this issue and consider it up with your colleagues?

4reactions
jkschneidercommented, Oct 17, 2018

@gavlyukovskiy Is this easier than:

private AtomicInteger myGauge = Metrics.gauge("my.gauge", Tags.of("Tag", "Value"), new AtomicInteger(0));
private Counter myCounter = Metrics.counter("my.counter", Tags.of("Tag", "Value"));

??

The latter doesn’t require any AOP magic.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Dropwizard Core
When your application runs Configured Commands like the server command, Dropwizard parses the provided YAML configuration file and builds an instance of your ......
Read more >
Dropwizard Validation
Additionally, annotations such as HeaderParam , CookieParam , FormParam , etc, can be constrained with violations giving descriptive errors and 400 status ...
Read more >
Dropwizard Dependency Injection
Note: the @Singleton annotation is only effective for Dropwizard resources. For custom classes, don't forget to register them as shown above with bindAsContract ......
Read more >
Getting Started — Dropwizard
A Dropwizard application can contain many resource classes, each corresponding to its own URI pattern. Just add another @Path -annotated resource class and...
Read more >
Dropwizard Example, Step by Step
Insert a new person: · http://localhost:8080/people ; Retrieve that person: · http://localhost:8080/people/1 ; View that person in a freemarker template: curl or ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found