Skip to content

Commit 40badea

Browse files
docs: document summary settings and string_patterns configuration
Add the "summary" config key to the collector configuration docs so that users can discover and configure summary metric tracking. The summary feature was previously undocumented in the config reference, making it difficult for users to learn about it without reading the source code. Update the example summary YAML to include a string_patterns section demonstrating how to capture gvfs-helper curl error values, and update the example output to show the array format used by string_patterns fields. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
1 parent 79c3645 commit 40badea

2 files changed

Lines changed: 27 additions & 1 deletion

File tree

Docs/Examples/summary_example.yml

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,15 @@ region_timers:
3131
count_field: "batchCount"
3232
time_field: "batchTime"
3333

34+
# String pattern rules - capture values from data events matching
35+
# a (category, key prefix) pair. Matched values are promoted into
36+
# the summary regardless of detail level or nesting.
37+
string_patterns:
38+
# Capture curl/http error details from gvfs-helper
39+
- category: "gvfs-helper"
40+
key_prefix: "error/"
41+
field_name: "gvfs_helper_errors"
42+
3443
# Example output in OTEL span attributes:
3544
# {
3645
# "trace2.process.summary": {
@@ -41,6 +50,7 @@ region_timers:
4150
# "getCount": 127,
4251
# "getTime": 50.3,
4352
# "batchCount": 1,
44-
# "batchTime": 12.3
53+
# "batchTime": 12.3,
54+
# "gvfs_helper_errors": ["(curl:35) SSL connect error [hard_fail]"]
4555
# }
4656
# }

Docs/configure-custom-collector.md

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,7 @@ receivers:
4646
pipe: <windows-named-pipe-pathname>
4747
pii: <pii-settings-pathname>
4848
filter: <filter-settings-pathname>
49+
summary: <summary-settings-pathname>
4950
```
5051

5152
For example:
@@ -57,6 +58,7 @@ receivers:
5758
pipe: "//./pipe/my-collector.pipe"
5859
pii: "/usr/local/my-collector/pii.yml"
5960
filter: "/usr/local/my-collector/filter.yml"
61+
summary: "/usr/local/my-collector/summary.yml"
6062
```
6163

6264
### `<unix-domain-socket-pathname>` (Required on Unix)
@@ -117,3 +119,17 @@ generated OTEL telemetry data. This is optional. If omitted,
117119
summary-level telemetry will be emitted.
118120

119121
See [config filter settings](./config-filter-settings.md) for details.
122+
123+
### `<summary-settings-pathname>` (Optional)
124+
125+
The pathname to a `summary.yml` file controlling which trace2 events
126+
are aggregated and promoted into the `trace2.process.summary` attribute
127+
on the OTEL process span. This is optional. If omitted, no summary
128+
metrics are emitted.
129+
130+
The summary is emitted at all detail levels (including `dl:summary`),
131+
making it useful for surfacing important data without requiring verbose
132+
telemetry.
133+
134+
See the [summary example](./Examples/summary_example.yml) for a
135+
complete example configuration.

0 commit comments

Comments
 (0)