[ 
https://issues.apache.org/jira/browse/SOLR-10654?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17865642#comment-17865642
 ] 

David Smiley commented on SOLR-10654:
-------------------------------------

Thanks for jumping in Hoss.

I agree it'd be a good idea to test the values match the format (e.g. is an 
integer vs string vs float).  If the content needs to be scrubbed, we should 
*replace* values with a nominal value (i.e. 42 becomes 0) instead of with 
nothing.  We agree that the regex in there is too complex! I complained in the 
PR but should have insisted on further improvements.  In the JVM category, we 
should also blank out certain label values that are JVM specific like 
{{{}space="CodeCache"{}}}.
{quote}then WTF is the point of having the test
{quote}
New/removed metrics *might* require code updates.  This is one of the bigger 
concerns I have with the underlying approach; it's a rather hard-coded 
translation because we decided to not switch out DropWizard with a Prometheus 
native metrics backend.  Whoever updates the TXT file should do it as a 
thinking person who considers that the change makes sense – has a name, label, 
label-value, and metric format that makes sense – matches conventions of others 
as well too, for example.  A metric could inexplicably disappear; should be 
investigated if not intended.
{quote}Unless/until the lifecycle of Gauges is drastically overhauled in a 
future version of dropwizard
{quote}
Is this really specifically about Gauges (vs say Timers)?  Any way, my 
understanding is that we can call SolrMetricManager.removeRegistry on the 
various registries.  Perhaps tests generally or maybe just this test isn't 
doing that.  As we have test infrastructure that detects leaks of things, maybe 
we need to detect a metric registry leak.

> Expose Metrics in Prometheus format DIRECTLY from Solr
> ------------------------------------------------------
>
>                 Key: SOLR-10654
>                 URL: https://issues.apache.org/jira/browse/SOLR-10654
>             Project: Solr
>          Issue Type: Improvement
>          Components: metrics
>            Reporter: Keith Laban
>            Priority: Major
>         Attachments: prometheus_metrics.txt
>
>          Time Spent: 7h 20m
>  Remaining Estimate: 0h
>
> Expose metrics via a `wt=prometheus` response type.
> Example scape_config in prometheus.yml:
> {code:java}
> scrape_configs:
>   - job_name: 'solr'
>     metrics_path: '/solr/admin/metrics'
>     params:
>       wt: ["prometheus"]
>     static_configs:
>       - targets: ['localhost:8983']
> {code}
> [Rationale|https://issues.apache.org/jira/browse/SOLR-11795?focusedCommentId=17261423&page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-17261423]
>  for having this despite the "Prometheus Exporter".  They have different 
> strengths and weaknesses.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to