問題タブ [codahale-metrics]
For questions regarding programming in ECMAScript (JavaScript/JS) and its various dialects/implementations (excluding ActionScript). Note JavaScript is NOT the same as Java! Please include all relevant tags on your question; e.g., [node.js], [jquery], [json], [reactjs], [angular], [ember.js], [vue.js], [typescript], [svelte], etc.
java - requestMapping アノテーションが付けられたコントローラーとメソッドのスプリング メトリック名ルールを無効にする
Spring Boot Actuator とそのメトリクスは初めてです。
ドキュメントと私が読んだすべての例では、Spring がエンドポイント メトリックをそのような方法でエクスポートすることが常に示されていますgauge.response.[method-path]
。しかし、複雑な@RequestMappings
. たとえば、次のようなマッピングがあります。
@RequestMapping(value = {"{id:[^.]+}", "{id:[^.]+}.{type:\\w+}"}, method = RequestMethod.GET)
その結果、春はそのような醜い変数gauge.response.500.{id:[^.]+}
でメトリックを生成しますgauge.response.200.{id:[^.]+}.{type:\\w+}"
(ええ、それがいくつかのシンボルを置き換えることは知っています)
この場合、これを無効にして、デフォルトの名前付けなどを有効にできれば、はるかに良いでしょうgauge.response.[package.Class.method]
。