Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add automatic promethues metrics for roundtrip db query times #13

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Commits on Dec 10, 2019

  1. add automatic promethues metrics for roundtrip db query times

    This change adds a prometheus Histogram to each database connection. The
    promauto.Histogram will automatically register with the default
    prometheus client, if one exists. This change also adds a set of methods
    to the the coresql.DB that override the Exec/Query methods of the
    underlying sql.DB. These methods record, to the prometheus histogram, the
    duration of the Exec/Query call to the underlying sql.DB.
    
    If the application uses the core metrics server from
    LUSHDigital/core/workers/metricsrv, the database histogram will be available
    via that metrics server's endpoint without any further changes to your
    code.
    zdjones committed Dec 10, 2019
    Configuration menu
    Copy the full SHA
    b27ef54 View commit details
    Browse the repository at this point in the history