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

Commit e4e19ea

Browse files
dsboretsjustindsmith
authored andcommitted
Zipkin exporter: Convert "timestamp" and "duration" to "number" type per spec (#231)
1 parent 5671ac2 commit e4e19ea

File tree

1 file changed

+4
-4
lines changed
  • packages/opencensus-exporter-zipkin/src

1 file changed

+4
-4
lines changed

packages/opencensus-exporter-zipkin/src/zipkin.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -31,8 +31,8 @@ interface TranslatedSpan {
3131
id: string;
3232
parentId?: string;
3333
kind: string;
34-
timestamp: string;
35-
duration: string;
34+
timestamp: number;
35+
duration: number;
3636
debug: boolean;
3737
shared: boolean;
3838
localEndpoint: {serviceName: string};
@@ -145,8 +145,8 @@ export class ZipkinTraceExporter implements Exporter {
145145
id: span.id,
146146
parentId: span.parentSpanId,
147147
kind: 'SERVER',
148-
timestamp: (span.startTime.getTime() * 1000).toFixed(),
149-
duration: (span.duration * 1000).toFixed(),
148+
timestamp: span.startTime.getTime() * 1000,
149+
duration: Math.round(span.duration * 1000),
150150
debug: true,
151151
shared: true,
152152
localEndpoint: {serviceName: this.serviceName}

0 commit comments

Comments
 (0)