Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[receiver/hostmetrics] Add documentation for mute_*_error configuration fields #32494

Merged
merged 8 commits into from
Jul 22, 2024
Merged
Show file tree
Hide file tree
Changes from 4 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 27 additions & 0 deletions .chloggen/add-mute-error-documentation.yaml
crobert-1 marked this conversation as resolved.
Show resolved Hide resolved
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
# Use this changelog template to create an entry for release notes.

# One of 'breaking', 'deprecation', 'new_component', 'enhancement', 'bug_fix'
change_type: enhancement

# The name of the component, or a single word describing the area of concern, (e.g. filelogreceiver)
component: hostmetricsreceiver

# A brief description of the change. Surround your text with quotes ("") if it needs to start with a backtick (`).
note: Added documentation for mute_*_error configuration fields

# Mandatory: One or more tracking issues related to the change. You can use the PR number here if no issue exists.
issues: [30779]

# (Optional) One or more lines of additional information to render under the primary note.
# These lines will be padded with 2 spaces and then inserted directly into the document.
# Use pipe (|) for multiline entries.
subtext:

# If your change doesn't affect end users or the exported elements of any package,
# you should instead start your pull request title with [chore] or use the "Skip Changelog" label.
# Optional: The change log or logs in which this entry should be included.
# e.g. '[user]' or '[user, api]'
# Include 'user' if the change is relevant to end users.
# Include 'api' if there is a change to a library API.
# Default: '[user]'
change_logs: [user]
Original file line number Diff line number Diff line change
Expand Up @@ -22,21 +22,21 @@ type Config struct {
Include MatchConfig `mapstructure:"include"`
Exclude MatchConfig `mapstructure:"exclude"`

// MuteProcessNameError is a flag that will mute the error encountered when trying to read a process the
// collector does not have permission for.
// MuteProcessNameError is a flag that will mute the error encountered when trying to read a process name the
// collector does not have permission to read.
// See https://github.com/open-telemetry/opentelemetry-collector/issues/3004 for more information.
MuteProcessNameError bool `mapstructure:"mute_process_name_error,omitempty"`

// MuteProcessIOError is a flag that will mute the error encountered when trying to read IO metrics of a process
// the collector does not have permission for.
// the collector does not have permission to read.
MuteProcessIOError bool `mapstructure:"mute_process_io_error,omitempty"`

// MuteProcessCgroupError is a flag that will mute the error encountered when trying to read the cgroup of a process
// the collector does not have permission for.
// the collector does not have permission to read.
MuteProcessCgroupError bool `mapstructure:"mute_process_cgroup_error,omitempty"`

// ResilientProcessScraping is a flag that will let the collector continue reading a process even when
// the collector does not have permission to read it's executable path (Linux)
// MuteProcessExeError is a flag that will mute the error encountered when trying to read the executable path of a process
// the collector does not have permission to read (Linux)
MuteProcessExeError bool `mapstructure:"mute_process_exe_error,omitempty"`

// MuteProcessUserError is a flag that will mute the error encountered when trying to read uid which
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -186,3 +186,13 @@ Process threads count.
| process.owner | The username of the user that owns the process. | Any Str | true |
| process.parent_pid | Parent Process identifier (PPID). | Any Int | true |
| process.pid | Process identifier (PID). | Any Int | true |

## Configuration

The following settings are optional:

- `mute_process_name_error` (default: false): mute the error encountered when trying to read a process name the collector does not have permission to read
- `mute_process_io_error` (default: false): mute the error encountered when trying to read IO metrics of a process the collector does not have permission to read
- `mute_process_cgroup_error` (default: false): mute the error encountered when trying to read the cgroup of a process the collector does not have permission to read
- `mute_process_exe_error` (default: false): mute the error encountered when trying to read the executable path of a process the collector does not have permission to read (Linux only)
- `mute_process_user_error` (default: false): mute the error encountered when trying to read uid which doesn't exist on the system, eg. is owned by user existing in container only