Skip to content

When using an AbstractRoutingDataSource, metronome does not gather connection metrics on DataSourcePoolMetadataProvidersConfiguration/DataSourcePoolMetricsAutoConfiguration #22719

@nightswimmings

Description

@nightswimmings

After migration to Spring Boot 2.0 (currently using 2.2.4), the prometheus actuator (therefore metronome) is not outputting datasource/pool connections metrics anymore. This is due the fact that I am using a multitenancy setup by means of an AbstractRoutingDatasource. Previously, info on connections{min/max/active} appeared with the same setup.

The /actuator/metrics endpoint shows following metrics when I don't use the AbstractRouting:
jdbc.connections.{min,max}
hikaricp.connections.{idle,pending,active,creation,max,min,usage,timeout,aquire}

So I guess there must be a way to adapt DataSourcePoolMetadataProvider so it calls AbstractDataSource.determineTargetDataSource() and inferrs the metadata provider

Otherwise, any simple customization hack suggestion is welcomed

Metadata

Metadata

Assignees

No one assigned

    Labels

    status: supersededAn issue that has been superseded by another

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions