Uploaded image for project: 'Solr'
  1. Solr
  2. SOLR-14915

Prometheus-exporter should not depend on Solr-core

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • None
    • 9.0
    • None

    Description

      I think it's crazy that our Prometheus exporter depends on Solr-core – this thing is a client of Solr; it does not live within Solr. The exporter ought to be fairly lean. One consequence of this dependency is that, for example, security vulnerabilities reported against Solr (e.g. Jetty) can (and do, where I work) wind up being reported against this module even though Prometheus isn't using Jetty.

      From my evaluation today of what's going on, it appears the crux of the problem is that the prometheus exporter uses some utility mechanisms in Solr-core like XmlConfig (which depends on SolrResourceLoader and the rabbit hole goes deeper...) and DOMUtils (further depends on PropertiesUtil). It can easy be made to not use XmlConfig. DOMUtils & PropertiesUtil could move to SolrJ which already has lots of little dependency-free utilities needed by SolrJ and Solr-core alike.

      Attachments

        1. patch.patch
          3 kB
          Dawid Weiss

        Issue Links

          Activity

            People

              dsmiley David Smiley
              dsmiley David Smiley
              Votes:
              0 Vote for this issue
              Watchers:
              6 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0h
                  0h
                  Logged:
                  Time Spent - 3.5h
                  3.5h