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

Commit

Permalink
Zipkin exporter: Convert "timestamp" and "duration" to "number" type …
Browse files Browse the repository at this point in the history
…per spec (#231)
  • Loading branch information
dsborets authored and justindsmith committed Dec 11, 2018
1 parent 5671ac2 commit e4e19ea
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions packages/opencensus-exporter-zipkin/src/zipkin.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,8 @@ interface TranslatedSpan {
id: string;
parentId?: string;
kind: string;
timestamp: string;
duration: string;
timestamp: number;
duration: number;
debug: boolean;
shared: boolean;
localEndpoint: {serviceName: string};
Expand Down Expand Up @@ -145,8 +145,8 @@ export class ZipkinTraceExporter implements Exporter {
id: span.id,
parentId: span.parentSpanId,
kind: 'SERVER',
timestamp: (span.startTime.getTime() * 1000).toFixed(),
duration: (span.duration * 1000).toFixed(),
timestamp: span.startTime.getTime() * 1000,
duration: Math.round(span.duration * 1000),
debug: true,
shared: true,
localEndpoint: {serviceName: this.serviceName}
Expand Down

0 comments on commit e4e19ea

Please sign in to comment.