-
Notifications
You must be signed in to change notification settings - Fork 113
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: Christian Richter <crichter@owncloud.com>
- Loading branch information
1 parent
ed2be2a
commit ae673c9
Showing
8 changed files
with
74 additions
and
10 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
package blobstore | ||
|
||
import "github.com/prometheus/client_golang/prometheus" | ||
|
||
var ( | ||
// Namespace defines the namespace for the defines metrics. | ||
Namespace = "ocis" | ||
|
||
// Subsystem defines the subsystem for the defines metrics. | ||
Subsystem = "thumbnails" | ||
) | ||
|
||
// Metrics defines the available metrics of this service. | ||
type Metrics struct { | ||
Rx *prometheus.CounterVec | ||
Tx *prometheus.CounterVec | ||
} | ||
|
||
// New initializes the available metrics. | ||
func NewMetrics() *Metrics { | ||
m := &Metrics{ | ||
Rx: prometheus.NewCounterVec(prometheus.CounterOpts{ | ||
Namespace: Namespace, | ||
Subsystem: Subsystem, | ||
Name: "Rx", | ||
Help: "Storage access rx", | ||
}, []string{}), | ||
Tx: prometheus.NewCounterVec(prometheus.CounterOpts{ | ||
Namespace: Namespace, | ||
Subsystem: Subsystem, | ||
Name: "Tx", | ||
Help: "Storage access tx", | ||
}, []string{}), | ||
} | ||
_ = prometheus.Register(m.Rx) | ||
_ = prometheus.Register(m.Tx) | ||
|
||
return m | ||
} |
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
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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