File tree Expand file tree Collapse file tree 3 files changed +3
-7
lines changed Expand file tree Collapse file tree 3 files changed +3
-7
lines changed Original file line number Diff line number Diff line change @@ -22,7 +22,7 @@ func NewMetricsCollectors(metricsConfig *config.Metrics) {
22
22
}
23
23
24
24
if metricsConfig .OtelHTTPExporterEnabled {
25
- otelhttpmetrics := NewOtelMetrics (metricsConfig )
25
+ otelhttpmetrics := NewOtelMetrics ()
26
26
collectors = append (collectors , otelhttpmetrics )
27
27
}
28
28
}
Original file line number Diff line number Diff line change @@ -11,7 +11,6 @@ import (
11
11
"go.opentelemetry.io/otel/sdk/resource"
12
12
semconv "go.opentelemetry.io/otel/semconv/v1.4.0"
13
13
14
- "github.com/kedacore/http-add-on/interceptor/config"
15
14
"github.com/kedacore/http-add-on/pkg/build"
16
15
)
17
16
@@ -21,7 +20,7 @@ type OtelMetrics struct {
21
20
pendingRequestCounter api.Int64UpDownCounter
22
21
}
23
22
24
- func NewOtelMetrics (metricsConfig * config. Metrics , options ... metric.Option ) * OtelMetrics {
23
+ func NewOtelMetrics (options ... metric.Option ) * OtelMetrics {
25
24
ctx := context .Background ()
26
25
27
26
exporter , err := otlpmetrichttp .New (ctx )
Original file line number Diff line number Diff line change 7
7
"github.com/stretchr/testify/assert"
8
8
"go.opentelemetry.io/otel/sdk/metric"
9
9
"go.opentelemetry.io/otel/sdk/metric/metricdata"
10
-
11
- "github.com/kedacore/http-add-on/interceptor/config"
12
10
)
13
11
14
12
var (
19
17
func init () {
20
18
testReader = metric .NewManualReader ()
21
19
options := metric .WithReader (testReader )
22
- metricsCfg := config.Metrics {}
23
- testOtel = NewOtelMetrics (& metricsCfg , options )
20
+ testOtel = NewOtelMetrics (options )
24
21
}
25
22
26
23
func TestRequestCounter (t * testing.T ) {
You can’t perform that action at this time.
0 commit comments