Total Lines | 22 |
Duplicated Lines | 0 % |
Changes | 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 | } |
||
25 |