|
46 | 46 | listen 127.0.0.1:8080; |
47 | 47 | server_name localhost; |
48 | 48 |
|
49 | | - location /trace-on { |
| 49 | + location / { |
50 | 50 | otel_trace_context extract; |
51 | 51 | otel_span_name default_location; |
52 | 52 | otel_span_attr http.request.completion |
|
58 | 58 | } |
59 | 59 |
|
60 | 60 | location /context-ignore { |
61 | | - otel_trace_context ignore; |
62 | 61 | otel_span_name context_ignore; |
63 | 62 | proxy_pass http://127.0.0.1:8080/204; |
64 | 63 | } |
@@ -239,14 +238,14 @@ def teardown_class(cls): |
239 | 238 | @pytest.mark.parametrize( |
240 | 239 | ("url", "text"), |
241 | 240 | [ |
242 | | - ("https://127.0.0.1:8443/trace-on", "TRACE-ON"), |
| 241 | + ("https://127.0.0.1:8443/", "TRACE-ON"), |
243 | 242 | ("https://127.0.0.1:8443/context-ignore", ""), |
244 | 243 | ("https://127.0.0.1:8443/context-extract", ""), |
245 | 244 | ("https://127.0.0.1:8443/context-inject", ""), |
246 | 245 | ("https://127.0.0.1:8443/context-propagate", ""), |
247 | 246 | ("https://127.0.0.1:8443/204", ""), |
248 | 247 | ] |
249 | | - + [("https://127.0.0.1:8443/trace-on", "TRACE-ON")] * 10, |
| 248 | + + [("https://127.0.0.1:8443/", "TRACE-ON")] * 10, |
250 | 249 | ids=[ |
251 | 250 | "trace-on", |
252 | 251 | "context-ignore", |
@@ -304,22 +303,22 @@ def test_span_name(self, http_ver, span, value, idx, otel_mode): |
304 | 303 | ( |
305 | 304 | "http.target", |
306 | 305 | "string_value", |
307 | | - ["/trace-on"] * 2 |
| 306 | + ["/"] * 2 |
308 | 307 | + ["/context-ignore"] * 2 |
309 | 308 | + ["/context-extract"] * 2 |
310 | 309 | + ["/context-inject"] * 2 |
311 | 310 | + ["/context-propagate"] * 2 |
312 | | - + ["/trace-on"] * 20, |
| 311 | + + ["/"] * 20, |
313 | 312 | ), |
314 | 313 | ( |
315 | 314 | "http.route", |
316 | 315 | "string_value", |
317 | | - ["/trace-on"] * 2 |
| 316 | + ["/"] * 2 |
318 | 317 | + ["/context-ignore"] * 2 |
319 | 318 | + ["/context-extract"] * 2 |
320 | 319 | + ["/context-inject"] * 2 |
321 | 320 | + ["/context-propagate"] * 2 |
322 | | - + ["/trace-on"] * 20, |
| 321 | + + ["/"] * 20, |
323 | 322 | ), |
324 | 323 | ("http.scheme", "string_value", "https"), |
325 | 324 | ("http.flavor", "string_value", [None, "1.1", "2.0", "3.0"]), |
@@ -383,12 +382,7 @@ def test_metrics(self, http_ver, span, idx, name, atype, value, otel_mode): |
383 | 382 | ( |
384 | 383 | "http.request", |
385 | 384 | "string_value", |
386 | | - [ |
387 | | - "GET /trace-on", |
388 | | - "GET /trace-on HTTP/1.1", |
389 | | - "GET /trace-on HTTP/2.0", |
390 | | - "GET /trace-on HTTP/3.0", |
391 | | - ], |
| 385 | + ["GET /", "GET / HTTP/1.1", "GET / HTTP/2.0", "GET / HTTP/3.0"], |
392 | 386 | ), |
393 | 387 | ], |
394 | 388 | ids=[ |
|
0 commit comments