You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@lucene.apache.org by "Fadi Mohsen (Jira)" <ji...@apache.org> on 2020/10/30 11:13:00 UTC

[jira] [Comment Edited] (SOLR-14837) prometheus-exporter: different metrics ports publishes mixed metrics

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

Fadi Mohsen edited comment on SOLR-14837 at 10/30/20, 11:12 AM:
----------------------------------------------------------------

Not sure about the process, I cloned from master, setup eclipse and got a couple of import warnings (sneaked in in patch.log),

just: 
{noformat}
git apply patch.log{noformat}


was (Author: fadi.mohsen@gmail.com):
Not sure about the process, I cloned from master, setup eclipse and got a couple of import warnings (sneaked in in patch.log),

Attaching patch.log, output of git diff.
{noformat}
git diff > patch.log{noformat}

> prometheus-exporter: different metrics ports publishes mixed metrics
> --------------------------------------------------------------------
>
>                 Key: SOLR-14837
>                 URL: https://issues.apache.org/jira/browse/SOLR-14837
>             Project: Solr
>          Issue Type: Improvement
>          Components: contrib - prometheus-exporter
>    Affects Versions: 8.6.2
>            Reporter: Fadi Mohsen
>            Priority: Minor
>         Attachments: patch.log
>
>
> when calling SolrExporter.main "pro-grammatically"/"same JVM" with two different solr masters asking to publish the metrics on two different ports, the metrics are being mixed on both metric endpoints from the two solr masters.
> This was tracked down to a static variable called *defaultRegistry*:
> https://github.com/apache/lucene-solr/blob/master/solr/contrib/prometheus-exporter/src/java/org/apache/solr/prometheus/exporter/SolrExporter.java#L86
> removing the static keyword fixes the issue.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@lucene.apache.org
For additional commands, e-mail: issues-help@lucene.apache.org