otelroundtripper.defaultConfig   A
last analyzed

Complexity

Conditions 1

Size

Total Lines 5
Code Lines 5

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
eloc 5
nop 0
dl 0
loc 5
rs 10
c 0
b 0
f 0
1
package otelroundtripper
2
3
import (
4
	"go.opentelemetry.io/otel"
5
	"net/http"
6
7
	"go.opentelemetry.io/otel/attribute"
8
	"go.opentelemetry.io/otel/metric"
9
)
10
11
type config struct {
12
	name       string
13
	parent     http.RoundTripper
14
	meter      metric.Meter
15
	attributes []attribute.KeyValue
16
}
17
18
func defaultConfig() *config {
19
	return &config{
20
		name:   "http.client",
21
		parent: http.DefaultTransport,
22
		meter:  otel.GetMeterProvider().Meter("http.client"),
23
	}
24
}
25