-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Move metrics to separate file and reduce buckets
- Loading branch information
1 parent
f1e5d03
commit 2bdb11e
Showing
2 changed files
with
17 additions
and
14 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
package sources | ||
|
||
import ( | ||
"github.com/prometheus/client_golang/prometheus" | ||
"github.com/prometheus/client_golang/prometheus/promauto" | ||
"github.com/trufflesecurity/trufflehog/v3/pkg/common" | ||
) | ||
|
||
var ( | ||
hooksExecTime = promauto.NewHistogramVec(prometheus.HistogramOpts{ | ||
Namespace: common.MetricsNamespace, | ||
Subsystem: common.MetricsSubsystem, | ||
Name: "hooks_exec_time_ms", | ||
Help: "Time spent executing hooks (ms)", | ||
Buckets: []float64{5, 50, 500, 1000}, | ||
}, nil) | ||
) |