Skip to content

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

@prateek

Description

@prateek

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).

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions