Skip to content

Commit dc5aafc

Browse files
authored
feat(opentelemetry): Remove otel.attributes in context (#11604)
This is duplicated from the trace data, no need to send this anymore.
1 parent b2aa392 commit dc5aafc

File tree

3 files changed

+0
-66
lines changed

3 files changed

+0
-66
lines changed

packages/node/test/integration/transactions.test.ts

Lines changed: 0 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -75,12 +75,6 @@ describe('Integration | Transactions', () => {
7575
]);
7676

7777
expect(transaction.contexts?.otel).toEqual({
78-
attributes: {
79-
'test.outer': 'test value',
80-
'sentry.op': 'test op',
81-
'sentry.origin': 'auto.test',
82-
'sentry.source': 'task',
83-
},
8478
resource: {
8579
'service.name': 'node',
8680
'service.namespace': 'sentry',
@@ -245,14 +239,6 @@ describe('Integration | Transactions', () => {
245239
{ message: 'test breadcrumb 3', timestamp: 123456 },
246240
],
247241
contexts: expect.objectContaining({
248-
otel: expect.objectContaining({
249-
attributes: {
250-
'test.outer': 'test value',
251-
'sentry.op': 'test op',
252-
'sentry.origin': 'auto.test',
253-
'sentry.source': 'task',
254-
},
255-
}),
256242
trace: {
257243
data: {
258244
'otel.kind': 'INTERNAL',
@@ -294,12 +280,6 @@ describe('Integration | Transactions', () => {
294280
{ message: 'test breadcrumb 3b', timestamp: 123456 },
295281
],
296282
contexts: expect.objectContaining({
297-
otel: expect.objectContaining({
298-
attributes: {
299-
'test.outer': 'test value b',
300-
'sentry.op': 'test op b',
301-
},
302-
}),
303283
trace: {
304284
data: {
305285
'otel.kind': 'INTERNAL',
@@ -408,11 +388,6 @@ describe('Integration | Transactions', () => {
408388
{ message: 'test breadcrumb 3', timestamp: 123456 },
409389
],
410390
contexts: expect.objectContaining({
411-
otel: expect.objectContaining({
412-
attributes: {
413-
'test.outer': 'test value',
414-
},
415-
}),
416391
trace: {
417392
data: {
418393
'otel.kind': 'INTERNAL',
@@ -449,11 +424,6 @@ describe('Integration | Transactions', () => {
449424
{ message: 'test breadcrumb 3b', timestamp: 123456 },
450425
],
451426
contexts: expect.objectContaining({
452-
otel: expect.objectContaining({
453-
attributes: {
454-
'test.outer': 'test value b',
455-
},
456-
}),
457427
trace: {
458428
data: {
459429
'otel.kind': 'INTERNAL',
@@ -527,13 +497,6 @@ describe('Integration | Transactions', () => {
527497
expect(beforeSendTransaction).toHaveBeenLastCalledWith(
528498
expect.objectContaining({
529499
contexts: expect.objectContaining({
530-
otel: expect.objectContaining({
531-
attributes: {
532-
'sentry.op': 'test op',
533-
'sentry.origin': 'auto.test',
534-
'sentry.source': 'task',
535-
},
536-
}),
537500
trace: {
538501
data: {
539502
'otel.kind': 'INTERNAL',

packages/opentelemetry/src/spanExporter.ts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -212,8 +212,6 @@ function createTransactionForOtelSpan(span: ReadableSpan): TransactionEvent {
212212
contexts: {
213213
trace: traceContext,
214214
otel: {
215-
// TODO: remove the attributes here?
216-
attributes: removeSentryAttributes(span.attributes),
217215
resource: span.resource.attributes,
218216
},
219217
},

packages/opentelemetry/test/integration/transactions.test.ts

Lines changed: 0 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -89,12 +89,6 @@ describe('Integration | Transactions', () => {
8989
]);
9090

9191
expect(transaction.contexts?.otel).toEqual({
92-
attributes: {
93-
'test.outer': 'test value',
94-
'sentry.op': 'test op',
95-
'sentry.origin': 'auto.test',
96-
'sentry.source': 'task',
97-
},
9892
resource: {
9993
'service.name': 'opentelemetry-test',
10094
'service.namespace': 'sentry',
@@ -259,14 +253,6 @@ describe('Integration | Transactions', () => {
259253
{ message: 'test breadcrumb 3', timestamp: 123456 },
260254
],
261255
contexts: expect.objectContaining({
262-
otel: expect.objectContaining({
263-
attributes: {
264-
'test.outer': 'test value',
265-
'sentry.op': 'test op',
266-
'sentry.origin': 'auto.test',
267-
'sentry.source': 'task',
268-
},
269-
}),
270256
trace: {
271257
data: {
272258
'otel.kind': 'INTERNAL',
@@ -308,12 +294,6 @@ describe('Integration | Transactions', () => {
308294
{ message: 'test breadcrumb 3b', timestamp: 123456 },
309295
],
310296
contexts: expect.objectContaining({
311-
otel: expect.objectContaining({
312-
attributes: {
313-
'test.outer': 'test value b',
314-
'sentry.op': 'test op b',
315-
},
316-
}),
317297
trace: {
318298
data: {
319299
'otel.kind': 'INTERNAL',
@@ -391,13 +371,6 @@ describe('Integration | Transactions', () => {
391371
expect(beforeSendTransaction).toHaveBeenLastCalledWith(
392372
expect.objectContaining({
393373
contexts: expect.objectContaining({
394-
otel: expect.objectContaining({
395-
attributes: {
396-
'sentry.op': 'test op',
397-
'sentry.origin': 'auto.test',
398-
'sentry.source': 'task',
399-
},
400-
}),
401374
trace: {
402375
data: {
403376
'otel.kind': 'INTERNAL',

0 commit comments

Comments
 (0)