Skip to content

Commit

Permalink
telemetry: remove unused func
Browse files Browse the repository at this point in the history
  • Loading branch information
sh0rez committed Jul 18, 2024
1 parent 52c9ae9 commit c976c07
Showing 1 changed file with 0 additions and 12 deletions.
12 changes: 0 additions & 12 deletions processor/deltatocumulativeprocessor/internal/telemetry/metrics.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ import (
"errors"
"time"

"go.opentelemetry.io/collector/processor/processorhelper"
"go.opentelemetry.io/otel/attribute"
"go.opentelemetry.io/otel/metric"

Expand Down Expand Up @@ -158,14 +157,3 @@ func dec[A addable[O], O any](a A, opts ...O) {
func reason(reason string) metric.AddOption {
return metric.WithAttributes(attribute.String("reason", reason))
}

func use[F func(string, ...O) (M, error), M any, O any](f F) func(string, ...O) M {
return func(name string, opts ...O) M {
name = processorhelper.BuildCustomMetricName(metadata.Type.String(), name)
m, err := f(name, opts...)
if err != nil {
panic(err)
}
return m
}
}

0 comments on commit c976c07

Please sign in to comment.