-
Notifications
You must be signed in to change notification settings - Fork 4.9k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
…2894) * add metrics for kernel_tracing provider, fix mutex issue * fix metrics setup, add tests * still tinkering with monitoring * add changelog (cherry picked from commit 5197c43) Co-authored-by: Alex K. <8418476+fearful-symmetry@users.noreply.github.com>
- Loading branch information
1 parent
fcda890
commit 89ae1e0
Showing
5 changed files
with
112 additions
and
20 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
31 changes: 31 additions & 0 deletions
31
x-pack/auditbeat/processors/sessionmd/provider/kerneltracingprovider/metrics.go
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
// Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one | ||
// or more contributor license agreements. Licensed under the Elastic License; | ||
// you may not use this file except in compliance with the Elastic License. | ||
|
||
//go:build linux && (amd64 || arm64) && cgo | ||
|
||
package kerneltracingprovider | ||
|
||
import ( | ||
"github.com/elastic/elastic-agent-libs/monitoring" | ||
) | ||
|
||
// / Stats tracks the quark internal stats, which are integrated into the beats monitoring runtime | ||
type Stats struct { | ||
Insertions *monitoring.Uint | ||
Removals *monitoring.Uint | ||
Aggregations *monitoring.Uint | ||
NonAggregations *monitoring.Uint | ||
Lost *monitoring.Uint | ||
} | ||
|
||
// / NewStats creates a new stats object | ||
func NewStats(reg *monitoring.Registry) *Stats { | ||
return &Stats{ | ||
Insertions: monitoring.NewUint(reg, "insertions"), | ||
Removals: monitoring.NewUint(reg, "removals"), | ||
Aggregations: monitoring.NewUint(reg, "aggregations"), | ||
NonAggregations: monitoring.NewUint(reg, "nonaggregations"), | ||
Lost: monitoring.NewUint(reg, "lost"), | ||
} | ||
} |