kamon-jdbc

Kamon JDBC Integration

Github星跟踪图

JDBC Integration Build Status

Gitter
Maven Central

The kamon-jdbc module brings bytecode instrumentation to trace jdbc-compatible database requests

The kamon-jdbc module requires you to start your application using the Kamon Agent. Kamon will warn you
at startup if you failed to do so.

The bytecode instrumentation provided by the kamon-jdbc module hooks into the JDBC API to automatically
start and finish segments for requests that are issued within a trace. This translates into you having metrics about how
the requests you are doing are behaving.

Getting Started

Kamon scala module is currently available for Scala 2.10, 2.11 and 2.12.

Supported releases and dependencies are shown below., kamon-jdbc, status, jdk, scala, :------:, :------:, :----:, ------------------, 1.0.0-RC1, experimental, 1.8+, 2.10, 2.11, 2.12

To get started with SBT, simply add the following to your build.sbt
file:

libraryDependencies += "io.kamon" %% "kamon-jdbc" % "experimental-1.0.0-RC1"

Metrics

The following metrics will be recorded:

  • reads: a histogram that tracks the reads requests latency (SELECT statement).
  • writes: a histogram that tracks the writes requests latency (INSERT, UPDATE, and DELETE statements).
  • slows: a simple counter with the number of measured slow requests.
  • errors: a simple counter with the number of failures.

Naming Segments

By default, the name generator bundled with the kamon-jdbc module will use the statement name as tge name to the automatically generated segment (i.e SELECT, INSERT, etc). Currently, the only way to override that name would be to provide your own implementation of kamon.jdbc.JdbcNameGenerator which is used to assign the segment name

Slow Requests

Requests that take longer to execute than the configured kamon.jdbc.slow-query-threshold can be processed by user-defined
kamon.jdbc.DefaultSlowQueryProcessor. The default processor logs a warning message

Error Processor

Requests that error can be processed by user-defined kamon.jdbc.SqlErrorProcessor. The default processor logs an error message

Configuration

kamon {
  jdbc {
    slow-query-threshold = 2 seconds

    # Fully qualified name of the implementation of kamon.jdbc.SlowQueryProcessor.
    slow-query-processor = kamon.jdbc.DefaultSlowQueryProcessor

    # Fully qualified name of the implementation of kamon.jdbc.SqlErrorProcessor.
    sql-error-processor = kamon.jdbc.DefaultSqlErrorProcessor

    # Fully qualified name of the implementation of kamon.jdbc.JdbcNameGenerator that will be used for assigning names to segments.
    name-generator = kamon.jdbc.DefaultJdbcNameGenerator
  }
}

主要指标

概览
名称与所有者kamon-io/kamon-jdbc
主编程语言Scala
编程语言Scala (语言数: 1)
平台
许可证Other
所有者活动
创建于2016-11-30 22:09:03
推送于2020-03-18 16:06:22
最后一次提交2020-03-18 17:06:15
发布数16
最新版本名称v2.0.2 (发布于 2020-01-07 12:32:23)
第一版名称v0.6.5 (发布于 2016-12-31 15:14:56)
用户参与
星数8
关注者数3
派生数11
提交数142
已启用问题?
问题数10
打开的问题数0
拉请求数9
打开的拉请求数0
关闭的拉请求数2
项目设置
已启用Wiki?
已存档?
是复刻?
已锁定?
是镜像?
是私有?