Skip to content

Commit 3a90e81

Browse files
committed
test(otlp-transformer): test double attributes
1 parent e67d7e5 commit 3a90e81

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

experimental/packages/otlp-transformer/test/logs.test.ts

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,10 @@ function createExpectedLogJson(encoder: Encoder): IExportLogsServiceRequest {
7878
key: 'bytes-attribute',
7979
value: { bytesValue: bytesValue },
8080
},
81+
{
82+
key: 'double-attribute',
83+
value: { doubleValue: 1.23 },
84+
},
8185
],
8286
droppedAttributesCount: 0,
8387
flags: 1,
@@ -135,6 +139,10 @@ function createExpectedLogProtobuf(): IExportLogsServiceRequest {
135139
key: 'bytes-attribute',
136140
value: { bytesValue: bytesValue },
137141
},
142+
{
143+
key: 'double-attribute',
144+
value: { doubleValue: 1.23 },
145+
},
138146
],
139147
droppedAttributesCount: 0,
140148
flags: 1,
@@ -159,6 +167,7 @@ const DEFAULT_LOG_FRAGMENT: Omit<
159167
attributes: {
160168
'some-attribute': 'some attribute value',
161169
'bytes-attribute': new Uint8Array([1, 2, 3, 4, 5]),
170+
'double-attribute': 1.23,
162171
},
163172
droppedAttributesCount: 0,
164173
severityNumber: SeverityNumber.ERROR,

0 commit comments

Comments
 (0)