From ce1424715f91beda67fd5f4da705d9b096147ca0 Mon Sep 17 00:00:00 2001 From: Ivan Topolnjak Date: Fri, 28 Sep 2018 13:07:41 +0200 Subject: cleanup the context propagation section on the configuration file --- kamon-core/src/main/resources/reference.conf | 77 ++++++++-------------------- 1 file changed, 21 insertions(+), 56 deletions(-) (limited to 'kamon-core/src/main/resources/reference.conf') diff --git a/kamon-core/src/main/resources/reference.conf b/kamon-core/src/main/resources/reference.conf index a4a7871e..eb374455 100644 --- a/kamon-core/src/main/resources/reference.conf +++ b/kamon-core/src/main/resources/reference.conf @@ -150,57 +150,17 @@ kamon { } } - - context { - - # Codecs are used to encode/decode Context keys when a Context must be propagated either through HTTP headers or - # Binary transports. Only broadcast keys configured bellow will be processed by the context Codec. The FQCN of - # the appropriate Codecs for each key must be provided, otherwise keys will be ignored. - # - codecs { - - # Size of the encoding buffer for the Binary Codec. - binary-buffer-size = 256 - - # Declarative definition of broadcast context keys with type Option[String]. The setting key represents the actual - # key name and the value is the HTTP header name to be used to encode/decode the context key. The key name will - # be used when coding for binary transport. The most common use case for string keys is effortless propagation of - # correlation keys or request related data (locale, user ID, etc). E.g. if wanting to propagate a "X-Request-ID" - # header this config should suffice: - # - # kamon.context.codecs.string-keys { - # request-id = "X-Request-ID" - # } - # - # If the application must read this context key they can define key with a matching name and read the value from - # the context: - # val requestIDKey = Key.broadcastString("request-id") // Do this only once, keep a reference. - # val requestID = Kamon.currentContext().get(requestIDKey) - # - string-keys { - - } - - # Codecs to be used when propagating a Context through a HTTP Headers transport. - http-headers-keys { - //span = "kamon.trace.SpanCodec$B3" - } - - # Codecs to be used when propagating a Context through a Binary transport. - binary-keys { - //span = "kamon.trace.SpanCodec$Colfer" - } - } - } - - propagation { + http { # Default HTTP propagation. Unless specified otherwise, all instrumentation will use the configuration on # this section for HTTP context propagation. # default { + + # Configures how context tags will be propagated over HTTP headers. + # tags { # Header name used to encode context tags. @@ -225,18 +185,20 @@ kamon { } } + # Configure which entries should be read from incoming HTTP requests and writen to outgoing HTTP requests. + # entries { - # Specify mappings between Context keys and the Http.EntryReader implementation in charge of reading them - # from the incoming HTTP request into the Context. + # Specify mappings between Context keys and the Propagation.EntryReader[HeaderReader] implementation in charge + # of reading them from the incoming HTTP request into the Context. incoming { - #span = "something" + span = "kamon.trace.SpanPropagation$B3" } - # Specify mappings betwen Context keys and the Http.EntryWriter implementation in charge of writing them - # on the outgoing HTTP requests. + # Specify mappings betwen Context keys and the Propagation.EntryWriter[HeaderWriter] implementation in charge + # of writing them to outgoing HTTP requests. outgoing { - + span = "kamon.trace.SpanPropagation$B3" } } } @@ -248,18 +210,21 @@ kamon { # this section for HTTP context propagation. # default { + + # Configure which entries should be read from incoming messages and writen to outgoing messages. + # entries { - # Specify mappings between Context keys and the Http.EntryReader implementation in charge of reading them - # from the incoming HTTP request into the Context. + # Specify mappings between Context keys and the Propagation.EntryReader[ByteStreamReader] implementation in + # charge of reading them from the incoming messages into the Context. incoming { - #span = "something" + span = "kamon.trace.SpanPropagation$Colfer" } - # Specify mappings betwen Context keys and the Http.EntryWriter implementation in charge of writing them - # on the outgoing HTTP requests. + # Specify mappings betwen Context keys and the Propagation.EntryWriter[ByteStreamWriter] implementation in + # charge of writing them on the outgoing messages. outgoing { - + span = "kamon.trace.SpanPropagation$Colfer" } } } -- cgit v1.2.3