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
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
telemetry:
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
events:
router:
# Standard events
request: info
response: info
error: info
# Custom events
my.request_event:
message: "my event message"
level: info
on: request
attributes:
http.request.body.size: true
# Only log when the x-log-request header is `log`
condition:
eq:
- "log"
- request_header: "x-log-request"
my.response_event:
message: "my response event message"
level: info
on: response
attributes:
http.response.body.size: true
# Only log when the x-log-request header is `log`
condition:
eq:
- "log"
- response_header: "x-log-request"
supergraph:
# Standard events
request: info
response: info
error: info
# Custom events
my.request.event:
message: "my event message"
level: info
on: request
# Only log when the x-log-request header is `log`
condition:
eq:
- "log"
- request_header: "x-log-request"
my.response_event:
message: "my response event message"
level: warn
on: response
condition:
eq:
- "log"
- response_header: "x-log-request"
subgraph:
# Standard events
request: info
response: warn
error: error
# Custom events
my.request.event:
message: "my event message"
level: info
on: request
my.response.event:
message: "my response event message"
level: error
on: response
attributes:
subgraph.name: true
response_status:
subgraph_response_status: code
exporters:
tracing:
common:
service_name: router
resource:
str: a
int: 1
float: 1
bool: true
str_arr:
- a
- b
int_arr:
- 1
- 2
float_arr:
- 1
- 2
bool_arr:
- true
- false
metrics:
common:
attributes:
supergraph:
static:
- name: myname
value: label_value
request:
header:
- named: test
default: default_value
rename: renamed_value
body:
- path: .data.test
name: my_new_name
default: default_value
response:
header:
- named: test
default: default_value
rename: renamed_value
- named: test
default: default_value
rename: renamed_value
body:
- path: .data.test
name: my_new_name
default: default_value
subgraph:
all:
static:
- name: myname
value: label_value
request:
header:
- named: test
default: default_value
rename: renamed_value
body:
- path: .data.test
name: my_new_name
default: default_value
response:
header:
- named: test
default: default_value
rename: renamed_value
- named: test
default: default_value
rename: renamed_value
body:
- path: .data.test
name: my_new_name
default: default_value
subgraphs:
subgraph_name_test:
static:
- name: myname
value: label_value
request:
header:
- named: test
default: default_value
rename: renamed_value
body:
- path: .data.test
name: my_new_name
default: default_value
response:
header:
- named: test
default: default_value
rename: renamed_value
- named: test
default: default_value
rename: renamed_value
body:
- path: .data.test
name: my_new_name
default: default_value