From 3f304d0bfd353d49c83f76f83e114dfac5275a61 Mon Sep 17 00:00:00 2001 From: Aaron Clawson Date: Thu, 1 Aug 2024 19:29:17 +0200 Subject: [PATCH] fix missing nil --- .../net/http/otelhttp/internal/semconv/httpconv_test.go | 2 +- .../net/http/otelhttp/internal/semconv/v1.20.0_test.go | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/instrumentation/net/http/otelhttp/internal/semconv/httpconv_test.go b/instrumentation/net/http/otelhttp/internal/semconv/httpconv_test.go index 49b70a04535..82bb0133168 100644 --- a/instrumentation/net/http/otelhttp/internal/semconv/httpconv_test.go +++ b/instrumentation/net/http/otelhttp/internal/semconv/httpconv_test.go @@ -18,7 +18,7 @@ import ( func TestNewTraceRequest(t *testing.T) { t.Setenv("OTEL_HTTP_CLIENT_COMPATIBILITY_MODE", "http/dup") - serv := NewHTTPServer() + serv := NewHTTPServer(nil) want := func(req testServerReq) []attribute.KeyValue { return []attribute.KeyValue{ attribute.String("http.request.method", "GET"), diff --git a/instrumentation/net/http/otelhttp/internal/semconv/v1.20.0_test.go b/instrumentation/net/http/otelhttp/internal/semconv/v1.20.0_test.go index c6ae833f40d..7fc0e90eb45 100644 --- a/instrumentation/net/http/otelhttp/internal/semconv/v1.20.0_test.go +++ b/instrumentation/net/http/otelhttp/internal/semconv/v1.20.0_test.go @@ -123,6 +123,7 @@ func TestV120RecordMetrics(t *testing.T) { assert.ElementsMatch(t, want, server.responseBytesCounter.(*testInst).attributes) assert.ElementsMatch(t, want, server.serverLatencyMeasure.(*testInst).attributes) } + func TestV120ClientRequest(t *testing.T) { body := strings.NewReader("Hello, world!") url := "https://example.com:8888/foo/bar?stuff=morestuff"