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

Add time-series metrics measuring symptoms users of pebble are experiencing #1141

Closed
joshimhoff opened this issue May 14, 2021 · 2 comments
Closed

Comments

@joshimhoff
Copy link
Contributor

API boundaries are great places to add time-series metrics measuring symptoms experienced by users of that API. For example:

package main

import (
	"fmt"
	"log"

	"github.com/cockroachdb/pebble"
)

func main() {
	db, err := pebble.Open("demo", &pebble.Options{})
	if err != nil {
		log.Fatal(err)
	}
	key := []byte("hello")
	if err := db.Set(key, []byte("world"), pebble.Sync); err != nil {
		log.Fatal(err)
	}
	value, closer, err := db.Get(key)
	if err != nil {
		log.Fatal(err)
	}
	fmt.Printf("%s %s\n", key, value)
	if err := closer.Close(); err != nil {
		log.Fatal(err)
	}
	if err := db.Close(); err != nil {
		log.Fatal(err)
	}
}

We should have time-series metrics tracking the error rate & latency profiles of calls to db.Get. Not just calls to db.Get. Calls to pebble in general.

This will compliment #1140.

@petermattis
Copy link
Collaborator

Similar to #11140, I'd argue this should be done in CRDB, not in Pebble itself. I think the CRDB level operations have a better correspondence to what we'd want to measure.

@joshimhoff
Copy link
Contributor Author

Makes sense; closing.

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

No branches or pull requests

2 participants