iZettle / dropwizard-metrics-influxdb

Dropwizard Metrics v3 InfluxDB
Apache License 2.0
88 stars 37 forks source link

Add measurement mapping for jobs #168

Closed xiao-pp closed 3 years ago

xiao-pp commented 3 years ago

https://github.com/dropwizard-jobs/dropwizard-jobs has built-in metrics that could be registered in DW either manually or by using JobsBundle.

This PR adds mappings on such metrics and put them into measurement jobs.

It requires the job class to have Job at the end of its class name.

coveralls commented 3 years ago

Coverage Status

Coverage increased (+0.03%) to 80.259% when pulling dcf31fb2d0342b2860040c15a90ffde19ef50b8c on add-measurement-mapping-for-jobs into ca03c072bd32ea06e5f36b6272af8ad60ad98406 on master.

xiao-pp commented 3 years ago

@izrobin Ah that's a good point - I think ultimately it should be possible. Based on the String it should be able to find the class with that name then further check the super class/interface.

However that'd make it hard/impossible to "override" the mapping logic?