diff options
author | Ivan Topolnjak <ivantopo@gmail.com> | 2014-03-24 12:42:18 -0300 |
---|---|---|
committer | Ivan Topolnjak <ivantopo@gmail.com> | 2014-03-24 12:42:18 -0300 |
commit | 8ed58faae77db3773ded06ccb8e8529cfb9031d6 (patch) | |
tree | 80a511fc42d81e21c17bdd919e4700953c8a0714 /kamon-spray/src/main/resources | |
parent | 1b7442f20d65e4a4b43b995acf8a7af538714913 (diff) | |
download | Kamon-8ed58faae77db3773ded06ccb8e8529cfb9031d6.tar.gz Kamon-8ed58faae77db3773ded06ccb8e8529cfb9031d6.tar.bz2 Kamon-8ed58faae77db3773ded06ccb8e8529cfb9031d6.zip |
complete automatic trace token propagation for spray-client, closes #14
Diffstat (limited to 'kamon-spray/src/main/resources')
-rw-r--r-- | kamon-spray/src/main/resources/reference.conf | 27 |
1 files changed, 26 insertions, 1 deletions
diff --git a/kamon-spray/src/main/resources/reference.conf b/kamon-spray/src/main/resources/reference.conf index 88bd8fb8..67d191c7 100644 --- a/kamon-spray/src/main/resources/reference.conf +++ b/kamon-spray/src/main/resources/reference.conf @@ -1,6 +1,31 @@ kamon { spray { - include-trace-token-header = true + # Header name used when propagating the `TraceContext.token` value across applications. trace-token-header-name = "X-Trace-Token" + + # When set to true, Kamon will automatically set and propogate the `TraceContext.token` value under the following + # conditions: + # - When a server side request is received containing the trace token header, the new `TraceContext` will have that + # some token, and once the response to that request is ready, the trace token header is also included in the + # response. + # - When a spray-client request is issued and a `TraceContext` is available, the trace token header will be included + # in the `HttpRequest` headers. + automatic-trace-token-propagation = true + + + client { + # Strategy used for automatic trace segment generation when issue requests with spray-client. The possible values + # are: + # - pipelining: measures the time during which the user application code is waiting for a spray-client request to + # complete, by attaching a callback to the Future[HttpResponse] returned by `spray.client.pipelining.sendReceive`. + # If `spray.client.pipelining.sendReceive` is not used, the segment measurement wont be performed. + # - internal: measures the internal time taken by spray-client to finish a request. Sometimes the user application + # code has a finite future timeout (like when using `spray.client.pipelining.sendReceive`) that doesn't match + # the actual amount of time spray might take internally to resolve a request, counting retries, redirects, + # connection timeouts and so on. If using the internal strategy, the measured time will include the entire time + # since the request has been received by the corresponding `HttpHostConnector` until a response is sent back + # to the requester. + segment-collection-strategy = pipelining + } } }
\ No newline at end of file |