Skip to content

Commit ae43cdd

Browse files
committed
added test
1 parent 8c98272 commit ae43cdd

File tree

2 files changed

+10
-1
lines changed

2 files changed

+10
-1
lines changed

instrumentation/net/http/otelhttp/config.go

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -143,11 +143,13 @@ func WithFilter(f Filter) Option {
143143
})
144144
}
145145

146+
// Event represents message event types for WithMessageEvents.
146147
type Event int
147148

148149
// Different types of events that can be recorded, see WithMessageEvents.
149150
const (
150-
ReadEvents Event = iota
151+
UnspecifiedEvent Event = iota
152+
ReadEvents
151153
WriteEvents
152154
)
153155

instrumentation/net/http/otelhttp/config_test.go

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -122,3 +122,10 @@ func TestSpanNameFormatter(t *testing.T) {
122122
})
123123
}
124124
}
125+
126+
func TestEventCoverage(t *testing.T) {
127+
t.Helper()
128+
_ = otelhttp.UnspecifiedEvent
129+
_ = otelhttp.ReadEvents
130+
_ = otelhttp.WriteEvents
131+
}

0 commit comments

Comments
 (0)