aboutsummaryrefslogtreecommitdiff
path: root/kamon-core-tests/src/test/resources/reference.conf
blob: d165249e8970beace14fb76c9b15f46e33e846f2 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
kamon {
  context.codecs.string-keys {
    request-id = "X-Request-ID"
  }
}



kamon {
  instrumentation {
    http-server {
      noop {

        #
        # 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 = no

          # 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"
        }


        #
        # Configuration for HTTP server metrics collection
        #
        metrics {

          # Enables collection of HTTP server metrics
          enabled = no

          # 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.
          #
          tags = [
            "method",
            "status-code"
          ]
        }


        #
        # Configuration for HTTP request tracing
        #
        tracing {

          # Enables HTTP request tracing. When enabled the instrumentation will create Spans for incoming requests
          # and finish them when the response is sent back to the clients.
          enabled = no

          # Select a context tag that provides a custom trace identifier. The custom 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 valued in accordance to the identity provider.
          trace-id-tag = "none"

          # 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.
            from-context {

              # The peer tag identifiest the service that is calling the current service. It is added by default with
              # the HttpClient instrumentation.
              peer = metric
            }
          }

          # Custom mappings between routes and operation names.
          operations {

            # Operation name for Spans created on requests that could not be handled by any route in the current
            # application.
            unhandled = "unhandled"

            # Provides custom mappings from HTTP paths into operation names. Meant to be used in cases where the bytecode
            # instrumentation is not able to provide a sensible operation name that is free of high cardinality values.
            # For example, with the following configuration:
            #   mappings {
            #     "/organization/*/user/*/profile" = "/organization/:orgID/user/:userID/profile"
            #     "/events/*/rsvps" = "EventRSVPs"
            #   }
            #
            # Requests to "/organization/3651/user/39652/profile" and "/organization/22234/user/54543/profile" will have
            # the same operation name "/organization/:orgID/user/:userID/profile".
            #
            # Similarly, requests to "/events/aaa-bb-ccc/rsvps" and "/events/1234/rsvps" will have the same operation
            # name "EventRSVPs".
            #
            # The patterns are expressed as globs and the operation names are free form.
            #
            mappings {

            }
          }
        }
      }
    }
  }
}