-
Notifications
You must be signed in to change notification settings - Fork 37
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #64 from estahn/prometheus-integration
- Loading branch information
Showing
19 changed files
with
174 additions
and
3 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,37 @@ | ||
package collector | ||
|
||
import "github.com/prometheus/client_golang/prometheus" | ||
|
||
const ( | ||
namespace = "rabbitmq_cli_consumer" | ||
) | ||
|
||
var ( | ||
// ProcessCounter is a Prometheus metric describing the total number of processes executed. | ||
ProcessCounter = prometheus.NewCounterVec( | ||
prometheus.CounterOpts{ | ||
Namespace: namespace, | ||
Name: "process_total", | ||
Help: "The total number of processes executed.", | ||
}, | ||
[]string{"exit_code"}, | ||
) | ||
|
||
// ProcessDuration is a Prometheus metric describing the time spent by the consumer to process the message. | ||
ProcessDuration = prometheus.NewHistogram( | ||
prometheus.HistogramOpts{ | ||
Namespace: namespace, | ||
Name: "process_duration_seconds", | ||
Help: "The time spent by the consumer to process the message.", | ||
}, | ||
) | ||
|
||
// MessageDuration is a Prometheus metric describing the time spent from publishing to finished processing the message. | ||
MessageDuration = prometheus.NewHistogram( | ||
prometheus.HistogramOpts{ | ||
Namespace: namespace, | ||
Name: "message_duration_seconds", | ||
Help: "The time spent from publishing to finished processing the message.", | ||
}, | ||
) | ||
) |
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
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
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
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 |
---|---|---|
@@ -1,10 +1,18 @@ | ||
module github.com/corvus-ch/rabbitmq-cli-consumer | ||
|
||
require ( | ||
bou.ke/monkey v1.0.1 | ||
github.com/AlekSi/gocoverutil v0.2.0 // indirect | ||
github.com/bketelsen/logr v0.0.0-20170116012416-f3d070bdd1c5 | ||
github.com/codegangsta/cli v1.20.1-0.20190203184040-693af58b4d51 | ||
github.com/corvus-ch/logr v0.0.0-20180917163152-45217966b77e | ||
github.com/magiconair/properties v1.8.0 | ||
github.com/pkg/errors v0.8.1 | ||
github.com/prometheus/client_golang v0.9.2 | ||
github.com/sebdah/goldie v0.0.0-20190305024101-629351c67c53 | ||
github.com/streadway/amqp v0.0.0-20190224195609-f16568b23ee6 | ||
github.com/stretchr/testify v1.3.0 | ||
golang.org/x/tools v0.0.0-20190417223002-a5870b403859 // indirect | ||
gopkg.in/gcfg.v1 v1.2.3 | ||
gopkg.in/warnings.v0 v0.1.2 // indirect | ||
) |
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