Dropwizard Metrics for JDBI3

Support for instrumentation of JDBI3 code with Dropwizard Metrics

Лицензия

Лицензия

Категории

Категории

JDBI Данные Базы данных Metrics Тестирование приложения и мониторинг Monitoring
Группа

Группа

com.github.arteam
Идентификатор

Идентификатор

metrics-jdbi3
Последняя версия

Последняя версия

1.0-rc3
Дата

Дата

Тип

Тип

jar
Описание

Описание

Dropwizard Metrics for JDBI3
Support for instrumentation of JDBI3 code with Dropwizard Metrics
Ссылка на сайт

Ссылка на сайт

https://github.com/arteam/metrics-jdbi3
Система контроля версий

Система контроля версий

https://github.com/arteam/metrics-jdbi3

Скачать metrics-jdbi3

Как подключить последнюю версию

<!-- https://jarcasting.com/artifacts/com.github.arteam/metrics-jdbi3/ -->
<dependency>
    <groupId>com.github.arteam</groupId>
    <artifactId>metrics-jdbi3</artifactId>
    <version>1.0-rc3</version>
</dependency>
// https://jarcasting.com/artifacts/com.github.arteam/metrics-jdbi3/
implementation 'com.github.arteam:metrics-jdbi3:1.0-rc3'
// https://jarcasting.com/artifacts/com.github.arteam/metrics-jdbi3/
implementation ("com.github.arteam:metrics-jdbi3:1.0-rc3")
'com.github.arteam:metrics-jdbi3:jar:1.0-rc3'
<dependency org="com.github.arteam" name="metrics-jdbi3" rev="1.0-rc3">
  <artifact name="metrics-jdbi3" type="jar" />
</dependency>
@Grapes(
@Grab(group='com.github.arteam', module='metrics-jdbi3', version='1.0-rc3')
)
libraryDependencies += "com.github.arteam" % "metrics-jdbi3" % "1.0-rc3"
[com.github.arteam/metrics-jdbi3 "1.0-rc3"]

Зависимости

compile (4)

Идентификатор библиотеки Тип Версия
io.dropwizard.metrics : metrics-core jar 3.2.5
io.dropwizard.metrics : metrics-annotation jar 3.2.5
org.jdbi : jdbi3-core jar 3.0.0-rc1
org.slf4j : slf4j-api jar 1.7.21

test (4)

Идентификатор библиотеки Тип Версия
junit : junit jar 4.12
org.assertj : assertj-core jar 3.5.2
org.mockito : mockito-core jar 2.2.3
org.slf4j : slf4j-simple jar 1.7.21

Модули Проекта

Данный проект не имеет модулей.

metrics-jdbi3

A Dropwizard module for instrumenting JDBI3

Description

This module provides a way to instrument JDBI3 applications and report metrics to a MetricRegistry from dropwizard-metrics.

The main abstraction is the InstrumentedTimingCollector class that extends JDBI's TimingCollector and accepts MetricRegistry. It registers a Timer with a name provided by the user specified StatementNameStrategy. The user can choose several strategies:

  • NaiveNameStrategy uses the name of the SQL query (select name from users).
  • BasicSqlNameStrategy uses the name of the SQL object under which it was executed (com.acme.UserDao.getUsers)
  • ContextNameStrategy uses the name name of the context group and statement name.
  • SmartNameStrategy uses the ContextNameStrategy strategy, if not applicable then BasicSqlNameStrategy, if it's not, then uses the constant sql.raw.

Use

Jdbi jdbi = Jdbi.create(dataSource);
jdbi.setTimingCollector(new InstrumentedTimingCollector(new MetricRegistry(), new SmartNameStrategy()));

Maven

<dependency>
     <groupId>com.github.arteam</groupId>
     <artifactId>metrics-jdbi3</artifactId>
     <version>1.0-rc2</version>
</dependency>

Версии библиотеки

Версия
1.0-rc3
1.0-rc2
1.0-rc1