n-okhttp_3.2.7.4.source-code.reference.conf Maven / Gradle / Ivy
The newest version!
# ============================================ #
# kamon okhttp3 client reference configuration #
# ============================================ #
kamon.instrumentation.okhttp {
http-client {
#
# Configuration for HTTP context propagation.
#
propagation {
# Enables or disables HTTP context propagation on this HTTP server instrumentation. Please note that if
# propagation is disabled then some distributed tracing features will not be work as expected (e.g. Spans can
# be created and reported but will not be linked across boundaries nor take trace identifiers from tags).
enabled = yes
# HTTP propagation channel to b used by this instrumentation. Take a look at the kamon.propagation.http.default
# configuration for more details on how to configure the detault HTTP context propagation.
channel = "default"
}
tracing {
# Enables HTTP request tracing. When enabled the instrumentation will create Spans for outgoing requests
# and finish them when the response is received from the server.
enabled = yes
# Enables collection of span metrics using the `span.processing-time` metric.
span-metrics = on
# Select which tags should be included as span and span metric tags. The possible options are:
# - span: the tag is added as a Span tag (i.e. using span.tag(...))
# - metric: the tag is added a a Span metric tag (i.e. using span.tagMetric(...))
# - off: the tag is not used.
#
tags {
# Use the http.url tag.
url = span
# Use the http.method tag.
method = metric
# Use the http.status_code tag.
status-code = metric
# Copy tags from the context into the Spans with the specified purpouse. For example, to copy a customer_type
# tag from the context into the HTTP Server Span created by the instrumentation, the following configuration
# should be added:
#
# from-context {
# customer_type = span
# }
#
from-context {
}
}
operations {
# The default operation name to be used when creating Spans to handle the HTTP client requests. The HTTP
# Client instrumentation will always try to use the HTTP Operation Name Generator configured below to get
# a name, but if it fails to generate it then this name will be used.
default = "http.client.request"
# FQCN for a HttpOperationNameGenerator implementation, or ony of the following shorthand forms:
# - hostname: Uses the request Host as the operation name.
# - method: Uses the request HTTP method as the operation name.
#
name-generator = "kamon.okhttp3.instrumentation.OkHttpOperationNameGenerator"
}
}
}
}
kamon {
okhttp {
# Fully qualified name of the implementation of kamon.okhttp3.NameGenerator that will be used for assigning names
# names to Spans.
name-generator = kamon.okhttp3.DefaultNameGenerator
# Metrics for okhttp
metrics {
enabled = true
}
}
}
kanela {
modules {
okhttp-module {
name = "OkHttp Instrumentation Module"
description = "Provides context propagation, distributed tracing and HTTP client and server metrics for OkHttp"
stoppable = true
instrumentations = [
"kamon.okhttp3.instrumentation.OkHttpInstrumentation"
]
within = [
"okhttp3..*"
]
}
}
}