From 99ff807755a07e0ccfadadee8b414132edc6ad6c Mon Sep 17 00:00:00 2001 From: Ivan Topolnjak Date: Fri, 12 Oct 2018 13:11:44 +0200 Subject: rename the preferred trace id configuration --- kamon-core-tests/src/test/resources/reference.conf | 2 +- kamon-core/src/main/resources/reference.conf | 34 ++++++++++++---------- .../scala/kamon/instrumentation/HttpServer.scala | 5 +--- 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, -- cgit v1.2.3