From a2d54a72b806ebd60f19011559a6c186d2d9640b Mon Sep 17 00:00:00 2001 From: Ivan Topolnjak Date: Tue, 18 Jul 2017 11:26:54 +0200 Subject: make the SpanContextCodecs configurable --- kamon-core/src/main/resources/reference.conf | 31 ++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) (limited to 'kamon-core/src/main/resources') diff --git a/kamon-core/src/main/resources/reference.conf b/kamon-core/src/main/resources/reference.conf index cd8fa379..cc4da03e 100644 --- a/kamon-core/src/main/resources/reference.conf +++ b/kamon-core/src/main/resources/reference.conf @@ -107,6 +107,37 @@ kamon { # Probability of a span being sampled. Must be a value between 0 and 1. probability = 0.01 } + + # The IdentityProvider used to generate Trace and Span Identifiers in Kamon. There are two default implementations + # that ship with Kamon: + # - kamon.trace.IdentityProvider.Default: Creates 8-byte identifiers for both Traces and Spans. + # - kamon.trace.IdentityProvider.DoubleSizeTraceID: Creates 16-byte identifiers for Traces and 8-byte identifiers + # for Spans. + # + # Any external implementation can be configured here, as long as it can be instantiated with a parameterless constructor. + identity-provider = "kamon.trace.IdentityProvider.Default" + + # The SpanContextCodecs are used to encode/decode the SpanContext data into simple TextMaps, HTTP Headers or Binary + # carriers. The decision about which one to use is based on the kamon.trace.SpanContextCodec.Format instance passed + # to inject/extract calls. + # + # Any external implementation can be configured here, as long as it can be instantiated with a single parameter + # constructor that accepts a IdentityProvider. + span-context-codec { + + # Encodes/Decodes the SpanContext data using a simple key/value pair. Since this is very rarely going to be used + # we default to using the same codec for HTTP Headers, as it is built on top of a TextMap. + text-map = "kamon.trace.SpanContextCodec.ExtendedB3" + + # Encodes/Decodes the SpanContext into a TextMap with HTTP Header friendly, URLEncoded values. The default + # implementation follows the guidelines of B3 propagation. See more at https://github.com/openzipkin/b3-propagation. + http-headers = "kamon.trace.SpanContextCodec.ExtendedB3" + + # Encodes/Decodes the SpanContext using a binary representation. + binary = "TODO" + } + + } util { -- cgit v1.2.3