0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

Spring Bootの/metricsでhikaricpが出てこない時の対処

Posted at

状況

依存関係にactuatorとjdbc(hikaricp内包)入れていて、application.ymlでmanagement.endpoints.web.exposure.includeにmetricsも入れており、hikaricpのDataSource周りの実装も問題ないのに/actuator/metricsアクセスして表示される情報にjdbc.connectionsはあれどhikaricp.connectionsが表示されず詰まってました

解決した方法

アプリケーションを実行して実際にDB接続する処理を走らせ(APIリクエスト等)てから/metricsアクセスすると表示されました...
(しかもDBが複数ある場合、その処理でアクセスした対象のDataSourceのみ表示)

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?