InfluxDB and dropwizard
Add this to your dropwizard "yaml" file (we're using the graphite reporter):. Metrics: reporters: - type: graphite host: localhost port: 2003 prefix: dev.your-app durationUnit: milliseconds frequency: 10 second. Next, setup your dropwizard app so you can easily reuse the config for custom metrics:. Public static MetricRegistry metrics = new MetricRegistry();. And initialise the registry in your "run" method using:. Metrics = environment.metrics();. Unfortunately moving average metrics and integrals are n...
Adding Basic Authentication to DropWizard
Be aware that when Dropwizard documentation talks about Basic Authentication, it might not be what you're looking for ( https:/ dropwizard.github.io/dropwizard/manual/auth.html. There is a difference between "Authentication" and "Authorization". Authentication checks a user is valid, authorization protects a resource. Add users to yaml file. Add the configuration object. Create a security filter. Add security filter to your main dropwizard class. Add users to YAML file. Add the configuration Object.