Skip to content

Commit a540764

Browse files
Lms24cursoragent
andauthored
feat(v10): Add url.full and url.path to http.server spans (#22533)
Backports #22496 to v10. Add `url.full` and `url.path` to instrumentation that creates or takes over `http.server` spans so streamed spans can infer useful descriptions consistently on v10. The Node-side change follows the v10 `node-core` package split; the remaining changes are a direct cherry-pick of the merged PR. Fixes #22417 Made with [Cursor](<https://cursor.com>) --------- Co-authored-by: GPT-5.6 Sol <cursoragent@cursor.com>
1 parent 95e742e commit a540764

42 files changed

Lines changed: 255 additions & 10 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

dev-packages/e2e-tests/test-applications/nestjs-11/tests/transactions.test.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,8 @@ test('Sends an API route transaction', async ({ baseURL }) => {
2323
'otel.kind': 'SERVER',
2424
'http.response.status_code': 200,
2525
'http.url': 'http://localhost:3030/test-transaction',
26+
'url.full': 'http://localhost:3030/test-transaction',
27+
'url.path': '/test-transaction',
2628
'http.host': 'localhost:3030',
2729
'net.host.name': 'localhost',
2830
'http.method': 'GET',

dev-packages/e2e-tests/test-applications/nestjs-8/tests/transactions.test.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,8 @@ test('Sends an API route transaction', async ({ baseURL }) => {
2323
'otel.kind': 'SERVER',
2424
'http.response.status_code': 200,
2525
'http.url': 'http://localhost:3030/test-transaction',
26+
'url.full': 'http://localhost:3030/test-transaction',
27+
'url.path': '/test-transaction',
2628
'http.host': 'localhost:3030',
2729
'net.host.name': 'localhost',
2830
'http.method': 'GET',

dev-packages/e2e-tests/test-applications/nestjs-basic/tests/transactions.test.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,8 @@ test('Sends an API route transaction', async ({ baseURL }) => {
4949
'otel.kind': 'SERVER',
5050
'http.response.status_code': 200,
5151
'http.url': 'http://localhost:3030/test-transaction',
52+
'url.full': 'http://localhost:3030/test-transaction',
53+
'url.path': '/test-transaction',
5254
'http.host': 'localhost:3030',
5355
'net.host.name': 'localhost',
5456
'http.method': 'GET',

dev-packages/e2e-tests/test-applications/nestjs-distributed-tracing/tests/propagation.test.ts

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,8 @@ test('Propagates trace for outgoing http requests', async ({ baseURL }) => {
6464
'otel.kind': 'SERVER',
6565
'http.response.status_code': 200,
6666
'http.url': `http://localhost:3030/test-outgoing-http/${id}`,
67+
'url.full': `http://localhost:3030/test-outgoing-http/${id}`,
68+
'url.path': `/test-outgoing-http/${id}`,
6769
'http.host': 'localhost:3030',
6870
'net.host.name': 'localhost',
6971
'http.method': 'GET',
@@ -103,6 +105,8 @@ test('Propagates trace for outgoing http requests', async ({ baseURL }) => {
103105
'otel.kind': 'SERVER',
104106
'http.response.status_code': 200,
105107
'http.url': `http://localhost:3030/test-inbound-headers/${id}`,
108+
'url.full': `http://localhost:3030/test-inbound-headers/${id}`,
109+
'url.path': `/test-inbound-headers/${id}`,
106110
'http.host': 'localhost:3030',
107111
'net.host.name': 'localhost',
108112
'http.method': 'GET',
@@ -193,6 +197,8 @@ test('Propagates trace for outgoing fetch requests', async ({ baseURL }) => {
193197
'otel.kind': 'SERVER',
194198
'http.response.status_code': 200,
195199
'http.url': `http://localhost:3030/test-outgoing-fetch/${id}`,
200+
'url.full': `http://localhost:3030/test-outgoing-fetch/${id}`,
201+
'url.path': `/test-outgoing-fetch/${id}`,
196202
'http.host': 'localhost:3030',
197203
'net.host.name': 'localhost',
198204
'http.method': 'GET',
@@ -232,6 +238,8 @@ test('Propagates trace for outgoing fetch requests', async ({ baseURL }) => {
232238
'otel.kind': 'SERVER',
233239
'http.response.status_code': 200,
234240
'http.url': `http://localhost:3030/test-inbound-headers/${id}`,
241+
'url.full': `http://localhost:3030/test-inbound-headers/${id}`,
242+
'url.path': `/test-inbound-headers/${id}`,
235243
'http.host': 'localhost:3030',
236244
'net.host.name': 'localhost',
237245
'http.method': 'GET',

dev-packages/e2e-tests/test-applications/nestjs-with-submodules-decorator/tests/transactions.test.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,8 @@ test('Sends an API route transaction from module', async ({ baseURL }) => {
2323
'otel.kind': 'SERVER',
2424
'http.response.status_code': 200,
2525
'http.url': 'http://localhost:3030/example-module/transaction',
26+
'url.full': 'http://localhost:3030/example-module/transaction',
27+
'url.path': '/example-module/transaction',
2628
'http.host': 'localhost:3030',
2729
'net.host.name': 'localhost',
2830
'http.method': 'GET',

dev-packages/e2e-tests/test-applications/nestjs-with-submodules/tests/transactions.test.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,8 @@ test('Sends an API route transaction from module', async ({ baseURL }) => {
2323
'otel.kind': 'SERVER',
2424
'http.response.status_code': 200,
2525
'http.url': 'http://localhost:3030/example-module/transaction',
26+
'url.full': 'http://localhost:3030/example-module/transaction',
27+
'url.path': '/example-module/transaction',
2628
'http.host': 'localhost:3030',
2729
'net.host.name': 'localhost',
2830
'http.method': 'GET',

dev-packages/e2e-tests/test-applications/node-connect/tests/transactions.test.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,8 @@ test('Sends an API route transaction', async ({ baseURL }) => {
2424
'otel.kind': 'SERVER',
2525
'http.response.status_code': 200,
2626
'http.url': 'http://localhost:3030/test-transaction',
27+
'url.full': 'http://localhost:3030/test-transaction',
28+
'url.path': '/test-transaction',
2729
'http.host': 'localhost:3030',
2830
'net.host.name': 'localhost',
2931
'http.method': 'GET',

dev-packages/e2e-tests/test-applications/node-express-orchestrion-cjs/tests/transactions.test.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,8 @@ test('Sends an API route transaction', async ({ baseURL }) => {
2323
'otel.kind': 'SERVER',
2424
'http.response.status_code': 200,
2525
'http.url': 'http://localhost:3030/test-transaction',
26+
'url.full': 'http://localhost:3030/test-transaction',
27+
'url.path': '/test-transaction',
2628
'http.host': 'localhost:3030',
2729
'net.host.name': 'localhost',
2830
'http.method': 'GET',

dev-packages/e2e-tests/test-applications/node-express-orchestrion/tests/transactions.test.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,8 @@ test('Sends an API route transaction', async ({ baseURL }) => {
2323
'otel.kind': 'SERVER',
2424
'http.response.status_code': 200,
2525
'http.url': 'http://localhost:3030/test-transaction',
26+
'url.full': 'http://localhost:3030/test-transaction',
27+
'url.path': '/test-transaction',
2628
'http.host': 'localhost:3030',
2729
'net.host.name': 'localhost',
2830
'http.method': 'GET',

dev-packages/e2e-tests/test-applications/node-express-v5/tests/transactions.test.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,8 @@ test('Sends an API route transaction', async ({ baseURL }) => {
2323
'otel.kind': 'SERVER',
2424
'http.response.status_code': 200,
2525
'http.url': 'http://localhost:3030/test-transaction',
26+
'url.full': 'http://localhost:3030/test-transaction',
27+
'url.path': '/test-transaction',
2628
'http.host': 'localhost:3030',
2729
'net.host.name': 'localhost',
2830
'http.method': 'GET',

0 commit comments

Comments
 (0)