Skip to content
This repository was archived by the owner on Sep 2, 2025. It is now read-only.

Commit b8684c6

Browse files
authored
Merge pull request #2303 from splunk/pwilliams-docguild-26694
Add process scraper example
2 parents bb36c48 + f92c166 commit b8684c6

File tree

1 file changed

+20
-1
lines changed

1 file changed

+20
-1
lines changed

gdi/opentelemetry/components/host-metrics-receiver.rst

Lines changed: 20 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -205,7 +205,26 @@ Process
205205
mute_process_io_error: <true|false>
206206
scrape_process_delay: <time>
207207
208-
If you keep getting errors related to process reading, consider setting ``mute_process_name_error``, ``mute_process_exe_error``, or ``mute_process_io_error`` to ``true``.
208+
The following example demonstrates how to configure a process scraper that collects two metrics, in addition to the defaults, and uses a resource attribute to include the process owner in the collected data:
209+
210+
.. code:: yaml
211+
212+
receivers:
213+
hostmetrics:
214+
scrapers:
215+
process:
216+
resource_attributes:
217+
process.owner:
218+
enabled: true
219+
metrics:
220+
process.memory.usage:
221+
enabled: true
222+
process.disk.io:
223+
enabled: true
224+
225+
For more information about enabling and disabling metrics and resource attributes using the process scraper, see :new-page:`hostmetricsreceiver/process <https://github.com/open-telemetry/opentelemetry-collector-contrib/blob/main/receiver/hostmetricsreceiver/internal/scraper/processscraper/documentation.md>` in the OpenTelemetry documentation.
226+
227+
If you continuously see errors related to process reading, consider setting ``mute_process_name_error``, ``mute_process_exe_error``, or ``mute_process_io_error`` to ``true``.
209228

210229
Filtering
211230
----------------------

0 commit comments

Comments
 (0)