Skip to content

Commit 4bc9129

Browse files
derrickstoleeclaude
andcommitted
docs: Document important_events filter configuration
Context: The important_events feature added in the previous commit has no user-facing documentation. Operators need to know the YAML syntax, the semantics of each field, the output attribute name, and how the feature relates to summary.yml so they can distinguish verbatim capture from aggregated metrics. Implementation: config-filter-settings.md gains a new "Important Events" section with YAML syntax, field descriptions, and a worked example showing gvfs-helper error capture. The filter syntax summary at the bottom is extended with the important_events block so the complete schema appears in one place. configure-custom-collector.md documents the filter: pathname key (previously undocumented in the receiver config example) and adds a cross-reference to important_events. The summary example YAML adds a note directing readers to filter.yml for verbatim value capture, distinguishing it from the aggregated summary output. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
1 parent 2b95698 commit 4bc9129

3 files changed

Lines changed: 71 additions & 0 deletions

File tree

Docs/Examples/summary_example.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,3 +44,6 @@ region_timers:
4444
# "batchTime": 12.3
4545
# }
4646
# }
47+
#
48+
# To also capture specific data event values verbatim in the summary,
49+
# add important_events rules to your filter.yml instead.

Docs/config-filter-settings.md

Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -254,6 +254,47 @@ the `ruleset_key`.)
254254

255255

256256

257+
## Important Events
258+
259+
In addition to controlling verbosity, the `filter.yml` file can
260+
declare a list of data events that should always be captured verbatim,
261+
regardless of the active detail level. This lets operators guarantee
262+
that specific Trace2 data values are always surfaced in the OTEL
263+
process span even when verbose telemetry is disabled.
264+
265+
Each rule matches data events by `category` (exact match) and
266+
`key_prefix` (prefix match on the event's key field). All matching
267+
values are collected into an array under the specified `field_name` in
268+
the `trace2.process.important_events` span attribute.
269+
270+
```
271+
important_events:
272+
- category: <category-string>
273+
key_prefix: <key-prefix-string>
274+
field_name: <field-name>
275+
...
276+
```
277+
278+
For example, to always capture error details from a `gvfs-helper`
279+
subprocess regardless of how verbosity is configured:
280+
281+
```
282+
important_events:
283+
- category: "gvfs-helper"
284+
key_prefix: "error/"
285+
field_name: "gvfs_helper_errors"
286+
```
287+
288+
This would produce the following in the OTEL process span:
289+
290+
```
291+
"trace2.process.important_events": {
292+
"gvfs_helper_errors": ["(curl:35) SSL connect error [hard_fail]"]
293+
}
294+
```
295+
296+
297+
257298
## Filter Settings Syntax
258299

259300
Now that all of the concepts have been introduced, we can describe
@@ -277,6 +318,12 @@ rulesets:
277318
278319
defaults:
279320
ruleset: <ruleset-name> | <detail-level>
321+
322+
important_events:
323+
- category: <category-string>
324+
key_prefix: <key-prefix-string>
325+
field_name: <summary-field-name>
326+
...
280327
```
281328

282329
The value of the `defaults.ruleset` parameter will be used when a Git

Docs/configure-custom-collector.md

Lines changed: 21 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,22 @@ 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 into the `trace2.process.summary` attribute on the OTEL
127+
process span. This is optional. If omitted, no aggregated summary
128+
metrics are emitted.
129+
130+
The summary is emitted at all detail levels (including `dl:summary`),
131+
making it useful for surfacing aggregated statistics without requiring
132+
verbose telemetry.
133+
134+
See the [summary example](./Examples/summary_example.yml) for a
135+
complete example configuration.
136+
137+
To capture specific data event values verbatim (emitted in a separate
138+
`trace2.process.important_events` span attribute), use the
139+
`important_events` section of the filter settings. See
140+
[config filter settings](./config-filter-settings.md) for details.

0 commit comments

Comments
 (0)