trait ContextStorage extends AnyRef
Exposes in-process Context storage APIs. See the ContextStorage companion object for more info on the default storage implementation.
- Alphabetic
- By Inheritance
- ContextStorage
- AnyRef
- Any
- Hide All
- Show All
- Public
- Protected
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 currentContext(): Context
Returns the current Context on Kamon's Context Storage.
Returns the current Context on Kamon's Context Storage. As the default behavior, this will return Context.Empty if no other Context has been stored on the calling thread.
- def currentSpan(): Span
Returns the Span held by the current Context, if any.
Returns the Span held by the current Context, if any. As the default behavior, this will return Span.Empty if the current Context does not contain a Span.
- 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()
- def runWithContext[T](context: Context)(f: => T): T
Temporarily stores the provided Context on Kamon's Context Storage.
Temporarily stores the provided Context on Kamon's Context Storage. The provided Context will be stored before executing the provided function and removed right after it finishes executing.
- Annotations
- @inline()
- def runWithContextEntry[T, K](key: Key[K], value: K)(f: => T): T
Temporarily stores the provided Context Key on Kamon's Context Storage.
Temporarily stores the provided Context Key on Kamon's Context Storage. The provided Context key will be added to the current Context and stored before executing the provided function, then removed right after execution finishes.
- def runWithContextTag[T](key: String, value: Long)(f: => T): T
Temporarily stores the provided Context tag on Kamon's Context Storage.
Temporarily stores the provided Context tag on Kamon's Context Storage. The provided Context tag will be added to the current Context and stored before executing the provided function, then removed right after execution finishes.
- def runWithContextTag[T](key: String, value: Boolean)(f: => T): T
Temporarily stores the provided Context tag on Kamon's Context Storage.
Temporarily stores the provided Context tag on Kamon's Context Storage. The provided Context tag will be added to the current Context and stored before executing the provided function, then removed right after execution finishes.
- def runWithContextTag[T](key: String, value: String)(f: => T): T
Temporarily stores the provided Context tag on Kamon's Context Storage.
Temporarily stores the provided Context tag on Kamon's Context Storage. The provided Context tag will be added to the current Context and stored before executing the provided function, then removed right after execution finishes.
- def runWithSpan[T](span: Span, finishSpan: Boolean)(f: => T): T
Temporarily stores the provided Span on Kamon's Context Storage.
Temporarily stores the provided Span on Kamon's Context Storage. The provided Span will be added to the current Context and stored before executing the provided function, then removed right after execution finishes. Optionally, this function can finish the provided Span once the function execution finishes.
- Annotations
- @inline()
- def runWithSpan[T](span: Span)(f: => T): T
Temporarily stores the provided Span on Kamon's Context Storage.
Temporarily stores the provided Span on Kamon's Context Storage. The provided Span will be added to the current Context and stored before executing the provided function, then removed right after execution finishes.
- def storeContext(context: Context): Scope
Stores the provided Context on Kamon's Context Storage and returns a Scope that removes that Context from the it upon closing.
Stores the provided Context on Kamon's Context Storage and returns a Scope that removes that Context from the it upon closing. When a Scope is closed, it will always set the current Context to the Context that was available right before it was created.
NOTE: The default implementation of Scope is not thread safe and, unless there is a good reason not to, users should always close scopes before leaving a thread, otherwise there is a risk of leaving "dirty" threads that could cause unexpected correlation between Contexts from different operations. It is strongly recommended to use any of the .storeContext(...) variants which ensure closing Scopes after finishing execution.
- 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()