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
[receiver/k8sobjectsreceiver] Handle missing objects via error_mode (open-telemetry#38851)
#### Description
This PR adopts a similar logic to `ottl.ErrorMode` for
`k8sobjectsreceiver`, enabling users to choose between ignoring,
silencing, and propagating errors for missing objects.
The default is `propagate`, therefore it is backward compatible with the
current state.
<!-- Issue number (e.g. open-telemetry#1234) or full URL to issue, if applicable. -->
#### Link to tracking issue
Fixesopen-telemetry#38803
<!--Describe what testing was performed and which tests were added.-->
#### Testing
Added tests, and also tested by building my own image and deployed into
a Kubernetes cluster.
<!--Describe the documentation added.-->
#### Documentation
I've updated `receiver/k8sobjectsreceiver/config.yaml` and README with
the new config options.
<!--Please delete paragraphs that you did not use before submitting.-->
Copy file name to clipboardExpand all lines: receiver/k8sobjectsreceiver/README.md
+4Lines changed: 4 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -42,6 +42,10 @@ Brief description of configuration properties:
42
42
the K8s API server. This can be one of `none` (for no auth), `serviceAccount`
43
43
(to use the standard service account token provided to the agent pod), or
44
44
`kubeConfig`to use credentials from `~/.kube/config`.
45
+
- `error_mode` (default = `propagate`): Determines how to handle errors when the receiver is unable to pull or watch objects due to missing resources. This can be one of `propagate`, `ignore`, or `silent`.
46
+
- `propagate`will propagate the error to the collector as an Error.
47
+
- `ignore`will log and ignore the error and continue.
48
+
- `silent`will ignore the error and continue without logging.
45
49
- `name`: Name of the resource object to collect
46
50
- `mode`: define in which way it collects this type of object, either "pull" or "watch".
47
51
- `pull`mode will read all objects of this type use the list API at an interval.
0 commit comments