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

Mix-matching Histogram Buckets and Report Methods results in silent failure #240

Open
prateek opened this issue Nov 29, 2023 · 0 comments
Open

Comments

@prateek
Copy link
Collaborator

prateek commented Nov 29, 2023

Whilst using Histograms in Tally, if you mix-match the type the bucket and the value reported. It results in silent failure.

For instance, if you create DurationBuckets and RecordValue (or ValueBuckets and RecordDuration), the code silently skips emitting metrics. Root cause: https://github.com/uber-go/tally/blob/master/stats.go#L369

Repro case:

	durationBuckets := tally.MustMakeLinearDurationBuckets(0, 100*time.Millisecond, 10)
	rootScope.Histogram("hist-value", durationBuckets).RecordValue(42.) // <-- silent failure

Creating this ticket more to document this failure mode. Future versions should just return an error. For now, maybe its worth emitting an internal metric/log (or worst case panic in such cases).

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