@@ -392,7 +392,7 @@ type HistogramOpts struct {
392392 // zero, it is replaced by default buckets. The default buckets are
393393 // DefBuckets if no buckets for a native histogram (see below) are used,
394394 // otherwise the default is no buckets. (In other words, if you want to
395- // use both reguler buckets and buckets for a native histogram, you have
395+ // use both regular buckets and buckets for a native histogram, you have
396396 // to define the regular buckets here explicitly.)
397397 Buckets []float64
398398
@@ -484,7 +484,7 @@ type HistogramVecOpts struct {
484484 HistogramOpts
485485
486486 // VariableLabels are used to partition the metric vector by the given set
487- // of labels. Each label value will be constrained with the optional Contraint
487+ // of labels. Each label value will be constrained with the optional Constraint
488488 // function, if provided.
489489 VariableLabels ConstrainableLabels
490490}
@@ -896,7 +896,7 @@ func (h *histogram) maybeReset(
896896 h .resetCounts (cold )
897897 // Repeat the latest observation to not lose it completely.
898898 cold .observe (value , bucket , true )
899- // Make coldCounts the new hot counts while ressetting countAndHotIdx.
899+ // Make coldCounts the new hot counts while resetting countAndHotIdx.
900900 n := atomic .SwapUint64 (& h .countAndHotIdx , (coldIdx << 63 )+ 1 )
901901 count := n & ((1 << 63 ) - 1 )
902902 waitForCooldown (count , hot )
@@ -1356,7 +1356,7 @@ func makeBuckets(buckets *sync.Map) ([]*dto.BucketSpan, []int64) {
13561356 // Multiple spans with only small gaps in between are probably
13571357 // encoded more efficiently as one larger span with a few empty
13581358 // buckets. Needs some research to find the sweet spot. For now,
1359- // we assume that gaps of one ore two buckets should not create
1359+ // we assume that gaps of one or two buckets should not create
13601360 // a new span.
13611361 iDelta := int32 (i - nextI )
13621362 if n == 0 || iDelta > 2 {
0 commit comments