trait HttpServerInstrumentation extends AnyRef
HTTP Server instrumentation handler that takes care of context propagation, distributed tracing and HTTP server
metrics. Instances can be created by using the HttpServerInstrumentation.from method with the desired
configuration. When any setting is missing on the provided configuration, it will be read from the default settings
found at "kamon.instrumentation.http-server.default".
The default implementation shipping with Kamon provides:
* Context Propagation: Automatically transfers Context entries and tags using HTTP headers. Context propagation is further used to enable distributed tracing on top of any instrumented HTTP Server.
* Distributed Tracing: Automatically join traces initiated by the callers of this service and apply span and metric tags from the incoming requests as well as from the incoming context tags.
* Server Metrics: Basic request processing metrics to understand connection usage, throughput and response code counts in the HTTP server.
- Alphabetic
- By Inheritance
- HttpServerInstrumentation
- AnyRef
- Any
- Hide All
- Show All
- Public
- Protected
Abstract Value Members
- abstract def connectionClosed(lifetime: Duration, handledRequests: Long): Unit
Signals that a HTTP connection has been closed and reports for how long was that connection open and how many requests were handled through it.
- abstract def connectionOpened(): Unit
Signals that a new HTTP connection has been opened.
- abstract def createHandler(request: Request, deferSamplingDecision: Boolean): RequestHandler
Initiates handling of a HTTP request received by the server.
Initiates handling of a HTTP request received by the server. The returned RequestHandler contains the Span that represents the processing of the incoming HTTP request (if tracing is enabled) and the Context extracted from HTTP headers (if context propagation is enabled). It is possible to defer the sampling decision to a later processing stage in case it was necessary, since in many HTTP servers the automatic instrumentation will try to start Spans as early as possible to express times closer to what users will experience, but information like the operation name that might be useful for taking a sampling decision is not available until reaching user code. When the sampling decision is deferred, the returned Span will have an Unknown sampling decision and the instrumentation or user code must call Span.takeSamplingDecision() on the Span.
- abstract def interface(): String
Returns the interface on which the HTTP Server is listening.
- abstract def port(): Int
Returns the port on which the HTTP server is listening.
- abstract def settings: Settings
Returns the Settings used to determine the behavior of the HTTP Server Instrumentation.
- abstract def shutdown(): Unit
Frees resources that might have been acquired to provide the instrumentation.
Frees resources that might have been acquired to provide the instrumentation. Behavior on HttpServer instances after calling this function is undefined.
Concrete Value Members
- final def !=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- final def ##: Int
- Definition Classes
- AnyRef → Any
- final def ==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- final def asInstanceOf[T0]: T0
- Definition Classes
- Any
- def clone(): AnyRef
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.CloneNotSupportedException]) @native()
- def connectionClosed(handledRequests: Long): Unit
Signals that a HTTP connection has been closed and reports how many requests were handled by that connection.
- def connectionClosed(lifetime: Duration): Unit
Signals that a HTTP connection has been closed and reports for how long was that connection open.
- def connectionClosed(): Unit
Signals that a HTTP connection has been closed.
- def createHandler(request: Request): RequestHandler
Initiates handling of a HTTP request received by the server.
Initiates handling of a HTTP request received by the server. The returned RequestHandler contains the Span that represents the processing of the incoming HTTP request (if tracing is enabled) and the Context extracted from HTTP headers (if context propagation is enabled).
- final def eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- def equals(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef → Any
- def finalize(): Unit
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.Throwable])
- final def getClass(): Class[_ <: AnyRef]
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
- def hashCode(): Int
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
- final def isInstanceOf[T0]: Boolean
- Definition Classes
- Any
- final def ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- final def notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
- final def notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
- final def synchronized[T0](arg0: => T0): T0
- Definition Classes
- AnyRef
- def toString(): String
- Definition Classes
- AnyRef → Any
- final def wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
- final def wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
- final def wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException]) @native()