[hibernate-dev] Hibernate Metrics support
Steve Ebersole
steve at hibernate.org
Wed Jun 3 08:48:54 EDT 2015
Please keep these discussions on list. Thanks :)
We do not always know when JTA transactions have started if we are not the
ones starting them. transactionStart() isn't going to happen.
I am ok with discussing start() as an option.
On Wed, Jun 3, 2015, 2:32 AM Mihalcea Vlad <mih_vlad at yahoo.com> wrote:
> I tried to match the current existing methods, to help one match the pairs.
>
> But "org.hibernate.engine.transaction.spi.AbstractTransactionImpl" has a
> doBegin method.
> Isn't it called when the transaction starts?
>
>
>
>
>
> On Tuesday, June 2, 2015 5:11 PM, Steve Ebersole <steve at hibernate.org>
> wrote:
>
>
> start() I assume is supposed to indicate Session start? That is a
> possibility.
>
> transactionStart() is not. We do not always know when a transaction
> starts.
>
> On Tue, Jun 2, 2015 at 1:23 AM Mihalcea Vlad <mih_vlad at yahoo.com> wrote:
>
> Thanks. The second one is on the master branch and the 5.0 code-base.
> Can the SessionEventListener have two more methods:
>
> public void start();
> public void transactionStart();
>
> So we can monitor how long the Session (start() and end() pair) and
> Transactions take (transactionStart() and transactionCompletion()).
>
> Vlad
>
>
>
>
> On Tuesday, June 2, 2015 4:39 AM, Steve Ebersole <steve at hibernate.org>
> wrote:
>
>
> Hibernate already has hooks to implement all of these
> between org.hibernate.SessionEventListener
> and org.hibernate.resource.jdbc.spi.StatementInspector
>
>
> On Mon, Jun 1, 2015 at 4:12 PM Mihalcea Vlad <mih_vlad at yahoo.com> wrote:
>
> Hi Steve,
>
> I was thinking of having a Metrics gathering API for all sorts of
> database-related operations:
>
> - connection acquiring/lease time
> - connection wait time
> - transaction durations
> - SQL query logger
> - slow queries threshold
> - number of queries per transaction threshold
>
> Something similar to https://github.com/vladmihalcea/flexy-pool
>
> This will ease profiling a Hibernate application and we could have the
> hibernate-core define the integration hooks and
> a hibernate-metrics module to inject the metrics gathering components.
> This module could use Dropwizard Metrics, since
> it supports various Reservoir types and many reporting flavors (log, JMX,
> Graphite).
>
> Hibernate users will get an insight of what's going on in their
> application, so they can better understand what Hibernate does
> on their behalf.
>
> What do you think of this?
>
> Vlad MIhalcea
>
>
>
>
>
>
>
More information about the hibernate-dev
mailing list