Skip to content

Commit 6edd7fc

Browse files
committed
chore(e2e): Remove check on http.response_content_length_uncompressed as its
unreliable and flaky This comes strictly from OTel and we don't really need to assert on it.
1 parent f3fbcd9 commit 6edd7fc

File tree

1 file changed

+31
-30
lines changed
  • dev-packages/e2e-tests/test-applications/node-express-esm-preload/tests

1 file changed

+31
-30
lines changed

dev-packages/e2e-tests/test-applications/node-express-esm-preload/tests/server.test.ts

Lines changed: 31 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -128,34 +128,35 @@ test('Should record spans from http instrumentation', async ({ request }) => {
128128

129129
const httpClientSpan = transactionEvent.spans?.find(span => span.op === 'http.client');
130130

131-
expect(httpClientSpan).toEqual({
132-
span_id: expect.stringMatching(/[a-f0-9]{16}/),
133-
trace_id: expect.stringMatching(/[a-f0-9]{32}/),
134-
data: {
135-
'http.flavor': '1.1',
136-
'http.host': 'example.com:80',
137-
'http.method': 'GET',
138-
'http.response.status_code': 200,
139-
'http.response_content_length_uncompressed': expect.any(Number),
140-
'http.status_code': 200,
141-
'http.status_text': 'OK',
142-
'http.target': '/',
143-
'http.url': 'http://example.com/',
144-
'net.peer.ip': expect.any(String),
145-
'net.peer.name': 'example.com',
146-
'net.peer.port': 80,
147-
'net.transport': 'ip_tcp',
148-
'otel.kind': 'CLIENT',
149-
'sentry.op': 'http.client',
150-
'sentry.origin': 'auto.http.otel.http',
151-
url: 'http://example.com/',
152-
},
153-
description: 'GET http://example.com/',
154-
parent_span_id: expect.stringMatching(/[a-f0-9]{16}/),
155-
start_timestamp: expect.any(Number),
156-
timestamp: expect.any(Number),
157-
status: 'ok',
158-
op: 'http.client',
159-
origin: 'auto.http.otel.http',
160-
});
131+
expect(httpClientSpan).toEqual(
132+
expect.objectContaining({
133+
span_id: expect.stringMatching(/[a-f0-9]{16}/),
134+
trace_id: expect.stringMatching(/[a-f0-9]{32}/),
135+
data: {
136+
'http.flavor': '1.1',
137+
'http.host': 'example.com:80',
138+
'http.method': 'GET',
139+
'http.response.status_code': 200,
140+
'http.status_code': 200,
141+
'http.status_text': 'OK',
142+
'http.target': '/',
143+
'http.url': 'http://example.com/',
144+
'net.peer.ip': expect.any(String),
145+
'net.peer.name': 'example.com',
146+
'net.peer.port': 80,
147+
'net.transport': 'ip_tcp',
148+
'otel.kind': 'CLIENT',
149+
'sentry.op': 'http.client',
150+
'sentry.origin': 'auto.http.otel.http',
151+
url: 'http://example.com/',
152+
},
153+
description: 'GET http://example.com/',
154+
parent_span_id: expect.stringMatching(/[a-f0-9]{16}/),
155+
start_timestamp: expect.any(Number),
156+
timestamp: expect.any(Number),
157+
status: 'ok',
158+
op: 'http.client',
159+
origin: 'auto.http.otel.http',
160+
}),
161+
);
161162
});

0 commit comments

Comments
 (0)