You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@skywalking.apache.org by GitBox <gi...@apache.org> on 2020/12/29 06:54:35 UTC

[GitHub] [skywalking-satellite] gxthrj commented on a change in pull request #11: add prometheus server

gxthrj commented on a change in pull request #11:
URL: https://github.com/apache/skywalking-satellite/pull/11#discussion_r549590767



##########
File path: internal/satellite/module/gatherer/receiver_gatherer.go
##########
@@ -41,51 +44,75 @@ type ReceiverGatherer struct {
 
 	// self components
 	outputChannel chan *queue.SequenceEvent
+	// metrics
+	receiveCounter     *prometheus.CounterVec
+	queueOutputCounter *prometheus.CounterVec
 }
 
 func (r *ReceiverGatherer) Prepare() error {
-	log.Logger.Infof("receiver gatherer module of %s namespace is preparing", r.config.NamespaceName)
-	r.runningReceiver.RegisterHandler(r.runningServer)
+	log.Logger.Infof("receiver gatherer module of %s namespace is preparing", r.config.PipeName)
+	r.runningReceiver.RegisterHandler(r.runningServer.GetServer())
 	if err := r.runningQueue.Initialize(); err != nil {
-		log.Logger.Infof("the %s queue of %s namespace was failed to initialize", r.runningQueue.Name(), r.config.NamespaceName)
+		log.Logger.Infof("the %s queue of %s namespace was failed to initialize", r.runningQueue.Name(), r.config.PipeName)
 		return err
 	}
+	r.receiveCounter = prometheus.NewCounterVec(prometheus.CounterOpts{

Review comment:
       I am not very clear about this. Should the metrics here be defined in plugins ? Or we supports prometheus in `Gather` by default?




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org