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

Support weight in histogram emitting #175

Open
nklijia2011 opened this issue May 11, 2022 · 0 comments
Open

Support weight in histogram emitting #175

nklijia2011 opened this issue May 11, 2022 · 0 comments

Comments

@nklijia2011
Copy link

nklijia2011 commented May 11, 2022

I need to emit latency metrics through m3. Is there a way to emit timer metrics or histogram metrics with weight?

Basically, we are emitting how long a single request takes. Sometimes, the request is batching. for example, a batch request with a size of 10, we will calculate how much a single request takes, and emit that 10 times. Wondering whether the api can directly let me set a weight for that timer or histogram, so it knows this is 10 data pointers rather than 1

right now, we can do something like

hist := scope.Histogram(...)

for i := 0; i < 10; i++ {
  hist.Record(val)
}

wondering, whether the API can support something like

hist := scope.Histogram(...)
hist.Record(val, weight = 10)

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

1 participant