diff options
author | Ivan Topolnjak <ivantopo@gmail.com> | 2018-02-09 00:03:24 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-02-09 00:03:24 +0100 |
commit | fa342db5ec6e80227d559ee5ac9d0b11b9f0b453 (patch) | |
tree | fc6293dd443c44ccf1aeb153e86aa8af6e50707c /kamon-core/src/main/resources | |
parent | 16a23e2346ccaca9f0f766faa17c15148eb6521c (diff) | |
parent | 91b01c6bdc905db9db7874fb0a66574463a0d484 (diff) | |
download | Kamon-fa342db5ec6e80227d559ee5ac9d0b11b9f0b453.tar.gz Kamon-fa342db5ec6e80227d559ee5ac9d0b11b9f0b453.tar.bz2 Kamon-fa342db5ec6e80227d559ee5ac9d0b11b9f0b453.zip |
Merge pull request #509 from ivantopo/issue#505/arbitrary-header-names-for-string-keys
allow arbitrary header names for automatic broadcast string keys, fixes #505
Diffstat (limited to 'kamon-core/src/main/resources')
-rw-r--r-- | kamon-core/src/main/resources/reference.conf | 19 |
1 files changed, 18 insertions, 1 deletions
diff --git a/kamon-core/src/main/resources/reference.conf b/kamon-core/src/main/resources/reference.conf index 2d37780d..659114ca 100644 --- a/kamon-core/src/main/resources/reference.conf +++ b/kamon-core/src/main/resources/reference.conf @@ -150,7 +150,24 @@ kamon { # Size of the encoding buffer for the Binary Codec. binary-buffer-size = 256 - string-keys = [ ] + # 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 { |