aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIvan Topolnjak <ivantopo@gmail.com>2018-10-12 13:11:44 +0200
committerIvan Topolnjak <ivantopo@gmail.com>2018-10-12 13:11:44 +0200
commit99ff807755a07e0ccfadadee8b414132edc6ad6c (patch)
tree479b8331e84be7ab355f84060c93a1a47d4d491e
parent87cf9bd2b33f153e3ba070c75f7f496005cac295 (diff)
downloadKamon-99ff807755a07e0ccfadadee8b414132edc6ad6c.tar.gz
Kamon-99ff807755a07e0ccfadadee8b414132edc6ad6c.tar.bz2
Kamon-99ff807755a07e0ccfadadee8b414132edc6ad6c.zip
rename the preferred trace id configuration
-rw-r--r--kamon-core-tests/src/test/resources/reference.conf2
-rw-r--r--kamon-core/src/main/resources/reference.conf34
-rw-r--r--kamon-core/src/main/scala/kamon/instrumentation/HttpServer.scala5
3 files changed, 21 insertions, 20 deletions
diff --git a/kamon-core-tests/src/test/resources/reference.conf b/kamon-core-tests/src/test/resources/reference.conf
index 6615bb7b..9d99ba96 100644
--- a/kamon-core-tests/src/test/resources/reference.conf
+++ b/kamon-core-tests/src/test/resources/reference.conf
@@ -21,7 +21,7 @@ kamon {
instrumentation {
http-server {
default {
- tracing.trace-id-tag = "correlation-id"
+ tracing.preferred-trace-id-tag = "correlation-id"
}
no-span-metrics {
diff --git a/kamon-core/src/main/resources/reference.conf b/kamon-core/src/main/resources/reference.conf
index 2108e302..cb658d23 100644
--- a/kamon-core/src/main/resources/reference.conf
+++ b/kamon-core/src/main/resources/reference.conf
@@ -240,7 +240,7 @@ kamon {
default {
#
- # Configuration for HTTP context propagation
+ # Configuration for HTTP context propagation.
#
propagation {
@@ -256,26 +256,30 @@ kamon {
#
- # Configuration for HTTP server metrics collection
+ # Configuration for HTTP server metrics collection.
#
metrics {
- # Enables collection of HTTP server metrics
- enabled = yes
-
- # Tags to include on the HTTP server metrics. The available options are:
- # - method: HTTP method from the request.
- # - status-code: HTTP status code from the responses.
+ # Enables collection of HTTP server metrics. When enabled the following metrics will be collected, assuming
+ # that the instrumentation is fully compliant:
+ #
+ # - http.server.requets
+ # - http.server.request.active
+ # - http.server.request.size
+ # - http.server.response.size
+ # - http.server.connection.lifetime
+ # - http.server.connection.usage
+ # - http.server.connection.open
#
- tags = [
- "method",
- "status-code"
- ]
+ # All metrics have at least three tags: component, interface and port. Additionally, the http.server.requests
+ # metric will also have a status_code tag with the status code group (1xx, 2xx and so on).
+ #
+ enabled = yes
}
#
- # Configuration for HTTP request tracing
+ # Configuration for HTTP request tracing.
#
tracing {
@@ -283,12 +287,12 @@ kamon {
# and finish them when the response is sent back to the clients.
enabled = yes
- # Select a context tag that provides a custom trace identifier. The custom trace identifier will be used
+ # Select a context tag that provides a preferred trace identifier. The preferred trace identifier will be used
# only if all these conditions are met:
# - the context tag is present.
# - there is no parent Span on the incoming context (i.e. this is the first service on the trace).
# - the identifier is valid in accordance to the identity provider.
- trace-id-tag = "none"
+ preferred-trace-id-tag = "none"
# Enables collection of span metrics using the `span.processing-time` metric.
span-metrics = on
diff --git a/kamon-core/src/main/scala/kamon/instrumentation/HttpServer.scala b/kamon-core/src/main/scala/kamon/instrumentation/HttpServer.scala
index 02e92f25..99b330f7 100644
--- a/kamon-core/src/main/scala/kamon/instrumentation/HttpServer.scala
+++ b/kamon-core/src/main/scala/kamon/instrumentation/HttpServer.scala
@@ -383,7 +383,6 @@ object HttpServer {
enableContextPropagation: Boolean,
propagationChannel: String,
enableServerMetrics: Boolean,
- serverMetricsTags: Seq[String],
enableTracing: Boolean,
traceIDTag: Option[String],
enableSpanMetrics: Boolean,
@@ -418,11 +417,10 @@ object HttpServer {
// HTTP Server metrics settings
val enableServerMetrics = config.getBoolean("metrics.enabled")
- val serverMetricsTags = config.getStringList("metrics.tags").asScala
// Tracing settings
val enableTracing = config.getBoolean("tracing.enabled")
- val traceIdTag = Option(config.getString("tracing.trace-id-tag")).filterNot(_ == "none")
+ val traceIdTag = Option(config.getString("tracing.preferred-trace-id-tag")).filterNot(_ == "none")
val enableSpanMetrics = config.getBoolean("tracing.span-metrics")
val urlTagMode = TagMode.from(config.getString("tracing.tags.url"))
val methodTagMode = TagMode.from(config.getString("tracing.tags.method"))
@@ -440,7 +438,6 @@ object HttpServer {
enablePropagation,
propagationChannel,
enableServerMetrics,
- serverMetricsTags,
enableTracing,
traceIdTag,
enableSpanMetrics,