File tree 1 file changed +10
-0
lines changed
lib/traces/provider/protocol/http2 1 file changed +10
-0
lines changed Original file line number Diff line number Diff line change 8
8
9
9
Traces ::Provider ( Protocol ::HTTP2 ::Framer ) do
10
10
def write_connection_preface
11
+ return super unless Traces . active?
12
+
11
13
Traces . trace ( "protocol.http2.framer.write_connection_preface" ) do
12
14
super
13
15
end
14
16
end
15
17
16
18
def read_connection_preface
19
+ return super unless Traces . active?
20
+
17
21
Traces . trace ( "protocol.http2.framer.read_connection_preface" ) do
18
22
super
19
23
end
20
24
end
21
25
22
26
def write_frame ( frame )
27
+ return super unless Traces . active?
28
+
23
29
attributes = {
24
30
"frame.length" => frame . length ,
25
31
"frame.class" => frame . class . name ,
@@ -34,6 +40,8 @@ def write_frame(frame)
34
40
end
35
41
36
42
def read_frame ( ...)
43
+ return super unless Traces . active?
44
+
37
45
Traces . trace ( "protocol.http2.framer.read_frame" ) do |span |
38
46
super . tap do |frame |
39
47
span [ "frame.length" ] = frame . length
@@ -45,6 +53,8 @@ def read_frame(...)
45
53
end
46
54
47
55
def flush
56
+ return super unless Traces . active?
57
+
48
58
Traces . trace ( "protocol.http2.framer.flush" ) do
49
59
super
50
60
end
You can’t perform that action at this time.
0 commit comments