[jira] [Commented] (SOLR-17587) Prometheus Writer duplicate TYPE information in exposition format

2025-02-18 Thread ASF subversion and git services (Jira)


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

ASF subversion and git services commented on SOLR-17587:


Commit cc2112f93d65eef29881c1efae76db3cbef85cbf in solr's branch 
refs/heads/branch_9_8 from Matthew Biscocho
[ https://gitbox.apache.org/repos/asf?p=solr.git;h=cc2112f93d6 ]

SOLR-17587: wt=prometheus fix duplicate TYPE information  (#3006)

Metrics: Prometheus response writer fix for non-compliant exposition format 
containing duplicate TYPE lines

9x backport of main:
* SOLR-17587: wt=prometheus fix duplicate TYPE information (#2902)


> Prometheus Writer duplicate TYPE information in exposition format
> -
>
> Key: SOLR-17587
> URL: https://issues.apache.org/jira/browse/SOLR-17587
> Project: Solr
>  Issue Type: Bug
>Affects Versions: 9.7
>Reporter: Matthew Biscocho
>Priority: Minor
>  Labels: pull-request-available
> Fix For: 9.9
>
>  Time Spent: 3h
>  Remaining Estimate: 0h
>
> Solr's Prometheus writer duplicates `# TYPE   type>` in it's exposition format for core registry metrics.
> For example this appears twice in it's output:
> {code:java}
> # TYPE solr_metrics_core_average_request_time gauge
> solr_metrics_core_average_request_time{category="ADMIN",collection="foo",core="core_foo_shard9_replica_t351",handler="/admin/file",replica="replica_t351",shard="shard9"}
>  0.0 
> ...
> # TYPE solr_metrics_core_average_request_time gauge{code}
> This is technically not allowed per [Prometheus Exposition 
> format|https://github.com/prometheus/docs/blob/main/content/docs/instrumenting/exposition_formats.md#:~:text=Only%20one%20TYPE%20line%20may%20exist%20for%20a%20given%20metric%20name.]
> This happens because each Dropwizard registry is per core, but for Prometheus 
> compatible exposition format upon exporting, it needs to be 1 registry for 
> all cores on a single host, otherwise there will be duplicate `TYPE` formats 
> even though all metrics are unique for its tags/attributes.
> Funnily enough, prometheus upstream collector does not do this verification 
> and accepts the metrics anyways just fine Solr -> Prometheus -> Grafana.
> But depending on the technologies prometheus exposition verification, this 
> will fail. For example 
> [Telegraf|https://github.com/influxdata/telegraf/blob/master/plugins/inputs/prometheus/README.md]:
> {code:java}
> -12-09T16:56:01Z E! [inputs.prometheus] Error in plugin: error reading 
> metrics for "http://127.0.0.1:8983/solr/admin/metrics?wt=prometheus": 
> decoding response failed: text format parsing error in line 568: second TYPE 
> line for metric name "solr_metrics_core_average_request_time", or TYPE 
> reported after samples {code}
> This shouldn't be a blocker if you are pushing metrics to prometheus 
> collector directly.
>  



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

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



[jira] [Commented] (SOLR-17587) Prometheus Writer duplicate TYPE information in exposition format

2025-01-09 Thread ASF subversion and git services (Jira)


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

ASF subversion and git services commented on SOLR-17587:


Commit 13ba24eab0eec81cb7e6d99961da1144a4a0c44e in solr's branch 
refs/heads/branch_9x from Matthew Biscocho
[ https://gitbox.apache.org/repos/asf?p=solr.git;h=13ba24eab0e ]

SOLR-17587: wt=prometheus fix duplicate TYPE information  (#3006)

Metrics: Prometheus response writer fix for non-compliant exposition format 
containing duplicate TYPE lines

9x backport of main:
* SOLR-17587: wt=prometheus fix duplicate TYPE information (#2902)

> Prometheus Writer duplicate TYPE information in exposition format
> -
>
> Key: SOLR-17587
> URL: https://issues.apache.org/jira/browse/SOLR-17587
> Project: Solr
>  Issue Type: Bug
>  Security Level: Public(Default Security Level. Issues are Public) 
>Affects Versions: 9.7
>Reporter: Matthew Biscocho
>Priority: Minor
>  Labels: pull-request-available
>  Time Spent: 3h
>  Remaining Estimate: 0h
>
> Solr's Prometheus writer duplicates `# TYPE   type>` in it's exposition format for core registry metrics.
> For example this appears twice in it's output:
> {code:java}
> # TYPE solr_metrics_core_average_request_time gauge
> solr_metrics_core_average_request_time{category="ADMIN",collection="foo",core="core_foo_shard9_replica_t351",handler="/admin/file",replica="replica_t351",shard="shard9"}
>  0.0 
> ...
> # TYPE solr_metrics_core_average_request_time gauge{code}
> This is technically not allowed per [Prometheus Exposition 
> format|https://github.com/prometheus/docs/blob/main/content/docs/instrumenting/exposition_formats.md#:~:text=Only%20one%20TYPE%20line%20may%20exist%20for%20a%20given%20metric%20name.]
> This happens because each Dropwizard registry is per core, but for Prometheus 
> compatible exposition format upon exporting, it needs to be 1 registry for 
> all cores on a single host, otherwise there will be duplicate `TYPE` formats 
> even though all metrics are unique for its tags/attributes.
> Funnily enough, prometheus upstream collector does not do this verification 
> and accepts the metrics anyways just fine Solr -> Prometheus -> Grafana.
> But depending on the technologies prometheus exposition verification, this 
> will fail. For example 
> [Telegraf|https://github.com/influxdata/telegraf/blob/master/plugins/inputs/prometheus/README.md]:
> {code:java}
> -12-09T16:56:01Z E! [inputs.prometheus] Error in plugin: error reading 
> metrics for "http://127.0.0.1:8983/solr/admin/metrics?wt=prometheus": 
> decoding response failed: text format parsing error in line 568: second TYPE 
> line for metric name "solr_metrics_core_average_request_time", or TYPE 
> reported after samples {code}
> This shouldn't be a blocker if you are pushing metrics to prometheus 
> collector directly.
>  



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

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



[jira] [Commented] (SOLR-17587) Prometheus Writer duplicate TYPE information in exposition format

2025-01-08 Thread ASF subversion and git services (Jira)


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

ASF subversion and git services commented on SOLR-17587:


Commit 796b788ce8567cd21a89d1d58f715b65fda6ecc5 in solr's branch 
refs/heads/main from Matthew Biscocho
[ https://gitbox.apache.org/repos/asf?p=solr.git;h=796b788ce85 ]

SOLR-17587: wt=prometheus fix duplicate TYPE information (#2902)

Metrics: Prometheus response writer fix for non-compliant exposition format 
containing duplicate TYPE lines

> Prometheus Writer duplicate TYPE information in exposition format
> -
>
> Key: SOLR-17587
> URL: https://issues.apache.org/jira/browse/SOLR-17587
> Project: Solr
>  Issue Type: Bug
>  Security Level: Public(Default Security Level. Issues are Public) 
>Affects Versions: 9.7
>Reporter: Matthew Biscocho
>Priority: Minor
>  Labels: pull-request-available
>  Time Spent: 1h 50m
>  Remaining Estimate: 0h
>
> Solr's Prometheus writer duplicates `# TYPE   type>` in it's exposition format for core registry metrics.
> For example this appears twice in it's output:
> {code:java}
> # TYPE solr_metrics_core_average_request_time gauge
> solr_metrics_core_average_request_time{category="ADMIN",collection="foo",core="core_foo_shard9_replica_t351",handler="/admin/file",replica="replica_t351",shard="shard9"}
>  0.0 
> ...
> # TYPE solr_metrics_core_average_request_time gauge{code}
> This is technically not allowed per [Prometheus Exposition 
> format|https://github.com/prometheus/docs/blob/main/content/docs/instrumenting/exposition_formats.md#:~:text=Only%20one%20TYPE%20line%20may%20exist%20for%20a%20given%20metric%20name.]
> This happens because each Dropwizard registry is per core, but for Prometheus 
> compatible exposition format upon exporting, it needs to be 1 registry for 
> all cores on a single host, otherwise there will be duplicate `TYPE` formats 
> even though all metrics are unique for its tags/attributes.
> Funnily enough, prometheus upstream collector does not do this verification 
> and accepts the metrics anyways just fine Solr -> Prometheus -> Grafana.
> But depending on the technologies prometheus exposition verification, this 
> will fail. For example 
> [Telegraf|https://github.com/influxdata/telegraf/blob/master/plugins/inputs/prometheus/README.md]:
> {code:java}
> -12-09T16:56:01Z E! [inputs.prometheus] Error in plugin: error reading 
> metrics for "http://127.0.0.1:8983/solr/admin/metrics?wt=prometheus": 
> decoding response failed: text format parsing error in line 568: second TYPE 
> line for metric name "solr_metrics_core_average_request_time", or TYPE 
> reported after samples {code}
> This shouldn't be a blocker if you are pushing metrics to prometheus 
> collector directly.
>  



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

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