Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Metrics that help measure connection saturation and roundtrip latency #19

Closed
wants to merge 1 commit into from

Conversation

gkawamoto
Copy link

Includes four new metrics:

  • beanstalk_client_command_roundtrip_latency to measure the time between the command being sent and the response arriving to the client.
  • beanstalk_client_command_count to measure the number of commands sent to beanstalkd.
  • beanstalk_client_command_error_count to measure the number of errors returned from the commands sent to beanstalkd.
  • beanstalk_client_command_queue_latency to measure the time between acquiring the lock to execute commands.

Those metrics were added via opencensus and can views that bound to them can be accessed via the beanstalk.MetricViews method in stats.go

Example:

package main 

import (
	"github.com/prep/beanstalk"
	"go.opencensus.io/stats/view"
)

func main() {
	err := view.Register(beanstalk.MetricViews()...)
	 if err != nil {
		panic(err)
	}
	// ... your code
}

@prep prep closed this Feb 24, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants