Skip to content

Commit

Permalink
Remove tetragon_errors_total{type="handler_error"} metric
Browse files Browse the repository at this point in the history
It was duplicating tetragon_handler_errors_total.

Signed-off-by: Anna Kapuscinska <[email protected]>
  • Loading branch information
lambdanis committed Sep 2, 2024
1 parent 15ae54a commit 4032590
Show file tree
Hide file tree
Showing 4 changed files with 2 additions and 6 deletions.
1 change: 1 addition & 0 deletions contrib/upgrade-notes/latest.md
Original file line number Diff line number Diff line change
Expand Up @@ -62,3 +62,4 @@ tetragon:
* `tetragon_event_cache_retries_total` metric is renamed to `tetragon_event_cache_fetch_retries_total`.
* `tetragon_errors_total{type="event_missing_process_info"}` metric is replaced by
`tetragon_events_missing_process_info_total`.
* `tetragon_errors_total{type="handler_error"}` metric is removed. Use `tetragon_handler_errors_total` instead.
2 changes: 1 addition & 1 deletion docs/content/en/docs/reference/metrics.md

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 0 additions & 3 deletions pkg/metrics/errormetrics/errormetrics.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,6 @@ type ErrorType int
const (
// Tid and Pid mismatch that could affect BPF and user space caching logic
ProcessPidTidMismatch ErrorType = iota
// An error occurred in an event handler.
HandlerError
// An event finalizer on Process failed
EventFinalizeProcessInfoFailed
// Failed to resolve Process uid to username
Expand All @@ -30,7 +28,6 @@ const (

var errorTypeLabelValues = map[ErrorType]string{
ProcessPidTidMismatch: "process_pid_tid_mismatch",
HandlerError: "handler_error",
EventFinalizeProcessInfoFailed: "event_finalize_process_info_failed",
ProcessMetadataUsernameFailed: "process_metadata_username_failed",
ProcessMetadataUsernameIgnoredNotInHost: "process_metadata_username_ignored_not_in_host_namespaces",
Expand Down
2 changes: 0 additions & 2 deletions pkg/observer/observer.go
Original file line number Diff line number Diff line change
Expand Up @@ -124,8 +124,6 @@ func (k *Observer) receiveEvent(data []byte) {
op, events, err := HandlePerfData(data)
opcodemetrics.OpTotalInc(ops.OpCode(op))
if err != nil {
// Increment error metrics
errormetrics.ErrorTotalInc(errormetrics.HandlerError)
errormetrics.HandlerErrorsInc(ops.OpCode(op), err.kind)
switch err.kind {
case errormetrics.HandlePerfUnknownOp:
Expand Down

0 comments on commit 4032590

Please sign in to comment.