-
Notifications
You must be signed in to change notification settings - Fork 245
/
telemetry.router.yaml
101 lines (100 loc) 路 2.78 KB
/
telemetry.router.yaml
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
telemetry:
exporters:
metrics:
prometheus:
enabled: true
otlp:
enabled: true
endpoint: default
tracing:
otlp:
enabled: true
endpoint: default
zipkin:
enabled: true
endpoint: default
datadog:
enabled: true
endpoint: default
jaeger:
enabled: true
agent:
endpoint: default
logging:
experimental_when_header:
- name: apollo-router-log-request
value: test
headers: true # default: false
body: true # default: false
# log request for all requests coming from Iphones
- name: custom-header
match: ^foo.*
headers: true
instrumentation:
spans:
mode: spec_compliant
default_attribute_requirement_level: recommended
router:
attributes:
"custom_one":
request_header: host
supergraph:
attributes:
graphql.document: true
subgraph:
attributes:
subgraph.graphql.document: true
instruments:
router:
http.server.request.body.size:
attributes:
# Standard attributes
http.response.status_code: true
"my_attribute":
response_header: "content-type"
http.server.request.duration:
attributes:
# Standard attributes
http.response.status_code: true
http.request.method: true
# Custom attribute
"my_attribute":
response_header: "content-type"
my.request.duration: # The name of your custom instrument/metric
value: duration
type: counter
unit: s
description: "my description"
acme.request.size: # The name of your custom instrument/metric
value:
request_header: "content-length"
type: counter
unit: s
description: "my description"
acme.request.length: # The name of your custom instrument/metric
value:
request_header: "content-length"
type: histogram
unit: s
description: "my description"
supergraph:
acme.graphql.requests:
value: unit
type: counter
unit: request
description: "supergraph requests"
attributes:
static: hello
graphql_operation_kind:
operation_kind: string
subgraph:
request_including_price1:
value: unit
type: counter
unit: request
description: "supergraph requests"
condition:
exists:
subgraph_response_data: "$.products[*].price1"
attributes:
subgraph.name: true