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

Refactor metrics and sync with current Indy for features. #48

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

jdcasey
Copy link
Member

@jdcasey jdcasey commented Jan 19, 2020

This commit refactors the metrics subsystem to generalize the interceptor + wrap-with-metrics features away from dropwizard's metrics API. Dropwizard now becomes a provider for the metric implementation, wit

This commit also synchronizes with the current Indy master branch, bringing in cumulative metrics functions (for reporting to logging systems currently) and support for wrapping arbitrary code blocks with me

Note that with this commit, the following control levels are available:

  • global enable/disable of metrics
  • dropwizard-subsystem enable/disable/selection of metrics (choose which ones to report in DW)
  • graphite / console reporter enable/disable/selection of metrics
  • control over whether to report a metric cumulatively, using ThreadContext from weft

each of these will get a config section (metrics.global, metrics.dropwizard, metrics.dropwizard.graphite, metrics.dropwizard.console) to allow separate selection of metrics for each.

The zabbix and elasticsearch reporters have been removed, since they have never been used, and won't be in the forseeable future.

This commit refactors the metrics subsystem to generalize the interceptor + wrap-with-metrics features away from dropwizard's metrics API. Dropwizard now becomes a provider for the metric implementation, without affecting the way metrics are triggered. Accordingly, the console / graphite reporters are factored out, with the graphite reporter put in a separate module from the dropwizard core.

This commit also synchronizes with the current Indy master branch, bringing in cumulative metrics functions (for reporting to logging systems currently) and support for wrapping arbitrary code blocks with metrics (using a lambda).

Note that with this commit, the following control levels are available:

- global enable/disable of metrics
- dropwizard-subsystem enable/disable/selection of metrics (choose which ones to report in DW)
- graphite / console reporter enable/disable/selection of metrics
- control over whether to report a metric cumulatively, using ThreadContext from weft

each of these will get a config section (metrics.global, metrics.dropwizard, metrics.dropwizard.graphite, metrics.dropwizard.console) to allow separate selection of metrics for each.

The zabbix and elasticsearch reporters have been removed, since they have never been used, and won't be in the forseeable future.
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

Successfully merging this pull request may close these issues.

1 participant