Documentation
¶
Overview ¶
Copyright 2019, OpenTelemetry Authors
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
Index ¶
- func NewDefaultConfig() *sdk.Config
- type Aggregator
- func (c *Aggregator) Collect(ctx context.Context, rec export.MetricRecord, exp export.MetricBatcher)
- func (c *Aggregator) Count() int64
- func (c *Aggregator) Max() float64
- func (c *Aggregator) Merge(oa export.MetricAggregator, d *export.Descriptor)
- func (c *Aggregator) Min() float64
- func (c *Aggregator) Quantile(q float64) float64
- func (c *Aggregator) Sum() float64
- func (c *Aggregator) Update(_ context.Context, number core.Number, rec export.MetricRecord)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewDefaultConfig ¶
NewDefaultConfig returns a new, default DDSketch config.
Types ¶
type Aggregator ¶
type Aggregator struct {
// contains filtered or unexported fields
}
Aggregator aggregates measure events.
func New ¶
func New(cfg *sdk.Config, desc *export.Descriptor) *Aggregator
New returns a new DDSketch aggregator.
func (*Aggregator) Collect ¶
func (c *Aggregator) Collect(ctx context.Context, rec export.MetricRecord, exp export.MetricBatcher)
Collect checkpoints the current value (atomically) and exports it.
func (*Aggregator) Count ¶
func (c *Aggregator) Count() int64
Count returns the count of the checkpoint.
func (*Aggregator) Merge ¶
func (c *Aggregator) Merge(oa export.MetricAggregator, d *export.Descriptor)
func (*Aggregator) Quantile ¶
func (c *Aggregator) Quantile(q float64) float64
Quantile returns the estimated quantile of the checkpoint.
func (*Aggregator) Update ¶
func (c *Aggregator) Update(_ context.Context, number core.Number, rec export.MetricRecord)
Update modifies the current value (atomically) for later export.