Skip to content
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

remove MetricType class #735

Closed
2 tasks
donbourne opened this issue Aug 25, 2022 · 1 comment
Closed
2 tasks

remove MetricType class #735

donbourne opened this issue Aug 25, 2022 · 1 comment
Assignees
Milestone

Comments

@donbourne
Copy link
Member

The ability to register an arbitrary subtype of Metric has been removed from the MetricRegistry class (in the 5.0 release). As such, the only way to create metrics is from the Counted / Gauge / Timed annotations or the MetricRegistry counter / gauge / histogram / timer methods. As a result, it should always be obvious to the implementation what the metric type is, and we can eliminate the MetricType class. A benefit of doing this is that we would no longer give users of the API the ability to get into trouble by trying to create a Metadata object with a metric type (say COUNTER), and then try to use that to create a different type (say TIMER). It would also help tidy up the API to not have this unnecessary class.

  • remove MetricType class
  • remove MetricType from Metadata / MetadataBuilder / DefaultMetadata
@donbourne donbourne added this to the 5.0 milestone Sep 8, 2022
jgallimore added a commit to jgallimore/microprofile-metrics that referenced this issue Sep 8, 2022
Signed-off-by: Jonathan Gallimore <jgallimore@tomitribe.com>
Channyboy added a commit that referenced this issue Sep 14, 2022
@donbourne
Copy link
Member Author

fixed by #740

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants