Skip to content

Add support for per-query metrics in Hibernate statistics #1006

@jfougere

Description

@jfougere

Current implementation of HibernateMetrics exposed counters & also time gauges for max execution queries, however no tags are provided in order to know about which query those metrics are related.

I believe this could be very useful and could be done using current Hibernate Statistics class implementation.

For example the TimeGauge hibernate.query.executions.max could be tag with a query tag and the value could be provided by Statistics.getQueryExecutionMaxTimeQueryString().

Also the other counter metrics could be retrieved by query using:

  • Statistics.getQueries()
  • Statistics.getQueryStatistics(String query)

What do u think ?

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions