Issue when using @Timed annotation with prometheus-metrics-instrumentation-dropwizard

オープン
#1,321 コメント 6 件 リアクション 1 件 担当者 0 名 GitHub で見る

まだ誰も着手していません。

評価

難易度
3/5
見積もり時間
1〜2日
初心者へのやさしさ
50/100
issue の種類
バグ
明瞭さ
おおむね明確
活発さ
静か
技術スタック
java, prometheus
領域
observability

調査の方向性

io.prometheus.metrics.instrumentation.dropwizard.DropwizardExports から始め、特に fromSnapshotAndCount と、その sanitizeMetricName の呼び出しを確認します。@Timed が付けられたメソッドからメトリクスをエクスポートし、Prometheus エンドポイントを呼び出して、重複メトリクス名の例外を再現します。完了条件は、.total サフィックス付きの Dropwizard メトリクスが重複名エラーなしでエクスポートされることです。

索引モデルが issue の本文から書いたものです。

説明

@Timed annotation, which can be annotated on the methods generates dropwizard metrics with .total as a suffix.

This is not compatible with prometheus-metrics-instrumentation-dropwizard to export dropwizard metrics.

Since the io.prometheus.metrics.instrumentation.dropwizard.DropwizardExports class has a method fromSnapshotAndCount which sanitizes the metric name withPrometheusNaming.sanitizeMetricName(dropwizardName).

As a result it causes duplicate metric name exception when prometheus endpoint is invoked.

Original reference here:
https://github.com/dropwizard/dropwizard/issues/10030 #

主要言語
Java
スター
2.3k
フォーク
833
平均マージ
2日 16時間
マージ済み PR(30日)
86

コントリビューションガイド

コントリビューションガイドを開く

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

prometheus/client_java のほかの issue

prometheus/client_java の issue をすべて見る

似ている issue

Java の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。