opentelemetry-java-instrume.../instrumentation/ktor/ktor-1.0/library
Mateusz Rzeszutek cfdbe758f2
Net attributes getters changes (in preparation for HTTP spec impl) (#6503)
* Net attributes getters changes: instrumentation-api-semconv changes

* Net attributes getters changes: getter implementations

* Net attributes getters changes: test fixes

* Remove net.sock.host.name

* code review comments

* default getter methods & getPeerSocketAddress() method name

* set authority in grpc earlier
2022-09-12 09:20:27 -07:00
..
src Net attributes getters changes (in preparation for HTTP spec impl) (#6503) 2022-09-12 09:20:27 -07:00
README.md Add library instrumentation for ktor 2 (#5797) 2022-04-11 13:05:00 +03:00
build.gradle.kts Document upper version limits (#6436) 2022-08-08 10:08:40 -07: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)
  }
}