config.go   A
last analyzed

Size/Duplication

Total Lines 22
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
cc 1
eloc 16
dl 0
loc 22
rs 10
c 0
b 0
f 0

1 Method

Rating   Name   Duplication   Size   Complexity  
A otelroundtripper.defaultConfig 0 5 1
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