You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@@ -214,6 +230,50 @@ data will be excluded from git and just generated on demand.
214
230
Each file has a `when` value along with the list of metrics that indicates whether the telemetry is
215
231
emitted by default or via a configuration option.
216
232
233
+
#### Manual Telemetry Documentation
234
+
235
+
In addition to auto-generated telemetry data from test runs, you can manually document telemetry
236
+
metadata directly in the `metadata.yaml` file. This is useful for:
237
+
238
+
- Documenting telemetry that may not be captured during test runs
239
+
- Overriding auto-generated telemetry data when it's incomplete or incorrect
240
+
- Adding additional telemetry documentation that complements the auto-generated data
241
+
242
+
You can add manual telemetry documentation using the `additional_telemetry` field:
243
+
244
+
```yaml
245
+
additional_telemetry:
246
+
- when: "default" # or any configuration condition
247
+
metrics:
248
+
- name: "my.custom.metric"
249
+
description: "Description of the metric"
250
+
type: "COUNTER"
251
+
unit: "1"
252
+
attributes:
253
+
- name: "attribute.name"
254
+
type: "STRING"
255
+
spans:
256
+
- span_kind: "CLIENT"
257
+
attributes:
258
+
- name: "span.attribute"
259
+
type: "STRING"
260
+
```
261
+
262
+
To completely replace auto-generated telemetry data (ignoring `.telemetry` files), set `override_telemetry: true`:
263
+
264
+
```yaml
265
+
override_telemetry: true
266
+
additional_telemetry:
267
+
- when: "default"
268
+
metrics:
269
+
- name: "documented.metric"
270
+
description: "This replaces all auto-generated metrics"
271
+
type: "GAUGE"
272
+
unit: "ms"
273
+
```
274
+
275
+
When both manual and auto-generated telemetry exist for the same `when` condition, they are merged with manual entries taking precedence in case of conflicts (same metric name or span kind).
276
+
217
277
## Doc Synchronization
218
278
219
279
The documentation site has a section that lists all the instrumentations in the context of
0 commit comments