Skip to content

Commit

Permalink
fix line lengths, and unused otel constant
Browse files Browse the repository at this point in the history
  • Loading branch information
voidlock committed Oct 23, 2023
1 parent 367fc94 commit da4563b
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 6 deletions.
5 changes: 0 additions & 5 deletions go-kit/metrics/provider/otel/options.go
Original file line number Diff line number Diff line change
Expand Up @@ -30,11 +30,6 @@ var (
const (
// DefaultAgentEndpoint is a default exporter endpoint that points to a local otel collector.
DefaultAgentEndpoint = "http://0.0.0.0:55680"

// If you are encountering this error it means that you are attempting to
// establish an aggregation selection (explicit, or exponential) after you have
// created an exporter.
exporterAlreadyCreatedPanic = "histogram aggregation selection must happen before exporter selection"
)

// Option is used for optional arguments when initializing Provider.
Expand Down
6 changes: 5 additions & 1 deletion go-kit/metrics/provider/otel/provider.go
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,11 @@ var ExplicitAggregationSelector = metric.DefaultAggregationSelector

func ExponentialAggregationSelector(ik metric.InstrumentKind) metric.Aggregation {
switch ik {
case metric.InstrumentKindCounter, metric.InstrumentKindUpDownCounter, metric.InstrumentKindObservableCounter, metric.InstrumentKindObservableUpDownCounter:
case
metric.InstrumentKindCounter,
metric.InstrumentKindUpDownCounter,
metric.InstrumentKindObservableCounter,
metric.InstrumentKindObservableUpDownCounter:
return metric.AggregationSum{}
case metric.InstrumentKindObservableGauge:
return metric.AggregationLastValue{}
Expand Down

0 comments on commit da4563b

Please sign in to comment.