Skip to content

Commit

Permalink
Update instrumentation/net/http/otelhttp/internal/semconv/env.go
Browse files Browse the repository at this point in the history
Co-authored-by: Tyler Yahn <[email protected]>
  • Loading branch information
MadVikingGod and MrAlias authored Aug 1, 2024
1 parent 8c20713 commit dcdc4c2
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion instrumentation/net/http/otelhttp/internal/semconv/env.go
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ type MetricData struct {
}

func (s HTTPServer) RecordMetrics(ctx context.Context, md MetricData) {
if s.requestBytesCounter == nil {
if s.requestBytesCounter == nil || s.responseBytesCounter == nil || s.serverLatencyMeasure == nil {
// This will happen if an HTTPServer{} is used insted of NewHTTPServer.
return
}
Expand Down

0 comments on commit dcdc4c2

Please sign in to comment.