Page MenuHomePhabricator

Clarify dependencies on codehale dropwizards
Closed, ResolvedPublic3 Estimated Story Points

Description

As a maintainer of the wdqs streaming updater I want the pipeline to work correctly with different flink metrics plugins being loaded so that I can switch implementation from the flink config file without rebuilding my application.

the streaming-updater-producer project relies on com.codahale.metrics for:

  • the histogram class in MeasureEventProcessingLatencyOperation
  • DropwizardToFlinkListener to pass the metrics collected from the rdf components in tools (WikibaseRepository) to the flink MetricRegistry

Currently it seems that the pipeline relies on the flink-metrics-graphite plugin being loaded to make the dropwizards deps available.
Running without it it seems to fail with:

Caused by: java.lang.NoClassDefFoundError: com/codahale/metrics/Reservoir
	at org.wikidata.query.rdf.updater.UpdaterPipeline$.measureLatency(UpdaterPipeline.scala:154)

AC:

  • the pipeline should be runable without the flink-metrics-graphite plugin being loaded

Event Timeline

Restricted Application added a subscriber: Aklapper. · View Herald Transcript
CBogen set the point value for this task to 3.Oct 26 2020, 6:45 PM

Change 636667 had a related patch set uploaded (by ZPapierski; owner: ZPapierski):
[wikidata/query/rdf@master] Add explicit codehale metrics dependency

https://gerrit.wikimedia.org/r/636667

After investigation I found that most metric plugins do not shade in codehale metrics; graphite plugin does this because it actually uses them in the code (other reporters access flink provided abstraction). Since it is the exception, I decided to shade in the dependency.

Change 636667 merged by jenkins-bot:
[wikidata/query/rdf@master] Add explicit codehale metrics dependency

https://gerrit.wikimedia.org/r/636667