Skip to content

Commit

Permalink
initialize checkpoint when creating ddsketch aggregator to prevent pa…
Browse files Browse the repository at this point in the history
…nic when merging into a empty one (open-telemetry#402)
  • Loading branch information
Letian Zhang committed Dec 26, 2019
1 parent 1414d36 commit f75dd67
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions sdk/metric/aggregator/ddsketch/ddsketch.go
Original file line number Diff line number Diff line change
Expand Up @@ -45,9 +45,10 @@ var _ aggregator.Distribution = &Aggregator{}
// New returns a new DDSketch aggregator.
func New(cfg *Config, desc *export.Descriptor) *Aggregator {
return &Aggregator{
cfg: cfg,
kind: desc.NumberKind(),
current: sdk.NewDDSketch(cfg),
cfg: cfg,
kind: desc.NumberKind(),
current: sdk.NewDDSketch(cfg),
checkpoint: sdk.NewDDSketch(cfg),
}
}

Expand Down

0 comments on commit f75dd67

Please sign in to comment.