opentracing-contrib / java-metrics

Apache License 2.0
31 stars 9 forks source link

Define a TracerConverter to enable metrics to automatically be applied to resolver Tracer #9

Open objectiser opened 7 years ago

objectiser commented 7 years ago

The TracerConverter implementation should automatically decorate a resolver Tracer with the metrics capability.

One issue to consider is how best to obtain the MetricsReporter implementation and how it will be configured.

For example, the PrometheusMetricsReporter does not expose an endpoint for collection (scraping) of the metric data - this is left to the application, which may be using Prometheus to collect other metrics, and/or want to decide how best to expose (or push) the metrics.

When the TracerResolver/Converter approach is being used, it likely that the application may not be aware of the tracing or metrics collection - therefore an additional mechanism will be required to enable the appropriate metrics endpoint to be initialized.