Skip to content
This repository was archived by the owner on Oct 3, 2023. It is now read-only.

Commit aa889b2

Browse files
jinmelmayurkale22
authored andcommitted
Fix error in opencensus to stackdriver translation (#474) (#475)
- compressedSize -> compressedSizeBytes - uncompressedSize -> uncompressedSizeBytes
1 parent 9632157 commit aa889b2

File tree

2 files changed

+20
-8
lines changed

2 files changed

+20
-8
lines changed

packages/opencensus-exporter-stackdriver/src/stackdriver-cloudtrace-utils.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -84,8 +84,8 @@ export function createTimeEvents(
8484
messageEvent: {
8585
id: String(messageEvent.id),
8686
type: createMessageEventType(messageEvent.type),
87-
uncompressedSize: String(messageEvent.uncompressedSize || 0),
88-
compressedSize: String(messageEvent.compressedSize || 0)
87+
uncompressedSizeBytes: String(messageEvent.uncompressedSize || 0),
88+
compressedSizeBytes: String(messageEvent.compressedSize || 0)
8989
}
9090
})));
9191
}

packages/opencensus-exporter-stackdriver/test/test-stackdriver-cloudtrace-utils.ts

Lines changed: 18 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -144,18 +144,30 @@ describe('Stackdriver CloudTrace Exporter Utils', () => {
144144
}
145145
},
146146
{
147-
messageEvent:
148-
{compressedSize: '100', id: '1', type: 1, uncompressedSize: '12'},
147+
messageEvent: {
148+
compressedSizeBytes: '100',
149+
id: '1',
150+
type: 1,
151+
uncompressedSizeBytes: '12'
152+
},
149153
time: '1970-01-02T10:17:36.789Z',
150154
},
151155
{
152-
messageEvent:
153-
{compressedSize: '0', id: '1', type: 2, uncompressedSize: '0'},
156+
messageEvent: {
157+
compressedSizeBytes: '0',
158+
id: '1',
159+
type: 2,
160+
uncompressedSizeBytes: '0'
161+
},
154162
time: '1970-01-02T10:17:36.789Z',
155163
},
156164
{
157-
messageEvent:
158-
{compressedSize: '0', id: '1', type: 0, uncompressedSize: '0'},
165+
messageEvent: {
166+
compressedSizeBytes: '0',
167+
id: '1',
168+
type: 0,
169+
uncompressedSizeBytes: '0'
170+
},
159171
time: '1970-01-02T10:17:36.789Z',
160172
}
161173
];

0 commit comments

Comments
 (0)