forked from corvus-ch/rabbitmq-cli-consumer
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
5 changed files
with
134 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
package collector | ||
|
||
import "github.com/prometheus/client_golang/prometheus" | ||
|
||
const ( | ||
namespace = "rabbitmq_cli_consumer" | ||
) | ||
|
||
var ( | ||
ProcessCounter = prometheus.NewCounterVec( | ||
prometheus.CounterOpts{ | ||
Namespace: namespace, | ||
Name: "process_total", | ||
Help: "The total number of processes executed.", | ||
}, | ||
[]string{"exit_code"}, | ||
) | ||
|
||
ProcessDuration = prometheus.NewHistogram( | ||
prometheus.HistogramOpts{ | ||
Namespace: namespace, | ||
Name: "process_duration_seconds", | ||
Help: "The time spent by the consumer to process 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,16 @@ | ||
module github.com/corvus-ch/rabbitmq-cli-consumer | ||
|
||
require ( | ||
bou.ke/monkey v1.0.1 | ||
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 | ||
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