opentelemetry-java-instrume.../instrumentation/ktor/ktor-2.0/library
Mateusz Rzeszutek 5a152cd289
Deprecate uncompressed content length HTTP attributes (#6383)
2022-07-29 06:17:38 +02:00
..
src Deprecate uncompressed content length HTTP attributes (#6383) 2022-07-29 06:17:38 +02:00
README.md Add library instrumentation for ktor 2 (#5797) 2022-04-11 13:05:00 +03:00
build.gradle.kts Add library instrumentation for ktor 2 (#5797) 2022-04-11 13:05:00 +03:00

README.md

Ktor Instrumentation

This package contains libraries to help instrument Ktor. Currently, only server instrumentation is supported.

Initializing server instrumentation

Initialize instrumentation by installing the KtorServerTracing feature. You must set the OpenTelemetry to use with the feature.

OpenTelemetry openTelemetry = initializeOpenTelemetryForMe()

embeddedServer(Netty, 8080) {
  install(KtorServerTracing) {
    setOpenTelemetry(openTelemetry)
  }
}