aboutsummaryrefslogtreecommitdiff
path: root/kamon-core/src/main/scala/kamon
diff options
context:
space:
mode:
authorIvan Topolnjak <ivantopo@gmail.com>2018-09-28 13:07:41 +0200
committerIvan Topolnjak <ivantopo@gmail.com>2018-09-28 13:07:41 +0200
commitce1424715f91beda67fd5f4da705d9b096147ca0 (patch)
tree6901219c5ec9002a9a0ca3e96b9e3d091404724e /kamon-core/src/main/scala/kamon
parentef13e73e9284ebb92286e5947805fa619862e26f (diff)
downloadKamon-ce1424715f91beda67fd5f4da705d9b096147ca0.tar.gz
Kamon-ce1424715f91beda67fd5f4da705d9b096147ca0.tar.bz2
Kamon-ce1424715f91beda67fd5f4da705d9b096147ca0.zip
cleanup the context propagation section on the configuration file
Diffstat (limited to 'kamon-core/src/main/scala/kamon')
-rw-r--r--kamon-core/src/main/scala/kamon/trace/SpanPropagation.scala (renamed from kamon-core/src/main/scala/kamon/trace/SpanCodec.scala)23
1 files changed, 21 insertions, 2 deletions
diff --git a/kamon-core/src/main/scala/kamon/trace/SpanCodec.scala b/kamon-core/src/main/scala/kamon/trace/SpanPropagation.scala
index 63f8e1b0..b83a5ade 100644
--- a/kamon-core/src/main/scala/kamon/trace/SpanCodec.scala
+++ b/kamon-core/src/main/scala/kamon/trace/SpanPropagation.scala
@@ -26,8 +26,15 @@ import kamon.context.HttpPropagation.{HeaderReader, HeaderWriter}
import kamon.trace.SpanContext.SamplingDecision
-object SpanCodec {
-
+/**
+ * Propagation mechanisms for Kamon's Span data to and from HTTP and Binary mediums.
+ */
+object SpanPropagation {
+
+ /**
+ * Reads and Writes a Span instance using the B3 propagation format. The specification and semantics of the B3
+ * Propagation protocol can be found here: https://github.com/openzipkin/b3-propagation
+ */
class B3 extends Propagation.EntryReader[HeaderReader] with Propagation.EntryWriter[HeaderWriter] {
import B3.Headers
@@ -102,6 +109,18 @@ object SpanCodec {
}
+ /**
+ * Defines a bare bones binary context propagation that uses Colfer [1] as the serialization library. The Schema
+ * for the Span data is simply defined as:
+ *
+ * type Span struct {
+ * traceID binary
+ * spanID binary
+ * parentID binary
+ * samplingDecision uint8
+ * }
+ *
+ */
class Colfer extends Propagation.EntryReader[ByteStreamReader] with Propagation.EntryWriter[ByteStreamWriter] {
val emptyBuffer = ByteBuffer.allocate(0)